Add Third Person View gamefunc

git-svn-id: https://svn.eduke32.com/eduke32@7967 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
hendricks266 2019-08-13 09:15:43 +00:00 committed by Christoph Oelckers
parent 6b3a6434e3
commit 5c96fcb334
3 changed files with 8 additions and 3 deletions

View file

@ -115,6 +115,7 @@ char gamefunctions[NUMGAMEFUNCTIONS][MAXGAMEFUNCLEN] =
"Quick_Save", "Quick_Save",
"Quick_Load", "Quick_Load",
"Alt_Weapon", "Alt_Weapon",
"Third_Person_View",
}; };
#ifdef __SETUP__ #ifdef __SETUP__
@ -182,6 +183,7 @@ const char keydefaults[NUMGAMEFUNCTIONS*2][MAXGAMEFUNCLEN] =
"F6", "", "F6", "",
"F9", "", "F9", "",
"", "", "", "",
"F7", "",
}; };
const char oldkeydefaults[NUMGAMEFUNCTIONS*2][MAXGAMEFUNCLEN] = const char oldkeydefaults[NUMGAMEFUNCTIONS*2][MAXGAMEFUNCLEN] =
@ -247,6 +249,7 @@ const char oldkeydefaults[NUMGAMEFUNCTIONS*2][MAXGAMEFUNCLEN] =
"F6", "", "F6", "",
"F9", "", "F9", "",
"", "", "", "",
"F7", "",
}; };
static const char * mousedefaults[MAXMOUSEBUTTONS] = static const char * mousedefaults[MAXMOUSEBUTTONS] =

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 61 #define NUMGAMEFUNCTIONS 62
#define MAXGAMEFUNCLEN 32 #define MAXGAMEFUNCLEN 32
extern char gamefunctions[NUMGAMEFUNCTIONS][MAXGAMEFUNCLEN]; extern char gamefunctions[NUMGAMEFUNCTIONS][MAXGAMEFUNCLEN];
@ -104,6 +104,7 @@ enum GameFunction_t
gamefunc_Quick_Save, gamefunc_Quick_Save,
gamefunc_Quick_Load, gamefunc_Quick_Load,
gamefunc_Alt_Weapon, gamefunc_Alt_Weapon,
gamefunc_Third_Person_View,
}; };
#ifdef __cplusplus #ifdef __cplusplus
} }

View file

@ -4959,9 +4959,9 @@ FAKE_F3:
} }
} }
if (KB_UnBoundKeyPressed(sc_F7)) if (BUTTON(gamefunc_Third_Person_View))
{ {
KB_ClearKeyDown(sc_F7); CONTROL_ClearButton(gamefunc_Third_Person_View);
myplayer.over_shoulder_on = !myplayer.over_shoulder_on; myplayer.over_shoulder_on = !myplayer.over_shoulder_on;
@ -7391,4 +7391,5 @@ static void G_SetupGameButtons(void)
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_Alt_Weapon,FALSE); CONTROL_DefineFlag(gamefunc_Alt_Weapon,FALSE);
CONTROL_DefineFlag(gamefunc_Third_Person_View, FALSE);
} }