minor changes

This commit is contained in:
nukeykt 2019-09-14 23:34:17 +09:00 committed by Christoph Oelckers
parent 90b005a44a
commit 5a93d301b6
3 changed files with 18 additions and 9 deletions

View file

@ -98,6 +98,8 @@ char gamefunctions[NUMGAMEFUNCTIONS][MAXGAMEFUNCLEN] =
"Last_Used_Weapon", "Last_Used_Weapon",
"Quick_Save", "Quick_Save",
"Quick_Load", "Quick_Load",
"Third_Person_View",
"Toggle_Crouch",
}; };
#ifdef __SETUP__ #ifdef __SETUP__
@ -109,7 +111,7 @@ char keydefaults[NUMGAMEFUNCTIONS*2][MAXGAMEFUNCLEN] =
"Left", "Kpad4", "Left", "Kpad4",
"Right", "KPad6", "Right", "KPad6",
"LAlt", "RAlt", "LAlt", "RAlt",
"", "RCtrl", "RCtrl", "",
"E", "", "E", "",
"LShift", "RShift", "LShift", "RShift",
"CapLck", "", "CapLck", "",
@ -150,8 +152,8 @@ char keydefaults[NUMGAMEFUNCTIONS*2][MAXGAMEFUNCLEN] =
"Y", "", "Y", "",
"F", "", "F", "",
"K", "", "K", "",
"U", "", "", "",
"I", "", "", "",
"R", "", "R", "",
"Q", "", "Q", "",
"'", "", "'", "",
@ -161,9 +163,11 @@ char keydefaults[NUMGAMEFUNCTIONS*2][MAXGAMEFUNCLEN] =
"", "", "", "",
"", "", "", "",
"", "", "", "",
"", "", "X", "",
"F6", "", "F6", "",
"F9", "", "F9", "",
"F7", "",
"", "",
}; };
char oldkeydefaults[NUMGAMEFUNCTIONS*2][MAXGAMEFUNCLEN] = char oldkeydefaults[NUMGAMEFUNCTIONS*2][MAXGAMEFUNCLEN] =
@ -228,13 +232,15 @@ char oldkeydefaults[NUMGAMEFUNCTIONS*2][MAXGAMEFUNCLEN] =
"", "", "", "",
"F6", "", "F6", "",
"F9", "", "F9", "",
"F7", "",
"", "",
}; };
static const char * mousedefaults[MAXMOUSEBUTTONS] = static const char * mousedefaults[MAXMOUSEBUTTONS] =
{ {
"Fire", "Fire",
"MedKit",
"Jetpack", "Jetpack",
"MedKit",
"", "",
"Previous_Weapon", "Previous_Weapon",
"Next_Weapon", "Next_Weapon",

View file

@ -34,7 +34,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
extern "C" { extern "C" {
#endif #endif
#define NUMGAMEFUNCTIONS 60 #define NUMGAMEFUNCTIONS 62
#define MAXGAMEFUNCLEN 32 #define MAXGAMEFUNCLEN 32
extern char gamefunctions[NUMGAMEFUNCTIONS][MAXGAMEFUNCLEN]; extern char gamefunctions[NUMGAMEFUNCTIONS][MAXGAMEFUNCLEN];
@ -103,6 +103,7 @@ enum GameFunction_t
gamefunc_Last_Weapon, gamefunc_Last_Weapon,
gamefunc_Quick_Save, gamefunc_Quick_Save,
gamefunc_Quick_Load, gamefunc_Quick_Load,
gamefunc_Third_Person_View,
gamefunc_Toggle_Crouch, // TODO: Implement properly for mp gamefunc_Toggle_Crouch, // TODO: Implement properly for mp
}; };
#ifdef __cplusplus #ifdef __cplusplus

View file

@ -6478,9 +6478,9 @@ FAKE_F3:
} }
} }
if (KB_UnBoundKeyPressed(sc_F7)) if (BUTTON(gamefunc_Third_Person_View))
{ {
KB_ClearKeyDown(sc_F7); CONTROL_ClearButton(gamefunc_Third_Person_View);
if (!RRRA || (!g_player[myconnectindex].ps->on_motorcycle && !g_player[myconnectindex].ps->on_boat)) if (!RRRA || (!g_player[myconnectindex].ps->on_motorcycle && !g_player[myconnectindex].ps->on_boat))
{ {
@ -8873,4 +8873,6 @@ static void G_SetupGameButtons(void)
CONTROL_DefineFlag(gamefunc_Last_Weapon,FALSE); CONTROL_DefineFlag(gamefunc_Last_Weapon,FALSE);
CONTROL_DefineFlag(gamefunc_Quick_Save, FALSE); CONTROL_DefineFlag(gamefunc_Quick_Save, FALSE);
CONTROL_DefineFlag(gamefunc_Quick_Load, FALSE); CONTROL_DefineFlag(gamefunc_Quick_Load, FALSE);
CONTROL_DefineFlag(gamefunc_Third_Person_View, FALSE);
CONTROL_DefineFlag(gamefunc_Toggle_Crouch, FALSE);
} }