Attempted fix for amb1648 - stack corruption when GetClientEyeAngles() is called on Windows
--HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402124
This commit is contained in:
parent
7a968cb33c
commit
c5330c73b7
@ -160,12 +160,12 @@ bool SetupGetEyeAngles()
|
|||||||
int offset;
|
int offset;
|
||||||
if (g_pGameConf->GetOffset("EyeAngles", &offset))
|
if (g_pGameConf->GetOffset("EyeAngles", &offset))
|
||||||
{
|
{
|
||||||
PassInfo info[2];
|
PassInfo info[1];
|
||||||
info[0].flags = info[1].flags = PASSFLAG_BYVAL;
|
info[0].flags = PASSFLAG_BYVAL;
|
||||||
info[0].size = info[1].size = sizeof(void *);
|
info[0].size = sizeof(void *);
|
||||||
info[0].type = info[1].type = PassType_Basic;
|
info[0].type = PassType_Basic;
|
||||||
|
|
||||||
s_EyeAngles.call = g_pBinTools->CreateVCall(offset, 0, 0, &info[0], &info[1], 1);
|
s_EyeAngles.call = g_pBinTools->CreateVCall(offset, 0, 0, info, NULL, 0);
|
||||||
|
|
||||||
if (s_EyeAngles.call != NULL)
|
if (s_EyeAngles.call != NULL)
|
||||||
{
|
{
|
||||||
@ -190,7 +190,6 @@ bool GetEyeAngles(CBaseEntity *pEntity, QAngle *pAngles)
|
|||||||
unsigned char *vptr = params;
|
unsigned char *vptr = params;
|
||||||
|
|
||||||
*(CBaseEntity **)vptr = pEntity;
|
*(CBaseEntity **)vptr = pEntity;
|
||||||
vptr += sizeof(CBaseEntity *);
|
|
||||||
|
|
||||||
s_EyeAngles.call->Execute(params, &pRetAngle);
|
s_EyeAngles.call->Execute(params, &pRetAngle);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user