Touch it and die, bail.

This commit is contained in:
Steve Dudenhoeffer
2004-10-20 14:24:54 +00:00
parent f14808e009
commit 89eda75b1f
2 changed files with 6 additions and 0 deletions

View File

@ -19,6 +19,7 @@ inline edict_t* INDEXENT2( int iEdictNum )
else
return (*g_engfuncs.pfnPEntityOfEntIndex)(iEdictNum);
}
#ifdef DONT_TOUCH_THIS_AGAIN_BAIL
#define CHECK_ENTITY(x) \
if (x < 0 || x > gpGlobals->maxEntities) { \
MF_LogError(amx, AMX_ERR_NATIVE, "Entity out of range (%d)", x); \
@ -36,7 +37,9 @@ inline edict_t* INDEXENT2( int iEdictNum )
} \
} \
}
#endif
#define CHECK_ENTITY(x) if (x != 0 && (FNullEnt(INDEXENT2(x)) || x < 0 || x > gpGlobals->maxEntities)) { MF_RaiseAmxError(amx,AMX_ERR_NATIVE); return 0; }
extern AMX_NATIVE_INFO engfunc_natives[];
extern AMX_NATIVE_INFO dllfunc_natives[];
extern AMX_NATIVE_INFO pev_natives[];