MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / TestEmergency

Method TestEmergency

src/gamelog.cpp:364–373  ·  view source on GitHub ↗

* Finds out if current game is a loaded emergency savegame. */

Source from the content-addressed store, hash-verified

362 * Finds out if current game is a loaded emergency savegame.
363 */
364bool Gamelog::TestEmergency()
365{
366 for (const LoggedAction &la : this->data->action) {
367 for (const auto &lc : la.change) {
368 if (lc->ct == GLCT_EMERGENCY) return true;
369 }
370 }
371
372 return false;
373}
374
375/**
376 * Logs a change in game revision

Callers 3

HandleCrashFunction · 0.80
ExceptionHandlerFunction · 0.80
HandleCrashFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected