Is it possible to remove gibs or speed up how quickly they disappear?

Werewolf

Probably not a real Werewolf
aa
Apr 12, 2011
873
309
I'm trying to find a way, if possible, to remove the gibs generated when players or props explode from specific areas of a map for optimization purposes. So no messing with tf_playergib. I know all gibs fade away after a few seconds anyway, but I want to remove them as soon as they are spawn or at least quicker than default time afterward. Like I said, it's for optimization purposes.

The obvious solution would be to use a trigger_remove brush but that doesn't remove everything. When bots stood inside the brush are killed, the ammo box and the bots weapon both gets removed, but the gibs of the bot still remain. Of course I have checked that the right flags are set correctly, but for reference:
TIpPYyb.png


I also tried teleporting the gibs with a trigger_teleport (also set like above) to move all gives to an off map area away from where players might render them. That didn't even move the ammo box or weapon.

Lastly I tried using a trigger_push just to see if I could at least move them that way, and the answer was 'No'. That also didn't move a thing.

So here's my question. Is it possible to remove gibs or speed up how quickly they disappear? As I said before, I'm not looking to disable them server wide via tf_playergibs, just ideally in specific areas
 

fubarFX

The "raw" in "nodraw"
aa
Jun 1, 2009
1,720
1,978
The way gibs and ragdolls work is they are completely clientside. You can't really have the server/map interacting with these things that only exist for the client. The reason why ammo boxes do disappear is because they do exist on the server since the server is tracking your ammo. gibs however don't do anything so there's no reason why the server should keep track of them. They only exist for the client and everyone is calculating their physics on their machine. now that being said, I know that you can have serverside ragdolls and possibly serverside gibs so maybe there's something you can figure out but you'll never be able to interact with the regular player gibs.
 

Tacoman_

L1: Registered
Nov 19, 2014
31
53
Maybe you could try a workaround for exploding a player without any gibs

If you set the damage type to "4194304", it might remove the ragdoll after the trigger kills someone. (You have to disable smartedit to be able to type in custom damage stuff. I am also not 100% sure it will work - but for science)

You could then add bloody particles to simulate the gibbing in a way you can control.
 

Werewolf

Probably not a real Werewolf
aa
Apr 12, 2011
873
309
Maybe you could try a workaround for exploding a player without any gibs

If you set the damage type to "4194304", it might remove the ragdoll after the trigger kills someone. (You have to disable smartedit to be able to type in custom damage stuff. I am also not 100% sure it will work - but for science)

You could then add bloody particles to simulate the gibbing in a way you can control.
I presume that's the dissolving damage as seen when using the bison? Problem is I'm not using a trigger_hurt to kill players. Heck for testing I just went demoman and peppered a bot with stickies.
 

Benoist3012

L3: Member
Dec 25, 2015
148
207
What you can do is put a big trigger_multiple, create a point server command, set tf_playergib on 0 with OnEndOutch output from the trigger, and set it back 1 right after.
I'm not sure if the ragdoll spawns before or after the player fires all the end touch functions on death. It's not perfect, and maybe cause some players who died in same time and not in the same area no to gib, but it's worth a shot.
 

Werewolf

Probably not a real Werewolf
aa
Apr 12, 2011
873
309
What you can do is put a big trigger_multiple, create a point server command, set tf_playergib on 0 with OnEndOutch output from the trigger, and set it back 1 right after.
I'm not sure if the ragdoll spawns before or after the player fires all the end touch functions on death. It's not perfect, and maybe cause some players who died in same time and not in the same area no to gib, but it's worth a shot.
So no messing with tf_playergib.
 

Benoist3012

L3: Member
Dec 25, 2015
148
207
I know and I saw it, but you will have to, because when a tf_ragdoll entity is created, it's only made to tell the client what to do, when spawning the ragdoll on your clientside.

Code:
CTFRagdoll (type DT_TFRagdoll)
Member: m_vecRagdollOrigin (offset 1188) (type vector) (bits 0) (CoordMP)
Member: m_iPlayerIndex (offset 1172) (type integer) (bits 7) (Unsigned)
Member: m_vecForce (offset 868) (type vector) (bits 0) (NoScale)
Member: m_vecRagdollVelocity (offset 1176) (type vector) (bits 13) (RoundDown)
Member: m_nForceBone (offset 864) (type integer) (bits 32) ()
Member: m_bGib (offset 1200) (type integer) (bits 1) (Unsigned)
Member: m_bBurning (offset 1201) (type integer) (bits 1) (Unsigned)
Member: m_bElectrocuted (offset 1202) (type integer) (bits 1) (Unsigned)
Member: m_bFeignDeath (offset 1203) (type integer) (bits 1) (Unsigned)
Member: m_bWasDisguised (offset 1204) (type integer) (bits 1) (Unsigned)
Member: m_bBecomeAsh (offset 1205) (type integer) (bits 1) (Unsigned)
Member: m_bOnGround (offset 1206) (type integer) (bits 1) (Unsigned)
Member: m_bCloaked (offset 1207) (type integer) (bits 1) (Unsigned)
Member: m_iDamageCustom (offset 1208) (type integer) (bits 32) ()
Member: m_iTeam (offset 1212) (type integer) (bits 3) (Unsigned)
Member: m_iClass (offset 1216) (type integer) (bits 4) (Unsigned)
Table: m_hRagWearables (offset 0) (type _ST_m_hRagWearables_8)
So unless there is a way to set m_bGib on false, before the ragdoll is even dispatched, or make CTFPlayer::ShouldGib returns false, you can't force a specific ragdoll not to gib, (unless you use the method I showed you, and I doubt there is another way to do it).

Btw, no need to answer my previous post with a quote, instead you should have said why you don't want to use it, because for now, nobody sees why you can't use it.