mirror of
https://github.com/alliedmodders/sourcemod.git
synced 2025-12-06 18:08:36 +00:00
Argbuf Native_TakeDamage
This commit is contained in:
parent
257535daf2
commit
059625cac9
@ -201,13 +201,7 @@ cell_t Native_TakeDamage(IPluginContext *pContext, const cell_t *params)
|
||||
pCall = g_pBinTools->CreateVCall(offset, 0, 0, &pass[1], &pass[0], 1);
|
||||
}
|
||||
|
||||
// Can't ArgBuffer here until we upgrade our Clang version on the Linux builder
|
||||
unsigned char vstk[sizeof(CBaseEntity *) + sizeof(CTakeDamageInfoHack &)];
|
||||
unsigned char* vptr = vstk;
|
||||
|
||||
*(CBaseEntity **)vptr = pVictim;
|
||||
vptr += sizeof(CBaseEntity *);
|
||||
*(CTakeDamageInfoHack *&)vptr = info;
|
||||
ArgBuffer<CBaseEntity*, CTakeDamageInfoHack&> vstk(pVictim, info);
|
||||
|
||||
int ret;
|
||||
pCall->Execute(vstk, &ret);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user