Fixing trigger gravity: Difference between revisions
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...") |
No edit summary |
||
Line 1: | Line 1: | ||
Currently the [[Trigger_gravity|trigger_gravity]] brush entity doesn't actually function properly. | Currently the [[Trigger_gravity|trigger_gravity]] brush entity doesn't actually function properly. | ||
To fix gravity triggers, navigate to triggers.cpp, around line 2679 | To fix gravity triggers, navigate to triggers.cpp, around line 2679 you should find this: | ||
<syntaxhighlight lang="cpp"> | <syntaxhighlight lang="cpp"> | ||
Line 14: | Line 14: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
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. | [[Trigger_gravity|trigger_gravity]] should work fine now on players, but still won't change a physics object's gravity. |
Revision as of 05:25, 5 January 2018
Currently the trigger_gravity brush entity doesn't actually function properly.
To fix gravity triggers, navigate to triggers.cpp, around line 2679 you should find this:
void CTriggerGravity::GravityTouch( CBaseEntity *pOther )
{
// Only save on clients
if ( !pOther->IsPlayer() )
return;
pOther->SetGravity( GetGravity() );
}
Either comment out or remove the if-return.
trigger_gravity should work fine now on players, but still won't change a physics object's gravity.