fix tf2 linux bot creation

This commit is contained in:
rtldg 2021-09-05 15:30:44 +00:00
parent f88885bafc
commit 6e3bd85c14

View File

@ -523,10 +523,10 @@ void LoadDHooks()
gB_Linux = (gamedata.GetOffset("OS") == 2); gB_Linux = (gamedata.GetOffset("OS") == 2);
StartPrepSDKCall(gB_Linux ? SDKCall_Raw : SDKCall_Static);
if (gEV_Type == Engine_TF2) if (gEV_Type == Engine_TF2)
{ {
StartPrepSDKCall(SDKCall_Static);
if (!PrepSDKCall_SetFromConf(gamedata, SDKConf_Signature, "NextBotCreatePlayerBot<CTFBot>")) if (!PrepSDKCall_SetFromConf(gamedata, SDKConf_Signature, "NextBotCreatePlayerBot<CTFBot>"))
{ {
SetFailState("Failed to get NextBotCreatePlayerBot<CTFBot>"); SetFailState("Failed to get NextBotCreatePlayerBot<CTFBot>");
@ -543,6 +543,8 @@ void LoadDHooks()
} }
else else
{ {
StartPrepSDKCall(gB_Linux ? SDKCall_Raw : SDKCall_Static);
if (!PrepSDKCall_SetFromConf(gamedata, SDKConf_Signature, "CCSBotManager::BotAddCommand")) if (!PrepSDKCall_SetFromConf(gamedata, SDKConf_Signature, "CCSBotManager::BotAddCommand"))
{ {
SetFailState("Failed to get CCSBotManager::BotAddCommand"); SetFailState("Failed to get CCSBotManager::BotAddCommand");