Skip to content

Commit

Permalink
Fixed bug 2799274. Used the same offset sensitivity factor for strafing
Browse files Browse the repository at this point in the history
that is used for looking around.
  • Loading branch information
skyjake committed Jun 28, 2009
1 parent 8ded485 commit 8b23506
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions doomsday/plugins/common/src/p_user.c
Expand Up @@ -1750,7 +1750,7 @@ void P_PlayerThinkUpdateControls(player_t* player)
{
int playerNum = player - players;
classinfo_t *pClassInfo = PCLASS_INFO(player->class);
float vel, off;
float vel, off, offsetSensitivity = 100;
int i;
boolean strafe = false;
playerbrain_t *brain = &player->brain;
Expand All @@ -1766,14 +1766,14 @@ void P_PlayerThinkUpdateControls(player_t* player)

// Move status.
P_GetControlState(playerNum, CTL_WALK, &vel, &off);
brain->forwardMove = off + vel;
brain->forwardMove = off * offsetSensitivity + vel;
P_GetControlState(playerNum, strafe? CTL_TURN : CTL_SIDESTEP, &vel, &off);
if(strafe)
{
// Saturate.
vel = (vel > 0? 1 : vel < 0? -1 : 0);
}
brain->sideMove = off + vel;
brain->sideMove = off * offsetSensitivity + vel;

// Flight.
P_GetControlState(playerNum, CTL_ZFLY, &vel, &off);
Expand Down

0 comments on commit 8b23506

Please sign in to comment.