Merge branch 'master' into jgrpp
# Conflicts: # .github/workflows/ci-build.yml # .github/workflows/release.yml # CMakeLists.txt # os/macosx/Info.plist.in # src/fileio.cpp # src/landscape.cpp # src/league_cmd.h # src/saveload/ai_sl.cpp # src/saveload/game_sl.cpp # src/saveload/league_sl.cpp # src/saveload/saveload.cpp
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
#include "../stdafx.h"
|
||||
#include "../debug.h"
|
||||
#include "../network/network.h"
|
||||
#include "../openttd.h"
|
||||
#include "../core/random_func.hpp"
|
||||
|
||||
#include "../script/squirrel_class.hpp"
|
||||
@@ -59,6 +60,11 @@ void AIScannerInfo::RegisterAPI(class Squirrel *engine)
|
||||
|
||||
AIInfo *AIScannerInfo::SelectRandomAI() const
|
||||
{
|
||||
if (_game_mode == GM_MENU) {
|
||||
DEBUG(script, 0, "The intro game should not use AI, loading 'dummy' AI.");
|
||||
return this->info_dummy;
|
||||
}
|
||||
|
||||
uint num_random_ais = 0;
|
||||
for (const auto &item : info_single_list) {
|
||||
AIInfo *i = static_cast<AIInfo *>(item.second);
|
||||
|
||||
Reference in New Issue
Block a user