Disabling fire on entities sounds like a rather simple thing to do, but turns out it isn't.
Significant investigation, trial and error have turned up very few results.
Initial Problem: Igniting entities that are stacked on top of eachother (100+) causes significant amounts of lag. Seems to be related to fire spreading, as having a large number of entities within that range is required to cause the server lag.
Solution Used:
[lua]
function GM:EntityTakeDamage( ent,dmginfo )
CreateAdjustTimer( tostring(ent).."_FixFireLag",0.1,1,function() if(!IsValid( ent ) ) then return end
if( ent:IsOnFire() ) then
ent:TrueExtinguish()
end
end )
end
[/lua]
New Problem: When rapidly applying fire, the entity may reach a state where it appears to be on fire to the client, yet ent:IsOnFire() returns false and the entity neither spreads fire nor takes fire damage from it.
If you remove the entity while it is in this state, it will leave behind a permanent fire entity (class "entityflame") on the client.
When attempting to remove this entity, the client console gives a message like "You cannot remove server-side entities on the client".
This entity (collected by either the :EntIndex or found from ents.FindInSphere()) does appear on the client, but is NULL/invalid/doesn't exist on the server.
If the original entity is re-ignited while in that state, the "permanent fire" glitch is sometimes resolved. This is rather unreliable for an already very hacky method of preventing entities catching fire.
One might say, overwrite the ENTITY:Ignite() function.
This has already been done with little success.
Overwriting ENTITY:Fire() to catch for ignite commands also gives little success.
Issue remains that anything that causes explosive damage seems to ignite entities regardless of what you try to do, which then leads to either the permanent fire problem, or the fire-lag problem.
Adjusting server cvars fire_dmgbase, fire_growthrate and fire_dmginterval do not appear to effect the fire-lag problem, nor the permanent fire problem.
Suggestions?
I would say don't use Ignite at all, spawn env_fire instead.
[QUOTE=Netheous;50446952]I would say don't use Ignite at all, spawn env_fire instead.[/QUOTE]
[QUOTE=Pyro-Fire;50446920]
Issue remains that anything that causes explosive damage seems to ignite entities regardless of what you try to do, which then leads to either the permanent fire problem, or the fire-lag problem.
[/QUOTE]
Y'know, like m9k weapons, sexxyness (workshop), virtually any kind of explosive weapon will cause entities to ignite.
This is the problem.
*Edit, here's a gif illustrating an entity catching fire from an explosion.
[img]https://i.gyazo.com/dc3a06390fc56f8ad973185e54c7a598.gif[/img]
Shameless Bump.
Problem: Stacked Props (100+) set on fire by ENT:Ignite() or via explosions (util.BlastDamage, env_explosion or env_physexplosion entities) causes significant server-side lag.
Suggestions?
Sorry, you need to Log In to post a reply to this thread.