Quote:
Originally Posted by lexzor
it's not necessary for safety, it's just a flag that tell the engine the entity must be removed in the next frame
i see you are using remove_entity(ent) so i'm sure you are using engine module, just use remove_entity and set the entity next think in order to remove it from the world.
|
PHP Code:
public remove_all_bh(id)
{
new ent = 33;
while((ent = find_ent_by_class(ent, gBlackHoleModel)) != 0) {
if( entity_get_edict(ent, EV_ENT_owner) != id )
continue;
set_pev(ent, pev_flags, FL_KILLME)
remove_entity(ent);
}
}
-->
PHP Code:
public remove_all_bh(id)
{
new ent = 33;
while((ent = find_ent_by_class(ent, gBlackHoleModel)) != 0) {
if( entity_get_edict(ent, EV_ENT_owner) != id )
continue;
set_pev(ent, pev_nextthink, get_gametime() + 0.1);
}
}
something like this?