1
0
mirror of https://github.com/alliedmodders/hl2sdk.git synced 2024-12-23 01:59:43 +08:00

Fixed ENTINDEX and INDEXENT in utils.h (bug 4685, r=ds).

--HG--
extra : rebase_source : 3d5b5e9f88e1e7157670e2babc87094cd0113806
This commit is contained in:
Nicholas Hastings 2010-10-28 11:49:23 -07:00
parent f12130c3a9
commit 18bc4916c0

View File

@ -144,7 +144,7 @@ public:
extern CGlobalVars *gpGlobals;
inline int ENTINDEX( edict_t *pEdict)
{
return (int)(pEdict - gpGlobals->baseEdict);
return (int)(pEdict - gpGlobals->pEdicts);
}
int ENTINDEX( CBaseEntity *pEnt );
@ -153,7 +153,7 @@ inline edict_t* INDEXENT( int iEdictNum )
{
if (iEdictNum >= 0 && iEdictNum < gpGlobals->maxEntities)
{
return (edict_t *)(gpGlobals->baseEdict + iEdictNum);
return (edict_t *)(gpGlobals->pEdicts + iEdictNum);
}
return NULL;
}