From 0ab19ebe2e3a399390b4ffbcef5f6499bf355839 Mon Sep 17 00:00:00 2001 From: Nicholas Hastings Date: Thu, 28 Oct 2010 11:47:23 -0700 Subject: [PATCH] Fixed ENTINDEX and INDEXENT in utils.h (bug 4685, r=ds). --- 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; }