mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-28 12:30:46 +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
|
// set up variables
|
||||||
bool const mouseaim = !(inputBuffer->actions & SB_AIMMODE);
|
|
||||||
int const running = !!(inputBuffer->actions & SB_RUN);
|
int const running = !!(inputBuffer->actions & SB_RUN);
|
||||||
int const keymove = gi->playerKeyMove() << running;
|
int const keymove = gi->playerKeyMove() << running;
|
||||||
int const mousevelscale = g_gameType & GAMEFLAG_BLOOD ? 32 : 4;
|
int const mousevelscale = g_gameType & GAMEFLAG_BLOOD ? 32 : 4;
|
||||||
|
@ -1509,7 +1508,7 @@ void processMovement(InputPacket* currInput, InputPacket* inputBuffer, ControlIn
|
||||||
else
|
else
|
||||||
currInput->q16avel += FloatToFixed(hidInput->mousex + (scaleAdjust * hidInput->dyaw));
|
currInput->q16avel += FloatToFixed(hidInput->mousex + (scaleAdjust * hidInput->dyaw));
|
||||||
|
|
||||||
if (mouseaim)
|
if (!(inputBuffer->actions & SB_AIMMODE))
|
||||||
currInput->q16horz -= FloatToFixed(hidInput->mousey);
|
currInput->q16horz -= FloatToFixed(hidInput->mousey);
|
||||||
else
|
else
|
||||||
currInput->fvel -= xs_CRoundToInt(hidInput->mousey * mousevelscale * 2);
|
currInput->fvel -= xs_CRoundToInt(hidInput->mousey * mousevelscale * 2);
|
||||||
|
@ -1519,8 +1518,8 @@ void processMovement(InputPacket* currInput, InputPacket* inputBuffer, ControlIn
|
||||||
|
|
||||||
// process remaining controller input.
|
// process remaining controller input.
|
||||||
currInput->q16horz -= FloatToFixed(scaleAdjust * hidInput->dpitch);
|
currInput->q16horz -= FloatToFixed(scaleAdjust * hidInput->dpitch);
|
||||||
currInput->svel -= xs_CRoundToInt(scaleAdjust * (hidInput->dx * keymove * cntrlvelscale));
|
currInput->svel -= xs_CRoundToInt(scaleAdjust * hidInput->dx * keymove * cntrlvelscale);
|
||||||
currInput->fvel -= xs_CRoundToInt(scaleAdjust * (hidInput->dz * keymove * cntrlvelscale));
|
currInput->fvel -= xs_CRoundToInt(scaleAdjust * hidInput->dz * keymove * cntrlvelscale);
|
||||||
|
|
||||||
// process keyboard turning keys.
|
// process keyboard turning keys.
|
||||||
if (buttonMap.ButtonDown(gamefunc_Strafe) && allowstrafe)
|
if (buttonMap.ButtonDown(gamefunc_Strafe) && allowstrafe)
|
||||||
|
|
|
@ -67,7 +67,7 @@ void CompleteLevel(MapRecord* map);
|
||||||
int getincangle(int c, int n);
|
int getincangle(int c, int n);
|
||||||
fixed_t getincangleq16(fixed_t c, fixed_t 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 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 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);
|
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];
|
PLAYERp pp = &Player[myconnectindex];
|
||||||
|
|
||||||
processInputBits(pp, hidInput);
|
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);
|
processWeapon(pp);
|
||||||
|
|
||||||
if (!cl_syncinput)
|
if (!cl_syncinput)
|
||||||
|
|
Loading…
Reference in a new issue