Fixed bad error checking routine

This commit is contained in:
David Anderson
2004-10-04 20:32:26 +00:00
parent 766246648d
commit 77aa0f4f8e
8 changed files with 36 additions and 8 deletions

View File

@ -148,6 +148,13 @@ bool ignoreBots (edict_t *pEnt, edict_t *pOther = NULL);
} \
}
#define CHECK_PLAYERRANGE(x) \
if (x > gpGlobals->maxClients || x < 0) \
{ \
MF_LogError(amx, AMX_ERR_NATIVE, "Player out of range (%d)", x); \
return 0; \
}
#define GETEDICT(n) \
((n >= 1 && n <= gpGlobals->maxClients) ? MF_GetPlayerEdict(n) : INDEXENT(n))