Forum Thread
by member
  Posts  
HL1: How to disable gibbing in a mod? (Forums : Coding & Scripting : HL1: How to disable gibbing in a mod?) Locked
Thread Options
Sep 23 2012, 4:32pm Anchor

How can I disable gibbing in a Half-Life 1 mod? Example: When you kill a zombie with a grenade, it's body disappears and gibs fly everywhere. I want it so that when you throw a grenade at it it just falls to the ground; as if you shot it.

TKAzA
TKAzA Community Manager
Sep 23 2012, 6:18pm Anchor

if theres not a option, id doubt you would be able to however do check their site there may be a console option like sv_gibs or somthing along those lines.

Sep 24 2012, 4:08am Anchor

Put this in your autoexec.cfg

violence_hgibs 0
violence_agibs 0

Sep 24 2012, 5:42pm Anchor
Minuit wrote:Put this in your autoexec.cfg

violence_hgibs 0
violence_agibs 0


I've tried that but instead of them just dying like normal, the model fades away without playing the death animation.

Sep 25 2012, 3:58am Anchor

You're able to compile code, right? If so, go to BOOL CBaseMonster::ShouldGibMonster( int iGib ) in cbasemonster and put return FALSE; before the other code in that function.

Sep 25 2012, 3:36pm Anchor
Minuit wrote:You're able to compile code, right? If so, go to BOOL CBaseMonster::ShouldGibMonster( int iGib ) in cbasemonster and put return FALSE; before the other code in that function.

I put

cpp code:
  BOOL     ShouldGibMonster( int iGib ) {return FALSE; };

But it displays errors:
error C2084: function 'int __thiscall CBaseMonster::ShouldGibMonster(int)' already has a body
error C2264: 'ShouldGibMonster' : error in function definition or declaration; function not called
error C2264: 'ShouldGibMonster' : error in function definition or declaration; function not called

Thanks for helping me

Sep 26 2012, 4:06am Anchor

Undo your change. Go to combat.cpp and edit the existing ShouldGibMonster function like this:

cpp code:
BOOL CBaseMonster::ShouldGibMonster( int iGib )
{
  // Minuit
  return FALSE;

  if ( ( iGib == GIB_NORMAL &amp;&amp; pev->health < GIB_HEALTH_VALUE ) || ( iGib == GIB_ALWAYS ) )
    return TRUE;
 
  return FALSE;
}

Edited by: Minuit

Sep 26 2012, 11:10am Anchor
Minuit wrote:Undo your change. Go to combat.cpp and edit the existing ShouldGibMonster function like this:

cpp code:
BOOL CBaseMonster::ShouldGibMonster( int iGib )
{
  // Minuit
  return FALSE;

  if ( ( iGib == GIB_NORMAL &amp;&amp; pev->health < GIB_HEALTH_VALUE ) || ( iGib == GIB_ALWAYS ) )
    return TRUE;
 
  return FALSE;
}

It worked! Thanks!

Reply to Thread
click to sign in and post

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.