mirror of
https://github.com/mapbase-source/source-sdk-2013.git
synced 2025-01-14 15:57:59 +03:00
Apply suggestions from code review
This commit is contained in:
parent
f8d3bea87e
commit
715acf4ff5
@ -69,8 +69,8 @@ ConVar physcannon_dmg_glass( "physcannon_dmg_glass", "15" );
|
|||||||
ConVar physcannon_right_turrets( "physcannon_right_turrets", "0" );
|
ConVar physcannon_right_turrets( "physcannon_right_turrets", "0" );
|
||||||
|
|
||||||
#ifdef MAPBASE
|
#ifdef MAPBASE
|
||||||
ConVar sv_player_enable_propsprint("sv_player_enable_propsprint", "0", FCVAR_REPLICATED, "If enabled, allows the player to sprint while holding a physics object" );
|
ConVar sv_player_enable_propsprint("sv_player_enable_propsprint", "0", FCVAR_NONE, "If enabled, allows the player to sprint while holding a physics object" );
|
||||||
ConVar sv_player_enable_gravgun_sprint("sv_player_enable_gravgun_sprint", "0", FCVAR_REPLICATED, "Enables the player to sprint while holding a phys. object with the gravity gun" );
|
ConVar sv_player_enable_gravgun_sprint("sv_player_enable_gravgun_sprint", "0", FCVAR_NONE, "Enables the player to sprint while holding a phys. object with the gravity gun" );
|
||||||
#endif
|
#endif
|
||||||
extern ConVar hl2_normspeed;
|
extern ConVar hl2_normspeed;
|
||||||
extern ConVar hl2_walkspeed;
|
extern ConVar hl2_walkspeed;
|
||||||
@ -1046,22 +1046,21 @@ void CPlayerPickupController::Init( CBasePlayer *pPlayer, CBaseEntity *pObject )
|
|||||||
}
|
}
|
||||||
|
|
||||||
CHL2_Player *pOwner = (CHL2_Player *)ToBasePlayer( pPlayer );
|
CHL2_Player *pOwner = (CHL2_Player *)ToBasePlayer( pPlayer );
|
||||||
#ifndef MAPBASE
|
|
||||||
if ( pOwner )
|
if ( pOwner )
|
||||||
{
|
{
|
||||||
|
#ifndef MAPBASE
|
||||||
pOwner->EnableSprint( false );
|
pOwner->EnableSprint( false );
|
||||||
}
|
|
||||||
|
|
||||||
#else
|
#else
|
||||||
if ( pOwner && sv_player_enable_propsprint.GetBool() == false )
|
if ( sv_player_enable_propsprint.GetBool() == false )
|
||||||
{
|
{
|
||||||
pOwner->EnableSprint( false );
|
pOwner->EnableSprint( false );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
pOwner->EnableSprint( true );
|
pOwner->EnableSprint( true );
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
// If the target is debris, convert it to non-debris
|
// If the target is debris, convert it to non-debris
|
||||||
if ( pObject->GetCollisionGroup() == COLLISION_GROUP_DEBRIS )
|
if ( pObject->GetCollisionGroup() == COLLISION_GROUP_DEBRIS )
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user