diff --git a/source/core/gamecontrol.cpp b/source/core/gamecontrol.cpp index e605b76d8..81c09ae83 100644 --- a/source/core/gamecontrol.cpp +++ b/source/core/gamecontrol.cpp @@ -1494,10 +1494,9 @@ fixed_t getincangleq16(fixed_t a, fixed_t na) // //--------------------------------------------------------------------------- -void processMovement(InputPacket* currInput, InputPacket* inputBuffer, ControlInfo* const hidInput, bool const allowstrafe, double const scaleAdjust, int const turnscale, short const drink_amt) +void processMovement(InputPacket* currInput, InputPacket* inputBuffer, ControlInfo* const hidInput, bool const allowstrafe, double const scaleAdjust, double const turnscale, short const drink_amt) { // set up variables - bool const mouseaim = !(inputBuffer->actions & SB_AIMMODE); int const running = !!(inputBuffer->actions & SB_RUN); int const keymove = gi->playerKeyMove() << running; int const mousevelscale = g_gameType & GAMEFLAG_BLOOD ? 32 : 4; @@ -1509,7 +1508,7 @@ void processMovement(InputPacket* currInput, InputPacket* inputBuffer, ControlIn else currInput->q16avel += FloatToFixed(hidInput->mousex + (scaleAdjust * hidInput->dyaw)); - if (mouseaim) + if (!(inputBuffer->actions & SB_AIMMODE)) currInput->q16horz -= FloatToFixed(hidInput->mousey); else currInput->fvel -= xs_CRoundToInt(hidInput->mousey * mousevelscale * 2); @@ -1519,8 +1518,8 @@ void processMovement(InputPacket* currInput, InputPacket* inputBuffer, ControlIn // process remaining controller input. currInput->q16horz -= FloatToFixed(scaleAdjust * hidInput->dpitch); - currInput->svel -= xs_CRoundToInt(scaleAdjust * (hidInput->dx * keymove * cntrlvelscale)); - currInput->fvel -= xs_CRoundToInt(scaleAdjust * (hidInput->dz * keymove * cntrlvelscale)); + currInput->svel -= xs_CRoundToInt(scaleAdjust * hidInput->dx * keymove * cntrlvelscale); + currInput->fvel -= xs_CRoundToInt(scaleAdjust * hidInput->dz * keymove * cntrlvelscale); // process keyboard turning keys. if (buttonMap.ButtonDown(gamefunc_Strafe) && allowstrafe) diff --git a/source/core/gamecontrol.h b/source/core/gamecontrol.h index e11ab1fd3..64901793d 100644 --- a/source/core/gamecontrol.h +++ b/source/core/gamecontrol.h @@ -67,7 +67,7 @@ void CompleteLevel(MapRecord* map); int getincangle(int c, int n); fixed_t getincangleq16(fixed_t c, fixed_t n); -void processMovement(InputPacket* currInput, InputPacket* inputBuffer, ControlInfo* const hidInput, bool const allowstrafe, double const scaleAdjust, int const turnscale = 1, short const drink_amt = 0); +void processMovement(InputPacket* currInput, InputPacket* inputBuffer, ControlInfo* const hidInput, bool const allowstrafe, double const scaleAdjust, double const turnscale = 1, short const drink_amt = 0); void sethorizon(fixed_t* q16horiz, fixed_t const q16horz, ESyncBits* actions, double const scaleAdjust); void applylook(fixed_t* q16ang, fixed_t* q16look_ang, fixed_t* q16rotscrnang, fixed_t* spin, fixed_t const q16avel, ESyncBits* actions, double const scaleAdjust, bool const crouching); void playerAddAngle(fixed_t* q16ang, double* helper, double adjustment); diff --git a/source/sw/src/input.cpp b/source/sw/src/input.cpp index f3291dd54..7a67e5c75 100644 --- a/source/sw/src/input.cpp +++ b/source/sw/src/input.cpp @@ -205,7 +205,7 @@ void GameInterface::GetInput(InputPacket *packet, ControlInfo* const hidInput) PLAYERp pp = &Player[myconnectindex]; processInputBits(pp, hidInput); - processMovement(&input, &loc, hidInput, true, scaleAdjust, pp->sop_control ? 3 : 1); + processMovement(&input, &loc, hidInput, !pp->sop, scaleAdjust, pp->sop_control ? 3. / 1.40625 : 1.); processWeapon(pp); if (!cl_syncinput)