Explosion woes, alternate to util.BlastDamage?

Okay, I’ve got a big problem with util.BlastDamage. The explosions ignore props, they effect players and entities on the other side of props like the blastwalls. This is a really big problem for the gamemode I’m making, is there any other way to do radius damage that checks if there’s an open line to the entities around it?

Also it doesn’t apply force to things whats up with that

Try that.

Holy crap I’ve never seen Dragon post here :downs:

So make one of these things with ents.Create() ? What’s this going to do that util.blastfuckdamage won’t?

Env_explosion affects props nearby for sure.

Wait, how are you calling util.BlastDamage? It works perfectly for me, and certainly blows props up and applies force to them.

[editline]08:55AM[/editline]

Env_explosion is an entity that calls util.BlastDamage and emits a light flash and an explosion effect, nothing else.

This is the normal behavior. Maybe you could try placing a Line of Sight test in the takedamage hooks or code explosions of your own. You could also try messing around with the LoS test spawnflag of env_physexplosion to see if it applies to damage as well as physics.

That’s a good idea, can you post a few of the functions I need to use to test the line of sight? I was thinking I’d have to code my own explosions eventually.

As far as I know you won’t need a lot a functions. It’s the math that gets more and more complex depending of how precise you want your test to be.

Basically all you’ll need to do is get the position of your entities and do a **[Util.TraceLine

http://wiki.garrysmod.com/favicon.ico](wiki.garrysmod.com/?title=Util.TraceLine)**. Oh and maybe also **[Ents.FindInSphere

http://wiki.garrysmod.com/favicon.ico](wiki.garrysmod.com/?title=Ents.FindInSphere)**.

If it can help here’s the code of the env_physexplosion entity : http://www.koders.com/cpp/fid1C213FE061B9808CBF2951E58A13502B5287F2C7.aspx?s=env_physexplosion#L774

hm

Should I trace lines to the center of the object? The bounding box? Both?

[editline]11:59PM[/editline]


	// iterate on all entities in the vicinity.
	// I've removed the traceline heuristic from phys explosions. SO right now they will
	// affect entities through walls. (sjb)
	// UNDONE: Try tracing world-only?


oh you cocksuckers