mirror of
https://github.com/ValveSoftware/source-sdk-2013.git
synced 2025-04-10 12:09:03 +00:00
Add sv_stuck_prop_disable_collisions
► Added sv_stuck_prop_disable_collisions to control whether server ops want to disable collisions for stuck props in walls. Some maps like js_build_puzzle use those mechanics to solve some puzzles.
This commit is contained in:
parent
2533e18427
commit
a08793a34d
1 changed files with 5 additions and 2 deletions
|
@ -64,7 +64,7 @@ extern CBaseEntity *FindPickerEntity( CBasePlayer *pPlayer );
|
|||
ConVar g_debug_doors( "g_debug_doors", "0" );
|
||||
ConVar breakable_disable_gib_limit( "breakable_disable_gib_limit", "0" );
|
||||
ConVar breakable_multiplayer( "breakable_multiplayer", "1" );
|
||||
|
||||
ConVar sv_stuck_prop_disable_collisions( "sv_stuck_prop_disable_collisions", "1", 0, "If non-zero, props like saw blades, harpoons, etc that stick to a wall will not collide with players" );
|
||||
// AI Interaction for being hit by a physics object
|
||||
int g_interactionHitByPlayerThrownPhysObj = 0;
|
||||
int g_interactionPlayerPuntedHeavyObject = 0;
|
||||
|
@ -655,7 +655,10 @@ void CBreakableProp::StickAtPosition( const Vector &stickPosition, const Vector
|
|||
|
||||
VPhysicsGetObject()->EnableMotion( false );
|
||||
AddSpawnFlags( SF_PHYSPROP_ENABLE_ON_PHYSCANNON );
|
||||
SetCollisionGroup( COLLISION_GROUP_INTERACTIVE );
|
||||
if ( sv_stuck_prop_disable_collisions.GetBool() )
|
||||
SetCollisionGroup( COLLISION_GROUP_DEBRIS );
|
||||
else
|
||||
SetCollisionGroup( COLLISION_GROUP_INTERACTIVE );
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
|
Loading…
Reference in a new issue