Engine: Fix CHECK_ENTITY() logic error (0 is not a player)
This commit is contained in:
parent
7bf47f90d9
commit
dc73473394
|
@ -204,7 +204,7 @@ void StartFrame_Post();
|
|||
MF_LogError(amx, AMX_ERR_NATIVE, "Entity out of range (%d)", x); \
|
||||
return 0; \
|
||||
} else { \
|
||||
if (x <= gpGlobals->maxClients) { \
|
||||
if (x > 0 && x <= gpGlobals->maxClients) { \
|
||||
if (!MF_IsPlayerIngame(x)) { \
|
||||
MF_LogError(amx, AMX_ERR_NATIVE, "Invalid player %d (not in-game)", x); \
|
||||
return 0; \
|
||||
|
|
Loading…
Reference in New Issue
Block a user