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

Function StartScripts

src/saveload/afterload.cpp:540–553  ·  view source on GitHub ↗

* Start the scripts. */

Source from the content-addressed store, hash-verified

538 * Start the scripts.
539 */
540static void StartScripts()
541{
542 /* Script debug window requires AIs to be started before trying to start GameScript. */
543
544 /* Start the AIs. */
545 for (const Company *c : Company::Iterate()) {
546 if (Company::IsValidAiID(c->index)) AI::StartNew(c->index);
547 }
548
549 /* Start the GameScript. */
550 Game::StartNew();
551
552 ShowScriptDebugWindowIfScriptError();
553}
554
555/**
556 * Perform a (large) amount of savegame conversion *magic* in order to

Callers 1

AfterLoadGameFunction · 0.85

Calls 1

Tested by

no test coverage detected