09-01-2025, 11:04 PM
(This post was last modified: 09-01-2025, 11:18 PM by murl. Edited 3 times in total.)
the 1 c4 limit is an OK suggestion, but if you really want to get to the root of the issue, you need to edit the base C4 entity that applies force to prop_physics, weapons, ammo crates, etc.
I tested out a solution myself and it seemed to work pretty well.
In the \ttt_c4\shared.lua, remove the line "dmginfo:SetDamageForce(center - ent:GetPos()" in the ENT:SphereDamage function. C4 will still hurt people through walls exactly as it did before, but it won't apply force to the entities surrounding it.
The only downside is that C4s feel less fun and realistic, but given how much lag and how often the server crashes because of c4s, it might be worth it.
I made a video demo of this in action:
edit: there could be better ways of doing this, this is just a quick fix focused purely on optimization. I'll look into other solutions, like maybe only pushing actual props and ragdolls while ignoring no-collide objects like grenade, ammo, and weapon drops (which are probably causing most of the lag since a lot of maps like Eclipse have a thousand pickups)
I tested out a solution myself and it seemed to work pretty well.
In the \ttt_c4\shared.lua, remove the line "dmginfo:SetDamageForce(center - ent:GetPos()" in the ENT:SphereDamage function. C4 will still hurt people through walls exactly as it did before, but it won't apply force to the entities surrounding it.
The only downside is that C4s feel less fun and realistic, but given how much lag and how often the server crashes because of c4s, it might be worth it.
I made a video demo of this in action:
edit: there could be better ways of doing this, this is just a quick fix focused purely on optimization. I'll look into other solutions, like maybe only pushing actual props and ragdolls while ignoring no-collide objects like grenade, ammo, and weapon drops (which are probably causing most of the lag since a lot of maps like Eclipse have a thousand pickups)
