mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-27 20:20:40 +00:00
- SW: Fix turn scaling while pp->sop_control
and specify !pp->sop
to processMovement()
s allowstrafe
bool instead of an unconditional true.
This commit is contained in:
parent
c8a74a8f3f
commit
73f52b2cee
3 changed files with 6 additions and 7 deletions
|
@ -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)
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue