From 18bc4916c032b0d2d26867d9342cbf001075f38a Mon Sep 17 00:00:00 2001 From: Nicholas Hastings Date: Thu, 28 Oct 2010 11:49:23 -0700 Subject: [PATCH] Fixed ENTINDEX and INDEXENT in utils.h (bug 4685, r=ds). --HG-- extra : rebase_source : 3d5b5e9f88e1e7157670e2babc87094cd0113806 --- game/server/util.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/game/server/util.h b/game/server/util.h index ee119fbb..330cd97c 100644 --- a/game/server/util.h +++ b/game/server/util.h @@ -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; }