mirror of
https://github.com/shavitush/bhoptimer.git
synced 2025-12-07 10:28:26 +00:00
BotAddCommand is thiscall on linux
This commit is contained in:
parent
9e39c10e28
commit
3dc54c8974
@ -49,6 +49,12 @@
|
||||
"linux" "19"
|
||||
"mac" "19"
|
||||
}
|
||||
"BotAddCommand_ThisCall"
|
||||
{
|
||||
"windows" "0"
|
||||
"linux" "1"
|
||||
"mac" "1"
|
||||
}
|
||||
}
|
||||
|
||||
"Addresses"
|
||||
@ -105,6 +111,12 @@
|
||||
"linux" "9"
|
||||
"mac" "9"
|
||||
}
|
||||
"BotAddCommand_ThisCall"
|
||||
{
|
||||
"windows" "0"
|
||||
"linux" "1"
|
||||
"mac" "1"
|
||||
}
|
||||
}
|
||||
|
||||
"Addresses"
|
||||
|
||||
@ -176,6 +176,7 @@ Handle gH_BotAddCommand = INVALID_HANDLE;
|
||||
DynamicDetour gH_MaintainBotQuota = null;
|
||||
int gI_WEAPONTYPE_UNKNOWN = 123123123;
|
||||
int gI_LatestClient = -1;
|
||||
bool gB_BotAddCommand_ThisCall = false;
|
||||
|
||||
// how do i call this
|
||||
bool gB_HideNameChange = false;
|
||||
@ -410,13 +411,15 @@ void LoadDHooks()
|
||||
SetFailState("Failed to load shavit gamedata");
|
||||
}
|
||||
|
||||
StartPrepSDKCall(SDKCall_Static);
|
||||
gB_BotAddCommand_ThisCall = view_as<bool>(gamedata.GetOffset("BotAddCommand_ThisCall"));
|
||||
|
||||
StartPrepSDKCall(gB_BotAddCommand_ThisCall ? SDKCall_Raw : SDKCall_Static);
|
||||
|
||||
if (gEV_Type == Engine_TF2)
|
||||
{
|
||||
if (!PrepSDKCall_SetFromConf(gamedata, SDKConf_Signature, "NextBotCreatePlayerBot<CTFBot>"))
|
||||
{
|
||||
SetFailState("Failed to get CCSBotManager::BotAddCommand");
|
||||
SetFailState("Failed to get NextBotCreatePlayerBot<CTFBot>");
|
||||
}
|
||||
|
||||
PrepSDKCall_AddParameter(SDKType_String, SDKPass_Pointer); // const char *name
|
||||
@ -1506,14 +1509,29 @@ int InternalCreateReplayBot()
|
||||
}
|
||||
else
|
||||
{
|
||||
/*int ret =*/ SDKCall(
|
||||
gH_BotAddCommand,
|
||||
gCV_DefaultTeam.IntValue, // team
|
||||
false, // isFromConsole
|
||||
0, // profileName // unused
|
||||
gI_WEAPONTYPE_UNKNOWN, // CSWeaponType // WEAPONTYPE_UNKNOWN
|
||||
0 // BotDifficultyType // unused
|
||||
);
|
||||
if (gB_BotAddCommand_ThisCall)
|
||||
{
|
||||
/*int ret =*/ SDKCall(
|
||||
gH_BotAddCommand,
|
||||
0x10000, // thisptr // unused
|
||||
gCV_DefaultTeam.IntValue, // team
|
||||
false, // isFromConsole
|
||||
0, // profileName // unused
|
||||
gI_WEAPONTYPE_UNKNOWN, // CSWeaponType // WEAPONTYPE_UNKNOWN
|
||||
0 // BotDifficultyType // unused
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
/*int ret =*/ SDKCall(
|
||||
gH_BotAddCommand,
|
||||
gCV_DefaultTeam.IntValue, // team
|
||||
false, // isFromConsole
|
||||
0, // profileName // unused
|
||||
gI_WEAPONTYPE_UNKNOWN, // CSWeaponType // WEAPONTYPE_UNKNOWN
|
||||
0 // BotDifficultyType // unused
|
||||
);
|
||||
}
|
||||
|
||||
//bool success = (0xFF & ret) != 0;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user