mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 03:00:46 +00:00
More gamefunc_Toggle_Crouch improvements
git-svn-id: https://svn.eduke32.com/eduke32@8061 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
f0ea646560
commit
f868345670
1 changed files with 2 additions and 2 deletions
|
@ -3048,7 +3048,7 @@ void P_GetInput(int const playerNum)
|
||||||
localInput.bits |= (BUTTON(gamefunc_Open) << SK_OPEN);
|
localInput.bits |= (BUTTON(gamefunc_Open) << SK_OPEN);
|
||||||
|
|
||||||
int const sectorLotag = pPlayer->cursectnum != -1 ? sector[pPlayer->cursectnum].lotag : 0;
|
int const sectorLotag = pPlayer->cursectnum != -1 ? sector[pPlayer->cursectnum].lotag : 0;
|
||||||
int const crouchable = pPlayer->on_ground && sectorLotag != 2 && (sectorLotag != 1 || pPlayer->spritebridge);
|
int const crouchable = sectorLotag != 2 && (sectorLotag != 1 || pPlayer->spritebridge);
|
||||||
|
|
||||||
if (BUTTON(gamefunc_Toggle_Crouch))
|
if (BUTTON(gamefunc_Toggle_Crouch))
|
||||||
{
|
{
|
||||||
|
@ -3058,7 +3058,7 @@ void P_GetInput(int const playerNum)
|
||||||
CONTROL_ClearButton(gamefunc_Toggle_Crouch);
|
CONTROL_ClearButton(gamefunc_Toggle_Crouch);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (BUTTON(gamefunc_Crouch) || pPlayer->jetpack_on || (!crouchable && pPlayer->on_ground))
|
if (BUTTON(gamefunc_Crouch) || BUTTON(gamefunc_Jump) || pPlayer->jetpack_on || (!crouchable && pPlayer->on_ground))
|
||||||
pPlayer->crouch_toggle = 0;
|
pPlayer->crouch_toggle = 0;
|
||||||
|
|
||||||
int const crouching = BUTTON(gamefunc_Crouch) || BUTTON(gamefunc_Toggle_Crouch) || pPlayer->crouch_toggle;
|
int const crouching = BUTTON(gamefunc_Crouch) || BUTTON(gamefunc_Toggle_Crouch) || pPlayer->crouch_toggle;
|
||||||
|
|
Loading…
Reference in a new issue