mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-10 23:02:03 +00:00
Manually merge EDuke32 SVN commit 8565.
This commit is contained in:
parent
1222a3a56a
commit
a5612b1a02
1 changed files with 42 additions and 24 deletions
|
@ -3170,6 +3170,9 @@ int32_t mouseyaxismode = -1;
|
|||
static int P_CheckLockedMovement(int const playerNum)
|
||||
{
|
||||
auto const pPlayer = g_player[playerNum].ps;
|
||||
|
||||
if (pPlayer->on_crane >= 0) return 2;
|
||||
|
||||
return (pPlayer->dead_flag || pPlayer->fist_incs || pPlayer->transporter_hold > 2 || pPlayer->hard_landing || pPlayer->access_incs > 0 || pPlayer->knee_incs > 0
|
||||
|| (PWEAPON(playerNum, pPlayer->curr_weapon, WorksLike) == TRIPBOMB_WEAPON && pPlayer->kickback_pic > 1
|
||||
&& pPlayer->kickback_pic < PWEAPON(playerNum, pPlayer->curr_weapon, FireDelay)));
|
||||
|
@ -3443,7 +3446,9 @@ void P_GetInput(int const playerNum)
|
|||
localInput.extbits |= buttonMap.ButtonDown(gamefunc_Turn_Left)<<4;
|
||||
localInput.extbits |= buttonMap.ButtonDown(gamefunc_Turn_Right)<<5;
|
||||
|
||||
if ((ud.scrollmode && ud.overhead_on) || P_CheckLockedMovement(playerNum))
|
||||
int const movementLocked = P_CheckLockedMovement(playerNum);
|
||||
|
||||
if ((ud.scrollmode && ud.overhead_on) || movementLocked == 1)
|
||||
{
|
||||
if (ud.scrollmode && ud.overhead_on)
|
||||
{
|
||||
|
@ -3459,14 +3464,17 @@ void P_GetInput(int const playerNum)
|
|||
}
|
||||
else
|
||||
{
|
||||
localInput.q16avel = fix16_sadd(localInput.q16avel, input.q16avel);
|
||||
if (movementLocked != 2)
|
||||
{
|
||||
localInput.q16avel = fix16_sadd(localInput.q16avel, input.q16avel);
|
||||
localInput.fvel = clamp(localInput.fvel + input.fvel, -MAXVEL, MAXVEL);
|
||||
localInput.svel = clamp(localInput.svel + input.svel, -MAXSVEL, MAXSVEL);
|
||||
|
||||
pPlayer->q16ang = fix16_sadd(pPlayer->q16ang, input.q16avel);
|
||||
pPlayer->q16ang &= 0x7FFFFFF;
|
||||
}
|
||||
|
||||
localInput.q16horz = fix16_clamp(fix16_sadd(localInput.q16horz, input.q16horz), F16(-MAXHORIZVEL), F16(MAXHORIZVEL));
|
||||
localInput.fvel = clamp(localInput.fvel + input.fvel, -MAXVEL, MAXVEL);
|
||||
localInput.svel = clamp(localInput.svel + input.svel, -MAXSVEL, MAXSVEL);
|
||||
|
||||
pPlayer->q16ang = fix16_sadd(pPlayer->q16ang, input.q16avel);
|
||||
pPlayer->q16ang &= 0x7FFFFFF;
|
||||
|
||||
pPlayer->q16horiz = fix16_clamp(fix16_add(pPlayer->q16horiz, input.q16horz), F16(HORIZ_MIN), F16(HORIZ_MAX));
|
||||
}
|
||||
|
||||
|
@ -3766,7 +3774,9 @@ void P_GetInputMotorcycle(int playerNum)
|
|||
|
||||
input.fvel += pPlayer->moto_speed;
|
||||
|
||||
if ((ud.scrollmode && ud.overhead_on) || P_CheckLockedMovement(playerNum))
|
||||
int const movementLocked = P_CheckLockedMovement(playerNum);
|
||||
|
||||
if ((ud.scrollmode && ud.overhead_on) || movementLocked == 1)
|
||||
{
|
||||
if (ud.scrollmode && ud.overhead_on)
|
||||
{
|
||||
|
@ -3782,14 +3792,17 @@ void P_GetInputMotorcycle(int playerNum)
|
|||
}
|
||||
else
|
||||
{
|
||||
localInput.q16avel = fix16_sadd(localInput.q16avel, input.q16avel);
|
||||
if (movementLocked != 2)
|
||||
{
|
||||
localInput.q16avel = fix16_sadd(localInput.q16avel, input.q16avel);
|
||||
localInput.fvel = clamp(localInput.fvel + input.fvel, -15, 120);
|
||||
localInput.svel = clamp(localInput.svel + input.svel, -MAXSVEL, MAXSVEL);
|
||||
|
||||
pPlayer->q16ang = fix16_sadd(pPlayer->q16ang, input.q16avel);
|
||||
pPlayer->q16ang &= 0x7FFFFFF;
|
||||
}
|
||||
|
||||
localInput.q16horz = fix16_clamp(fix16_sadd(localInput.q16horz, input.q16horz), F16(-MAXHORIZVEL), F16(MAXHORIZVEL));
|
||||
localInput.fvel = clamp(localInput.fvel + input.fvel, -15, 120);
|
||||
localInput.svel = clamp(localInput.svel + input.svel, -MAXSVEL, MAXSVEL);
|
||||
|
||||
pPlayer->q16ang = fix16_sadd(pPlayer->q16ang, input.q16avel);
|
||||
pPlayer->q16ang &= 0x7FFFFFF;
|
||||
|
||||
pPlayer->q16horiz = fix16_clamp(fix16_add(pPlayer->q16horiz, input.q16horz), F16(HORIZ_MIN), F16(HORIZ_MAX));
|
||||
}
|
||||
|
||||
|
@ -4068,7 +4081,9 @@ void P_GetInputBoat(int playerNum)
|
|||
|
||||
input.q16avel = fix16_mul(input.q16avel, avelScale);
|
||||
|
||||
if ((ud.scrollmode && ud.overhead_on) || P_CheckLockedMovement(playerNum))
|
||||
int const movementLocked = P_CheckLockedMovement(playerNum);
|
||||
|
||||
if ((ud.scrollmode && ud.overhead_on) || movementLocked == 1)
|
||||
{
|
||||
if (ud.scrollmode && ud.overhead_on)
|
||||
{
|
||||
|
@ -4084,14 +4099,17 @@ void P_GetInputBoat(int playerNum)
|
|||
}
|
||||
else
|
||||
{
|
||||
localInput.q16avel = fix16_sadd(localInput.q16avel, input.q16avel);
|
||||
if (movementLocked != 2)
|
||||
{
|
||||
localInput.q16avel = fix16_sadd(localInput.q16avel, input.q16avel);
|
||||
localInput.fvel = clamp(localInput.fvel + input.fvel, -15, 120);
|
||||
localInput.svel = clamp(localInput.svel + input.svel, -MAXSVEL, MAXSVEL);
|
||||
|
||||
pPlayer->q16ang = fix16_sadd(pPlayer->q16ang, input.q16avel);
|
||||
pPlayer->q16ang &= 0x7FFFFFF;
|
||||
}
|
||||
|
||||
localInput.q16horz = fix16_clamp(fix16_sadd(localInput.q16horz, input.q16horz), F16(-MAXHORIZVEL), F16(MAXHORIZVEL));
|
||||
localInput.fvel = clamp(localInput.fvel + input.fvel, -15, 120);
|
||||
localInput.svel = clamp(localInput.svel + input.svel, -MAXSVEL, MAXSVEL);
|
||||
|
||||
pPlayer->q16ang = fix16_sadd(pPlayer->q16ang, input.q16avel);
|
||||
pPlayer->q16ang &= 0x7FFFFFF;
|
||||
|
||||
pPlayer->q16horiz = fix16_clamp(fix16_add(pPlayer->q16horiz, input.q16horz), F16(HORIZ_MIN), F16(HORIZ_MAX));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue