mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 03:00:46 +00:00
Rename gamefunc_Crouch_Toggle to gamefunc_Toggle_Crouch to match the only existing similarly named gamefunc, gamefunc_Toggle_Crosshair
Now bound to C by default. git-svn-id: https://svn.eduke32.com/eduke32@8059 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
e6cb2e4a8d
commit
4300eb1a66
5 changed files with 8 additions and 8 deletions
|
@ -116,7 +116,7 @@ char gamefunctions[NUMGAMEFUNCTIONS][MAXGAMEFUNCLEN] =
|
||||||
"Quick_Load",
|
"Quick_Load",
|
||||||
"Alt_Weapon",
|
"Alt_Weapon",
|
||||||
"Third_Person_View",
|
"Third_Person_View",
|
||||||
"Crouch_Toggle",
|
"Toggle_Crouch",
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef __SETUP__
|
#ifdef __SETUP__
|
||||||
|
@ -185,7 +185,7 @@ const char keydefaults[NUMGAMEFUNCTIONS*2][MAXGAMEFUNCLEN] =
|
||||||
"F9", "",
|
"F9", "",
|
||||||
"", "",
|
"", "",
|
||||||
"F7", "",
|
"F7", "",
|
||||||
"", "",
|
"C", "",
|
||||||
};
|
};
|
||||||
|
|
||||||
const char oldkeydefaults[NUMGAMEFUNCTIONS*2][MAXGAMEFUNCLEN] =
|
const char oldkeydefaults[NUMGAMEFUNCTIONS*2][MAXGAMEFUNCLEN] =
|
||||||
|
|
|
@ -646,7 +646,7 @@ void CONFIG_SetGameControllerDefaultsStandard()
|
||||||
static GameControllerButtonSetting const buttons[] =
|
static GameControllerButtonSetting const buttons[] =
|
||||||
{
|
{
|
||||||
{ GAMECONTROLLER_BUTTON_A, gamefunc_Jump },
|
{ GAMECONTROLLER_BUTTON_A, gamefunc_Jump },
|
||||||
{ GAMECONTROLLER_BUTTON_B, gamefunc_Crouch_Toggle },
|
{ GAMECONTROLLER_BUTTON_B, gamefunc_Toggle_Crouch },
|
||||||
{ GAMECONTROLLER_BUTTON_BACK, gamefunc_Map },
|
{ GAMECONTROLLER_BUTTON_BACK, gamefunc_Map },
|
||||||
{ GAMECONTROLLER_BUTTON_LEFTSTICK, gamefunc_Run },
|
{ GAMECONTROLLER_BUTTON_LEFTSTICK, gamefunc_Run },
|
||||||
{ GAMECONTROLLER_BUTTON_RIGHTSTICK, gamefunc_Quick_Kick },
|
{ GAMECONTROLLER_BUTTON_RIGHTSTICK, gamefunc_Quick_Kick },
|
||||||
|
|
|
@ -105,7 +105,7 @@ enum GameFunction_t
|
||||||
gamefunc_Quick_Load,
|
gamefunc_Quick_Load,
|
||||||
gamefunc_Alt_Weapon,
|
gamefunc_Alt_Weapon,
|
||||||
gamefunc_Third_Person_View,
|
gamefunc_Third_Person_View,
|
||||||
gamefunc_Crouch_Toggle,
|
gamefunc_Toggle_Crouch,
|
||||||
};
|
};
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|
|
@ -7394,5 +7394,5 @@ static void G_SetupGameButtons(void)
|
||||||
CONTROL_DefineFlag(gamefunc_Quick_Load, FALSE);
|
CONTROL_DefineFlag(gamefunc_Quick_Load, FALSE);
|
||||||
CONTROL_DefineFlag(gamefunc_Alt_Weapon,FALSE);
|
CONTROL_DefineFlag(gamefunc_Alt_Weapon,FALSE);
|
||||||
CONTROL_DefineFlag(gamefunc_Third_Person_View, FALSE);
|
CONTROL_DefineFlag(gamefunc_Third_Person_View, FALSE);
|
||||||
CONTROL_DefineFlag(gamefunc_Crouch_Toggle, FALSE);
|
CONTROL_DefineFlag(gamefunc_Toggle_Crouch, FALSE);
|
||||||
}
|
}
|
||||||
|
|
|
@ -3050,18 +3050,18 @@ void P_GetInput(int const playerNum)
|
||||||
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 = pPlayer->on_ground && sectorLotag != 2 && (sectorLotag != 1 || pPlayer->spritebridge);
|
||||||
|
|
||||||
if (BUTTON(gamefunc_Crouch_Toggle))
|
if (BUTTON(gamefunc_Toggle_Crouch))
|
||||||
{
|
{
|
||||||
pPlayer->crouch_toggle = !pPlayer->crouch_toggle && crouchable;
|
pPlayer->crouch_toggle = !pPlayer->crouch_toggle && crouchable;
|
||||||
|
|
||||||
if (crouchable)
|
if (crouchable)
|
||||||
CONTROL_ClearButton(gamefunc_Crouch_Toggle);
|
CONTROL_ClearButton(gamefunc_Toggle_Crouch);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (BUTTON(gamefunc_Crouch) || pPlayer->jetpack_on || (!crouchable && pPlayer->on_ground))
|
if (BUTTON(gamefunc_Crouch) || pPlayer->jetpack_on || (!crouchable && pPlayer->on_ground))
|
||||||
pPlayer->crouch_toggle = 0;
|
pPlayer->crouch_toggle = 0;
|
||||||
|
|
||||||
int const crouching = BUTTON(gamefunc_Crouch) || BUTTON(gamefunc_Crouch_Toggle) || pPlayer->crouch_toggle;
|
int const crouching = BUTTON(gamefunc_Crouch) || BUTTON(gamefunc_Toggle_Crouch) || pPlayer->crouch_toggle;
|
||||||
|
|
||||||
localInput.bits |= (BUTTON(gamefunc_Jump) << SK_JUMP) | (crouching << SK_CROUCH);
|
localInput.bits |= (BUTTON(gamefunc_Jump) << SK_JUMP) | (crouching << SK_CROUCH);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue