mirror of
https://github.com/fabiangreffrath/woof.git
synced 2025-09-23 12:04:38 -04:00
More death use reload fixes (#1938)
* Prevent double reload with "death use" * Don't crash if "death use" save is deleted
This commit is contained in:
parent
7b636710ac
commit
ed349ec34e
@ -656,9 +656,9 @@ static boolean FilterDeathUseAction(void)
|
||||
return true;
|
||||
case death_use_reload:
|
||||
if (!demoplayback && !demorecording && !netgame
|
||||
&& !activate_death_use_reload)
|
||||
&& activate_death_use_reload == 0)
|
||||
{
|
||||
activate_death_use_reload = true;
|
||||
activate_death_use_reload = 2;
|
||||
}
|
||||
return true;
|
||||
default:
|
||||
@ -953,7 +953,6 @@ void G_ClearInput(void)
|
||||
I_ResetRelativeMouseState();
|
||||
I_ResetAllRumbleChannels();
|
||||
WS_Reset();
|
||||
activate_death_use_reload = false;
|
||||
}
|
||||
|
||||
//
|
||||
@ -1066,6 +1065,8 @@ static void G_DoLoadLevel(void)
|
||||
// Set the initial listener parameters using the player's initial state.
|
||||
S_InitListener(players[displayplayer].mo);
|
||||
|
||||
activate_death_use_reload = 0;
|
||||
|
||||
// clear cmd building stuff
|
||||
memset (gamekeydown, 0, sizeof(gamekeydown));
|
||||
G_ClearInput();
|
||||
|
@ -817,6 +817,11 @@ static void M_DeleteGame(int i)
|
||||
quickSaveSlot = -1;
|
||||
}
|
||||
|
||||
if (i == savegameslot)
|
||||
{
|
||||
savegameslot = -1;
|
||||
}
|
||||
|
||||
M_ReadSaveStrings();
|
||||
|
||||
if (name)
|
||||
|
@ -257,7 +257,7 @@ void P_MovePlayer (player_t* player)
|
||||
#define ANG5 (ANG90/18)
|
||||
|
||||
death_use_action_t death_use_action;
|
||||
boolean activate_death_use_reload;
|
||||
int activate_death_use_reload;
|
||||
|
||||
//
|
||||
// P_DeathThink
|
||||
@ -318,8 +318,10 @@ void P_DeathThink (player_t* player)
|
||||
player->playerstate = PST_REBORN;
|
||||
}
|
||||
|
||||
if (activate_death_use_reload)
|
||||
if (activate_death_use_reload == 2)
|
||||
{
|
||||
activate_death_use_reload = 1;
|
||||
|
||||
if (savegameslot >= 0)
|
||||
{
|
||||
char *file = G_SaveGameName(savegameslot);
|
||||
|
@ -41,7 +41,7 @@ typedef enum
|
||||
} death_use_action_t;
|
||||
|
||||
extern death_use_action_t death_use_action;
|
||||
extern boolean activate_death_use_reload;
|
||||
extern int activate_death_use_reload;
|
||||
|
||||
extern boolean onground; // whether player is on ground or in air
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user