Browse Source

stop shaking camera if dead diablo loaded from save. (#4149)

pull/5683/head^2
DakkJaniels 3 years ago committed by GitHub
parent
commit
d683039bdd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 13
      Source/diablo.cpp
  2. 1
      Source/diablo.h
  3. 2
      Source/loadsave.cpp

13
Source/diablo.cpp

@ -789,7 +789,7 @@ void RunGameLoop(interface_mode uMsg)
EventHandler previousHandler = SetEventHandler(GameEventHandler); EventHandler previousHandler = SetEventHandler(GameEventHandler);
run_delta_info(); run_delta_info();
gbRunGame = true; gbRunGame = true;
gbProcessPlayers = true; gbProcessPlayers = IsDiabloAlive(true);
gbRunGameResult = true; gbRunGameResult = true;
RedrawEverything(); RedrawEverything();
@ -2980,4 +2980,15 @@ void diablo_color_cyc_logic()
} }
} }
bool IsDiabloAlive(bool playSFX)
{
if (Quests[Q_DIABLO]._qactive == QUEST_DONE && !gbIsMultiplayer) {
if (playSFX)
PlaySFX(USFX_DIABLOD);
return false;
}
return true;
}
} // namespace devilution } // namespace devilution

1
Source/diablo.h

@ -94,6 +94,7 @@ void diablo_focus_unpause();
bool PressEscKey(); bool PressEscKey();
void DisableInputEventHandler(const SDL_Event &event, uint16_t modState); void DisableInputEventHandler(const SDL_Event &event, uint16_t modState);
void LoadGameLevel(bool firstflag, lvl_entry lvldir); void LoadGameLevel(bool firstflag, lvl_entry lvldir);
bool IsDiabloAlive(bool playSFX);
/** /**
* @param bStartup Process additional ticks before returning * @param bStartup Process additional ticks before returning

2
Source/loadsave.cpp

@ -2212,7 +2212,7 @@ void LoadGame(bool firstflag)
missiles_process_charge(); missiles_process_charge();
RedoMissileFlags(); RedoMissileFlags();
NewCursor(CURSOR_HAND); NewCursor(CURSOR_HAND);
gbProcessPlayers = true; gbProcessPlayers = IsDiabloAlive(!firstflag);
if (gbIsHellfireSaveGame != gbIsHellfire) { if (gbIsHellfireSaveGame != gbIsHellfire) {
SaveGame(); SaveGame();

Loading…
Cancel
Save