(09-02-2025, 08:54 PM)chibill Wrote: Weridly SetDamageForce doesn't actually apply force to players. https://wiki.facepunch.com/gmod/CTakeDam...amageForce See note on the wikiYeah I tested murl's fix and from my experience (and what intuition is telling me) its definitely the env_physexplosion. it's the same entity that causes discombobulators to push props. the problem is if you remove the physexplosion players don't get jostled around by the c4 anymore. working on a potential fix rn
Likely it would be best to just remove it since the ENT:SphereDamage function only affects players since it uses player.Iterator()
Entities appear to be shoved by the PhsyExplosion
https://github.com/Facepunch/garrysmod/blob/master/garrysmod/gamemodes/terrortown/entities/entities/ttt_c4/shared.lua#L255
Asked over in the Garry's Mod discord to see if there is some reason this is even called. Since it honestly makes no sense at all to apply the damage force to players when it says it doesn't affect players. (And the loop only goes thru players.)
EDIT: According to someone over on the Gmod Discord its used to make sure players rag dolls fly out from the explosion. Otherwise it doesn't actual affect the players and also never touches the props (since the loop only goes thru players)
https://steamcommunity.com/sharedfiles/f...3561317852
feel free anyone to subscribe to this and test it out.
Beforehand C4 created a giant physics explosion with a magnitude of 200 for all props within a 1000-unit radius that ignored LOS
this attempts to alleviate the problem by lowering the magnitude to 1.
essentially this means that players still get the aimpunch effect when they're within 750-1000 units of a c4 (non-damaging/knockback range) Props within the 750-unit explosion range still get pushed by the explosion but only if they are within LOS of the c4.
the only side effect that this might have besides potentially less cinematic explosions is players within this 750-1000 unit range will take less actual knockback from the c4 but that kind of seems like a non-issue
