1
0
Fork 0

Fix: [Script] Set DummyAI Api version to last available (#13610)

pull/13641/head
SamuXarick 2025-02-22 11:58:29 +00:00 committed by GitHub
parent b13922fb48
commit 847fbe3348
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -99,7 +99,7 @@ template <> SQInteger PushClassName<AIInfo, ScriptType::AI>(HSQUIRRELVM vm) { sq
SQUserPointer instance;
sq_getinstanceup(vm, 2, &instance, nullptr);
AIInfo *info = (AIInfo *)instance;
info->api_version = fmt::format("{}.{}", GB(_openttd_newgrf_version, 28, 4), GB(_openttd_newgrf_version, 24, 4));
info->api_version = *std::rbegin(AIInfo::ApiVersions);
SQInteger res = ScriptInfo::Constructor(vm, info);
if (res != 0) return res;