Fix edx and __cdecl bug
This commit is contained in:
parent
38adae2c75
commit
d270e08a22
@ -58,10 +58,13 @@ namespace Components
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Bots::PlayerCmd_setSpawnWeapon_Func(Game::gentity_t* ent, int wpIdx)
|
void __cdecl Bots::PlayerCmd_setSpawnWeapon_Func(Game::gentity_t* ent, int wpIdx)
|
||||||
|
{
|
||||||
|
if (Game::svs->clients[ent->s.number].bot)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
__declspec(naked) void Bots::PlayerCmd_setSpawnWeapon_Stub()
|
__declspec(naked) void Bots::PlayerCmd_setSpawnWeapon_Stub()
|
||||||
{
|
{
|
||||||
@ -70,7 +73,8 @@ namespace Components
|
|||||||
push edx;
|
push edx;
|
||||||
push esi;
|
push esi;
|
||||||
call PlayerCmd_setSpawnWeapon_Func;
|
call PlayerCmd_setSpawnWeapon_Func;
|
||||||
add esp, 8;
|
add esp, 4;
|
||||||
|
pop edx; // __cdecl reqires edx be caller saved
|
||||||
|
|
||||||
// go back
|
// go back
|
||||||
mov eax, [esi + 0x158];
|
mov eax, [esi + 0x158];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user