Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
limit c4's to 1 purchase per player
#7
(09-02-2025, 06:35 AM)anxelic Wrote:
(09-01-2025, 11:04 PM)murl Wrote: 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)

wow murl is so cool and epic

Something like this or this should be considered!!!

Considered
TTT Trusted - 11/14/2024
Web Mod - 12/29/2024
TTT Tmod - 1/29/2025
TTT Mod - 4/09/2025
TTT Admin - 7/27/2025 - 3/22/2026


Messages In This Thread
limit c4's to 1 purchase per player - by aaaaaaaa - 08-31-2025, 09:25 PM
RE: limit c4's to 1 purchase per player - by murl - 09-01-2025, 11:04 PM
RE: limit c4's to 1 purchase per player - by murl - 09-03-2025, 08:31 AM
RE: limit c4's to 1 purchase per player - by Virunas - 09-02-2025, 05:40 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)

About Us
    This is Dinkleberg's GMod, a gaming community based in Garry's Mod. We have a Trouble in Terrorist Town, Prop Hunt, Murder, and Deathrun Server. Come check them out sometime.