mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 00:41:55 +00:00
Add gamefunc_Alt_Weapon and EVENT_ALTWEAPON back in
git-svn-id: https://svn.eduke32.com/eduke32@7771 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
dc9c7bc7b0
commit
4c290ab4ec
7 changed files with 14 additions and 1 deletions
|
@ -114,6 +114,7 @@ char gamefunctions[NUMGAMEFUNCTIONS][MAXGAMEFUNCLEN] =
|
|||
"Last_Used_Weapon",
|
||||
"Quick_Save",
|
||||
"Quick_Load",
|
||||
"Alt_Weapon",
|
||||
};
|
||||
|
||||
#ifdef __SETUP__
|
||||
|
@ -180,6 +181,7 @@ const char keydefaults[NUMGAMEFUNCTIONS*2][MAXGAMEFUNCLEN] =
|
|||
"", "",
|
||||
"F6", "",
|
||||
"F9", "",
|
||||
"", "",
|
||||
};
|
||||
|
||||
const char oldkeydefaults[NUMGAMEFUNCTIONS*2][MAXGAMEFUNCLEN] =
|
||||
|
@ -244,6 +246,7 @@ const char oldkeydefaults[NUMGAMEFUNCTIONS*2][MAXGAMEFUNCLEN] =
|
|||
"", "",
|
||||
"F6", "",
|
||||
"F9", "",
|
||||
"", "",
|
||||
};
|
||||
|
||||
static const char * mousedefaults[MAXMOUSEBUTTONS] =
|
||||
|
|
|
@ -141,6 +141,7 @@ enum GameEvent_t {
|
|||
EVENT_EXITGAMESCREEN,
|
||||
EVENT_EXITPROGRAMSCREEN,
|
||||
EVENT_ALTFIRE,
|
||||
EVENT_ALTWEAPON,
|
||||
EVENT_DISPLAYOVERHEADMAPPLAYER,
|
||||
EVENT_MENUCURSORLEFT,
|
||||
EVENT_MENUCURSORRIGHT,
|
||||
|
|
|
@ -34,7 +34,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define NUMGAMEFUNCTIONS 60
|
||||
#define NUMGAMEFUNCTIONS 61
|
||||
#define MAXGAMEFUNCLEN 32
|
||||
|
||||
extern char gamefunctions[NUMGAMEFUNCTIONS][MAXGAMEFUNCLEN];
|
||||
|
@ -103,6 +103,7 @@ enum GameFunction_t
|
|||
gamefunc_Last_Weapon,
|
||||
gamefunc_Quick_Save,
|
||||
gamefunc_Quick_Load,
|
||||
gamefunc_Alt_Weapon,
|
||||
};
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -7239,4 +7239,5 @@ static void G_SetupGameButtons(void)
|
|||
CONTROL_DefineFlag(gamefunc_Last_Weapon,FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Quick_Save, FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Quick_Load, FALSE);
|
||||
CONTROL_DefineFlag(gamefunc_Alt_Weapon,FALSE);
|
||||
}
|
||||
|
|
|
@ -968,6 +968,7 @@ const char *EventNames[MAXEVENTS] =
|
|||
"EVENT_EXITGAMESCREEN",
|
||||
"EVENT_EXITPROGRAMSCREEN",
|
||||
"EVENT_ALTFIRE",
|
||||
"EVENT_ALTWEAPON",
|
||||
"EVENT_DISPLAYOVERHEADMAPPLAYER",
|
||||
"EVENT_MENUCURSORLEFT",
|
||||
"EVENT_MENUCURSORRIGHT",
|
||||
|
|
|
@ -3030,7 +3030,10 @@ void P_GetInput(int const playerNum)
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
if (BUTTON(gamefunc_Last_Weapon))
|
||||
weaponSelection = 14;
|
||||
else if (BUTTON(gamefunc_Alt_Weapon))
|
||||
weaponSelection = 13;
|
||||
else if (BUTTON(gamefunc_Next_Weapon) || (BUTTON(gamefunc_Dpad_Select) && input.fvel > 0))
|
||||
weaponSelection = 12;
|
||||
|
|
|
@ -2655,6 +2655,9 @@ CHECKINV1:
|
|||
weaponNum = VM_OnEventWithReturn(EVENT_NEXTWEAPON,pPlayer->i,playerNum, weaponNum);
|
||||
break;
|
||||
case 12:
|
||||
weaponNum = VM_OnEventWithReturn(EVENT_ALTWEAPON,pPlayer->i,playerNum, weaponNum);
|
||||
break;
|
||||
case 13:
|
||||
weaponNum = VM_OnEventWithReturn(EVENT_LASTWEAPON,pPlayer->i,playerNum, weaponNum);
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue