Re: [hlcoders] Speed bug

2002-05-16 Thread Chris Foss

As far as I remember, all Quake engine games have this bug(?). it's about
player physics. As I remember, you can strafe faster than you can run.
Strafing into a wall, or, strafe running, is or was, a trick used by the
people who hold flag cap races in TFC.


From: Commando [EMAIL PROTECTED]
 Some of our users have reported that when you run along a wall and hold
the
 Move Left or Right button so that you push into the wall, you run much
 quicker.  I tested this by adding the following code to
 CBasePlayer::ItemPostFrame() to output the velocity of the player.

 ALERT(at_console, Ground speed %f\n, Vector(pev-velocity).Length());

 Our max player speed is set at 250.  Running normally I see numbers like
 this.  When running along a wall and pressing into it, the number jumps to
 360.  I double checked this by timing myself running across a large
 room.  Normally it takes 9 seconds, but by taking advantage of this bug I
 can run across in 6 seconds.

 I am pretty sure this is a bug in the SDK or the engine as we have not
 modified any of this code and I have experienced this in other mods.  Is
 this a known bug?  If so, is there a fix for it?

 Rob Prouse
 http://www.tourofdutymod.com

 ___
 To unsubscribe, edit your list preferences, or view the list archives,
please visit:
 http://list.valvesoftware.com/mailman/listinfo/hlcoders



___
To unsubscribe, edit your list preferences, or view the list archives, please visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders




Re: [hlcoders] Speed bug

2002-05-16 Thread botman

 Some of our users have reported that when you run along a wall and hold the
 Move Left or Right button so that you push into the wall, you run much
 quicker.  I tested this by adding the following code to
 CBasePlayer::ItemPostFrame() to output the velocity of the player.

 ALERT(at_console, Ground speed %f\n, Vector(pev-velocity).Length());

 Our max player speed is set at 250.  Running normally I see numbers like
 this.  When running along a wall and pressing into it, the number jumps to
 360.  I double checked this by timing myself running across a large
 room.  Normally it takes 9 seconds, but by taking advantage of this bug I
 can run across in 6 seconds.

 I am pretty sure this is a bug in the SDK or the engine as we have not
 modified any of this code and I have experienced this in other mods.  Is
 this a known bug?  If so, is there a fix for it?

In pm_shared.c, PM_WalkMove() calls PM_FlyMove().  PM_FlyMove() calls
PM_ClipVelocity() when the player's velocity will intersect a plane (like
walls, floors, etc.).  PM_ClipVelocity() takes in the original velocity (as the
first argument) and passes back a new velocity (as the third argument).  This
new velocity is an adjustment to bounce the player off of the wall.

The bounce adjustment seems to come from pmove-movevars-bounce.  The
movevars_s structure is defined in pm_movevars.h, but I can find no where that
this bounce field in pm_movevars is initialized.

Perhaps clamping the player's velocity immediately after the calls to
PM_ClipVelocity() will prevent this problem.

Jeffrey botman Broome

___
To unsubscribe, edit your list preferences, or view the list archives, please visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders




RE: [hlcoders] Speed bug

2002-05-16 Thread David Flor

When you run DIAGONALLY, do you exceed 250 as well?

I've seen this before because the max speed is only across the AXIS.
That is, if yoy have a max speed of 250, that means 250 across the x
AND 250 across the Y, which linearly is over 350 units.

You can cap the movement velocity by using something akin to:

int iVelocity = pev-velocity.Length2D();
if (iVelocity  iMaxSpeed )
{
pev-velocity.x = pev-velocity.x * iMaxSpeed / iVelocity;
pev-velocity.y = pev-velocity.y * iMaxSpeed / iVelocity;
}

...at least I *think* that's right.

You'd have to do calculations such as this where you process the
cmd-forwardmove and cmd-sidemove in the client code.

This is all talking out of my ass; I don't have the code in front of me
and haven't touched this part of it in ages.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]] On Behalf Of Commando
Sent: Thursday, May 16, 2002 4:36 PM
To: [EMAIL PROTECTED]
Subject: [hlcoders] Speed bug


Some of our users have reported that when you run along a wall and hold
the Move Left or Right button so that you push into the wall, you run
much quicker.  I tested this by adding the following code to
CBasePlayer::ItemPostFrame() to output the velocity of the player.

ALERT(at_console, Ground speed %f\n, Vector(pev-velocity).Length());

Our max player speed is set at 250.  Running normally I see numbers like
this.  When running along a wall and pressing into it, the number jumps
to 360.  I double checked this by timing myself running across a large
room.  Normally it takes 9 seconds, but by taking advantage of this bug
I can run across in 6 seconds.

I am pretty sure this is a bug in the SDK or the engine as we have not
modified any of this code and I have experienced this in other mods.  Is
this a known bug?  If so, is there a fix for it?

Rob Prouse
http://www.tourofdutymod.com

___
To unsubscribe, edit your list preferences, or view the list archives,
please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders


___
To unsubscribe, edit your list preferences, or view the list archives, please visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders




RE: [hlcoders] Speed bug

2002-05-16 Thread Commando

I tried running diagonally and it doesn't increase the speed by much.  I
will give Botman's suggestion a try though and see if it helps.

Rob Prouse
http://www.tourofdutymod.com

At 05:39 PM 16/05/2002 -0400, you wrote:
When you run DIAGONALLY, do you exceed 250 as well?

I've seen this before because the max speed is only across the AXIS.
That is, if yoy have a max speed of 250, that means 250 across the x
AND 250 across the Y, which linearly is over 350 units.

You can cap the movement velocity by using something akin to:

int iVelocity = pev-velocity.Length2D();
if (iVelocity  iMaxSpeed )
{
 pev-velocity.x = pev-velocity.x * iMaxSpeed / iVelocity;
 pev-velocity.y = pev-velocity.y * iMaxSpeed / iVelocity;
}

...at least I *think* that's right.

You'd have to do calculations such as this where you process the
cmd-forwardmove and cmd-sidemove in the client code.

This is all talking out of my ass; I don't have the code in front of me
and haven't touched this part of it in ages.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]] On Behalf Of Commando
Sent: Thursday, May 16, 2002 4:36 PM
To: [EMAIL PROTECTED]
Subject: [hlcoders] Speed bug


Some of our users have reported that when you run along a wall and hold
the Move Left or Right button so that you push into the wall, you run
much quicker.  I tested this by adding the following code to
CBasePlayer::ItemPostFrame() to output the velocity of the player.

ALERT(at_console, Ground speed %f\n, Vector(pev-velocity).Length());

Our max player speed is set at 250.  Running normally I see numbers like
this.  When running along a wall and pressing into it, the number jumps
to 360.  I double checked this by timing myself running across a large
room.  Normally it takes 9 seconds, but by taking advantage of this bug
I can run across in 6 seconds.

I am pretty sure this is a bug in the SDK or the engine as we have not
modified any of this code and I have experienced this in other mods.  Is
this a known bug?  If so, is there a fix for it?

Rob Prouse
http://www.tourofdutymod.com

___
To unsubscribe, edit your list preferences, or view the list archives,
please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders


___
To unsubscribe, edit your list preferences, or view the list archives,
please visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders

___
To unsubscribe, edit your list preferences, or view the list archives, please visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders