mirror of
https://github.com/alliedmodders/amxmodx.git
synced 2024-12-25 06:15:37 +03:00
changed is_valid_ent
This commit is contained in:
parent
39070081d1
commit
9e8f380121
@ -5,14 +5,18 @@ int is_ent_valid(int iEnt)
|
|||||||
if (iEnt < 1 || iEnt > gpGlobals->maxEntities)
|
if (iEnt < 1 || iEnt > gpGlobals->maxEntities)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (iEnt >= 1 && iEnt <= gpGlobals->maxClients)
|
if (iEnt <= gpGlobals->maxClients)
|
||||||
|
{
|
||||||
if (!MF_IsPlayerIngame(iEnt))
|
if (!MF_IsPlayerIngame(iEnt))
|
||||||
|
{
|
||||||
return 0;
|
return 0;
|
||||||
|
}
|
||||||
edict_t *pEnt = INDEXENT2(iEnt);
|
} else {
|
||||||
|
if (FNullEnt(INDEXENT(iEnt)))
|
||||||
if (FNullEnt(pEnt))
|
{
|
||||||
return 0;
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user