diff options
| author | Jørgen P. Tjernø <[email protected]> | 2013-12-02 19:31:46 -0800 |
|---|---|---|
| committer | Jørgen P. Tjernø <[email protected]> | 2013-12-02 19:46:31 -0800 |
| commit | f56bb35301836e56582a575a75864392a0177875 (patch) | |
| tree | de61ddd39de3e7df52759711950b4c288592f0dc /mp/src/game/shared/weapon_ifmbase.cpp | |
| parent | Mark some more files as text. (diff) | |
| download | source-sdk-2013-f56bb35301836e56582a575a75864392a0177875.tar.xz source-sdk-2013-f56bb35301836e56582a575a75864392a0177875.zip | |
Fix line endings. WHAMMY.
Diffstat (limited to 'mp/src/game/shared/weapon_ifmbase.cpp')
| -rw-r--r-- | mp/src/game/shared/weapon_ifmbase.cpp | 244 |
1 files changed, 122 insertions, 122 deletions
diff --git a/mp/src/game/shared/weapon_ifmbase.cpp b/mp/src/game/shared/weapon_ifmbase.cpp index 67096fa7..8051dc37 100644 --- a/mp/src/game/shared/weapon_ifmbase.cpp +++ b/mp/src/game/shared/weapon_ifmbase.cpp @@ -1,122 +1,122 @@ -//========= Copyright Valve Corporation, All rights reserved. ============//
-//
-// Purpose:
-//
-// $NoKeywords: $
-//===========================================================================//
-
-#include "cbase.h"
-#include "weapon_ifmbase.h"
-
-#if defined( CLIENT_DLL )
-
- #include "vgui/ISurface.h"
- #include "vgui_controls/Controls.h"
- #include "hud_crosshair.h"
-
-#endif
-
-
-//-----------------------------------------------------------------------------
-// CWeaponIFMBase tables.
-//-----------------------------------------------------------------------------
-IMPLEMENT_NETWORKCLASS_ALIASED( WeaponIFMBase, DT_WeaponIFMBase )
-
-BEGIN_NETWORK_TABLE( CWeaponIFMBase, DT_WeaponIFMBase )
-END_NETWORK_TABLE()
-
-BEGIN_PREDICTION_DATA( CWeaponIFMBase )
-END_PREDICTION_DATA()
-
-LINK_ENTITY_TO_CLASS( weapon_ifm_base, CWeaponIFMBase );
-
-
-#ifdef GAME_DLL
-
-BEGIN_DATADESC( CWeaponIFMBase )
-
-END_DATADESC()
-
-#endif
-
-//-----------------------------------------------------------------------------
-// CWeaponIFMBase implementation.
-//-----------------------------------------------------------------------------
-CWeaponIFMBase::CWeaponIFMBase()
-{
- SetPredictionEligible( true );
- AddSolidFlags( FSOLID_TRIGGER ); // Nothing collides with these but it gets touches.
-}
-
-bool CWeaponIFMBase::IsPredicted() const
-{
- return true;
-}
-
-#ifdef CLIENT_DLL
-
-void CWeaponIFMBase::OnDataChanged( DataUpdateType_t type )
-{
- BaseClass::OnDataChanged( type );
-
- if ( GetPredictable() && !ShouldPredict() )
- {
- ShutdownPredictable();
- }
-}
-
-bool CWeaponIFMBase::ShouldPredict()
-{
- if ( GetOwner() && GetOwner() == C_BasePlayer::GetLocalPlayer() )
- return true;
-
- return BaseClass::ShouldPredict();
-}
-
-
-#else
-
-void CWeaponIFMBase::Spawn()
-{
- BaseClass::Spawn();
-
- // Set this here to allow players to shoot dropped weapons
- SetCollisionGroup( COLLISION_GROUP_WEAPON );
-}
-
-#endif
-
-/*
-void CWeaponIFMBase::FallInit( void )
-{
-#ifndef CLIENT_DLL
- SetModel( GetWorldModel() );
- VPhysicsDestroyObject();
-
- if ( HasSpawnFlags( SF_NORESPAWN ) == false )
- {
- SetMoveType( MOVETYPE_NONE );
- SetSolid( SOLID_BBOX );
- AddSolidFlags( FSOLID_TRIGGER );
-
- UTIL_DropToFloor( this, MASK_SOLID );
- }
- else
- {
- if ( !VPhysicsInitNormal( SOLID_BBOX, GetSolidFlags() | FSOLID_TRIGGER, false ) )
- {
- SetMoveType( MOVETYPE_NONE );
- SetSolid( SOLID_BBOX );
- AddSolidFlags( FSOLID_TRIGGER );
- }
- }
-
- SetPickupTouch();
-
- SetThink( &CBaseCombatWeapon::FallThink );
-
- SetNextThink( gpGlobals->curtime + 0.1f );
-
-#endif
-}
-*/
+//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: +// +// $NoKeywords: $ +//===========================================================================// + +#include "cbase.h" +#include "weapon_ifmbase.h" + +#if defined( CLIENT_DLL ) + + #include "vgui/ISurface.h" + #include "vgui_controls/Controls.h" + #include "hud_crosshair.h" + +#endif + + +//----------------------------------------------------------------------------- +// CWeaponIFMBase tables. +//----------------------------------------------------------------------------- +IMPLEMENT_NETWORKCLASS_ALIASED( WeaponIFMBase, DT_WeaponIFMBase ) + +BEGIN_NETWORK_TABLE( CWeaponIFMBase, DT_WeaponIFMBase ) +END_NETWORK_TABLE() + +BEGIN_PREDICTION_DATA( CWeaponIFMBase ) +END_PREDICTION_DATA() + +LINK_ENTITY_TO_CLASS( weapon_ifm_base, CWeaponIFMBase ); + + +#ifdef GAME_DLL + +BEGIN_DATADESC( CWeaponIFMBase ) + +END_DATADESC() + +#endif + +//----------------------------------------------------------------------------- +// CWeaponIFMBase implementation. +//----------------------------------------------------------------------------- +CWeaponIFMBase::CWeaponIFMBase() +{ + SetPredictionEligible( true ); + AddSolidFlags( FSOLID_TRIGGER ); // Nothing collides with these but it gets touches. +} + +bool CWeaponIFMBase::IsPredicted() const +{ + return true; +} + +#ifdef CLIENT_DLL + +void CWeaponIFMBase::OnDataChanged( DataUpdateType_t type ) +{ + BaseClass::OnDataChanged( type ); + + if ( GetPredictable() && !ShouldPredict() ) + { + ShutdownPredictable(); + } +} + +bool CWeaponIFMBase::ShouldPredict() +{ + if ( GetOwner() && GetOwner() == C_BasePlayer::GetLocalPlayer() ) + return true; + + return BaseClass::ShouldPredict(); +} + + +#else + +void CWeaponIFMBase::Spawn() +{ + BaseClass::Spawn(); + + // Set this here to allow players to shoot dropped weapons + SetCollisionGroup( COLLISION_GROUP_WEAPON ); +} + +#endif + +/* +void CWeaponIFMBase::FallInit( void ) +{ +#ifndef CLIENT_DLL + SetModel( GetWorldModel() ); + VPhysicsDestroyObject(); + + if ( HasSpawnFlags( SF_NORESPAWN ) == false ) + { + SetMoveType( MOVETYPE_NONE ); + SetSolid( SOLID_BBOX ); + AddSolidFlags( FSOLID_TRIGGER ); + + UTIL_DropToFloor( this, MASK_SOLID ); + } + else + { + if ( !VPhysicsInitNormal( SOLID_BBOX, GetSolidFlags() | FSOLID_TRIGGER, false ) ) + { + SetMoveType( MOVETYPE_NONE ); + SetSolid( SOLID_BBOX ); + AddSolidFlags( FSOLID_TRIGGER ); + } + } + + SetPickupTouch(); + + SetThink( &CBaseCombatWeapon::FallThink ); + + SetNextThink( gpGlobals->curtime + 0.1f ); + +#endif +} +*/ |