User:Nullspeak/Sandbox: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(Created page with "Currently the trigger_gravity brush entity doesn't actually function properly. To fix gravity triggers, navigate to triggers.cpp, around line 2679 and fin...")
 
(Blanked the page)
 
Line 1: Line 1:
Currently the [[Trigger_gravity|trigger_gravity]] brush entity doesn't actually function properly.


To fix gravity triggers, navigate to triggers.cpp, around line 2679 and find this:
<syntaxhighlight lang="cpp">
void CTriggerGravity::GravityTouch( CBaseEntity *pOther )
{
// Only save on clients
if ( !pOther->IsPlayer() )
return;
pOther->SetGravity( GetGravity() );
}
</syntaxhighlight>
and either comment out or remove the if-return.
[[Trigger_gravity|trigger_gravity]] should work fine now on players, but still won't change a physics object's gravity.

Latest revision as of 05:25, 5 January 2018