Raised This Month: $51 Target: $400
 12% 

Toggle for Global corpse physics (CBaseMonster)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Sparktimus
New Member
Join Date: Oct 2021
Old 10-12-2021 , 14:59   Toggle for Global corpse physics (CBaseMonster)
Reply With Quote #1

Was poking around in the HL1 SDK for a wee bit trying to figure out how I could get the same corpse physics that Sven Coop has and stumbled upon this within the combat.cpp under the CBaseMonster lines:

Code:
// make the corpse fly away from the attack vector
pev->movetype = MOVETYPE_TOSS;
// pev->flags &= ~FL_ONGROUND;
// pev->origin.z += 2;
// pev->velocity = g_vecAttackDir * -1;
// pev->velocity = pev->velocity * RANDOM_FLOAT( 300, 400 );
Last four lines are commented out but uncommenting enabled there to be corpse physics similar to Sven's. Why they're disabled is a mystery to me, but I was wondering if it were possible for there to be a cvar or plugin of some kind that could toggle this option, or preferably, enable it by default but with the ability to set your own values. I figure since most goldsrc mods any more have this exact same code mostly untouched, there might be a way to override what's in the original lib.

Last edited by Sparktimus; 10-12-2021 at 15:00.
Sparktimus is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 11:53.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode