mirror of
https://github.com/shavitush/bhoptimer.git
synced 2025-12-07 10:28:26 +00:00
fix loop exiting early and error on invalid entity
This commit is contained in:
parent
fb42a370fe
commit
0f7360f374
@ -920,7 +920,7 @@ public any Native_RemoveZone(Handle plugin, int numParams)
|
||||
int ent = gA_ZoneCache[index].iEntity;
|
||||
ClearZoneEntity(index, true);
|
||||
|
||||
if (ent && gA_ZoneCache[index].iForm == ZoneForm_Box) // created by shavit-zones
|
||||
if (ent > MaxClients && gA_ZoneCache[index].iForm == ZoneForm_Box) // created by shavit-zones
|
||||
{
|
||||
AcceptEntityInput(ent, "Kill");
|
||||
}
|
||||
@ -1271,25 +1271,21 @@ public void OnGameFrame()
|
||||
{
|
||||
return; // uhhhhhhhh
|
||||
}
|
||||
break;
|
||||
}
|
||||
case ZoneForm_trigger_multiple:
|
||||
{
|
||||
if (gA_ZoneCache[i].sTarget[0])
|
||||
search_trigger_multiple = true;
|
||||
break;
|
||||
}
|
||||
case ZoneForm_trigger_teleport:
|
||||
{
|
||||
if (gA_ZoneCache[i].sTarget[0])
|
||||
search_trigger_teleport = true;
|
||||
break;
|
||||
}
|
||||
case ZoneForm_func_button:
|
||||
{
|
||||
if (gA_ZoneCache[i].sTarget[0])
|
||||
search_func_button = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user