mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-10 14:52:01 +00:00
parent
a52ee89969
commit
7c8efde38c
3 changed files with 18 additions and 3 deletions
|
@ -42,16 +42,30 @@ void GameInterface::GetInput(InputPacket* packet, ControlInfo* const hidInput)
|
|||
return;
|
||||
}
|
||||
|
||||
PLAYER* pPlayer = &gPlayer[myconnectindex];
|
||||
double const scaleAdjust = InputScale();
|
||||
InputPacket input {};
|
||||
|
||||
ApplyGlobalInput(gInput, hidInput);
|
||||
processMovement(&input, &gInput, hidInput, scaleAdjust);
|
||||
|
||||
// Handle crouch toggling.
|
||||
if (buttonMap.ButtonDown(gamefunc_Toggle_Crouch) || pPlayer->crouch_toggle)
|
||||
{
|
||||
gInput.actions |= SB_CROUCH;
|
||||
}
|
||||
if (buttonMap.ButtonDown(gamefunc_Toggle_Crouch))
|
||||
{
|
||||
pPlayer->crouch_toggle = !pPlayer->crouch_toggle;
|
||||
buttonMap.ClearButton(gamefunc_Toggle_Crouch);
|
||||
}
|
||||
if (buttonMap.ButtonDown(gamefunc_Crouch) || buttonMap.ButtonDown(gamefunc_Jump))
|
||||
{
|
||||
pPlayer->crouch_toggle = false;
|
||||
}
|
||||
|
||||
if (!cl_syncinput && gamestate == GS_LEVEL)
|
||||
{
|
||||
PLAYER* pPlayer = &gPlayer[myconnectindex];
|
||||
|
||||
// Perform unsynchronised angle/horizon if not dead.
|
||||
if (gView->pXSprite->health != 0)
|
||||
{
|
||||
|
|
|
@ -183,6 +183,7 @@ struct PLAYER
|
|||
int player_par;
|
||||
int nWaterPal;
|
||||
POSTURE pPosture[kModeMax][kPostureMax];
|
||||
bool crouch_toggle;
|
||||
};
|
||||
|
||||
struct PROFILE
|
||||
|
|
|
@ -514,7 +514,7 @@ OptionMenu "ActionControlsMenu" protected
|
|||
StaticText ""
|
||||
Control "$CNTRLMNU_JUMP" , "+jump"
|
||||
Control "$CNTRLMNU_CROUCH" , "+crouch"
|
||||
ifgame(Duke, Nam, WW2GI, Redneck, RedneckRides)
|
||||
ifgame(Duke, Nam, WW2GI, Redneck, RedneckRides, Blood)
|
||||
{
|
||||
// Fixme: Make this work in all games
|
||||
Control "$CNTRLMNU_TOGGLECROUCH" , "+toggle_crouch"
|
||||
|
|
Loading…
Reference in a new issue