Forum Thread
  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 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.

Sep 23 2012 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 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 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

	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 Anchor

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

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.