aboutsummaryrefslogtreecommitdiff
path: root/sp/src/game/server/entityblocker.cpp
diff options
context:
space:
mode:
authorJørgen P. Tjernø <[email protected]>2013-12-02 19:31:46 -0800
committerJørgen P. Tjernø <[email protected]>2013-12-02 19:46:31 -0800
commitf56bb35301836e56582a575a75864392a0177875 (patch)
treede61ddd39de3e7df52759711950b4c288592f0dc /sp/src/game/server/entityblocker.cpp
parentMark some more files as text. (diff)
downloadsource-sdk-2013-f56bb35301836e56582a575a75864392a0177875.tar.xz
source-sdk-2013-f56bb35301836e56582a575a75864392a0177875.zip
Fix line endings. WHAMMY.
Diffstat (limited to 'sp/src/game/server/entityblocker.cpp')
-rw-r--r--sp/src/game/server/entityblocker.cpp150
1 files changed, 75 insertions, 75 deletions
diff --git a/sp/src/game/server/entityblocker.cpp b/sp/src/game/server/entityblocker.cpp
index 7380a2e0..cc6edbf5 100644
--- a/sp/src/game/server/entityblocker.cpp
+++ b/sp/src/game/server/entityblocker.cpp
@@ -1,76 +1,76 @@
-//========= Copyright Valve Corporation, All rights reserved. ============//
-//
-// Purpose:
-//
-//=============================================================================//
-
-#include "cbase.h"
-#include "entityblocker.h"
-
-// memdbgon must be the last include file in a .cpp file!!!
-#include "tier0/memdbgon.h"
-
-LINK_ENTITY_TO_CLASS( entity_blocker, CEntityBlocker );
-
-//-----------------------------------------------------------------------------
-// Purpose:
-// Input : &origin -
-// &mins -
-// &maxs -
-// NULL -
-// Output : CEntityBlocker
-//-----------------------------------------------------------------------------
-CEntityBlocker *CEntityBlocker::Create( const Vector &origin, const Vector &mins, const Vector &maxs, CBaseEntity *pOwner, bool bBlockPhysics )
-{
- CEntityBlocker *pBlocker = (CEntityBlocker *) CBaseEntity::Create( "entity_blocker", origin, vec3_angle, pOwner );
-
- if ( pBlocker != NULL )
- {
- pBlocker->SetSize( mins, maxs );
- if ( bBlockPhysics )
- {
- pBlocker->VPhysicsInitStatic();
- }
- }
-
- return pBlocker;
-}
-
-//-----------------------------------------------------------------------------
-// Purpose:
-//-----------------------------------------------------------------------------
-void CEntityBlocker::Spawn( void )
-{
- SetSolid( SOLID_BBOX );
- AddSolidFlags( FSOLID_CUSTOMRAYTEST );
-}
-
-//-----------------------------------------------------------------------------
-// Purpose: Entity blockers don't block tracelines so they don't screw up weapon fire, etc
-//-----------------------------------------------------------------------------
-bool CEntityBlocker::TestCollision( const Ray_t &ray, unsigned int mask, trace_t& trace )
-{
- return false;
-}
-
-//------------------------------------------------------------------------------
-// Purpose :
-// Input :
-// Output :
-//------------------------------------------------------------------------------
-void CC_Test_Entity_Blocker( void )
-{
- CBasePlayer *pPlayer = UTIL_GetCommandClient();
- Vector vecForward;
- pPlayer->GetVectors( &vecForward, NULL, NULL );
-
- trace_t tr;
- Vector vecOrigin = pPlayer->GetAbsOrigin() + (vecForward * 256);
- UTIL_TraceHull( vecOrigin + Vector(0,0,256), vecOrigin - Vector(0,0,256), VEC_HULL_MIN_SCALED( pPlayer ), VEC_HULL_MAX_SCALED( pPlayer ), MASK_SOLID, pPlayer, COLLISION_GROUP_NONE, &tr );
- if ( !tr.allsolid && !tr.startsolid )
- {
- CEntityBlocker::Create( tr.endpos, VEC_HULL_MIN_SCALED( pPlayer ), VEC_HULL_MAX_SCALED( pPlayer ), NULL, true );
- NDebugOverlay::Box( tr.endpos, VEC_HULL_MIN_SCALED( pPlayer ), VEC_HULL_MAX_SCALED( pPlayer ), 0, 255, 0, 64, 1000.0 );
- }
-}
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose:
+//
+//=============================================================================//
+
+#include "cbase.h"
+#include "entityblocker.h"
+
+// memdbgon must be the last include file in a .cpp file!!!
+#include "tier0/memdbgon.h"
+
+LINK_ENTITY_TO_CLASS( entity_blocker, CEntityBlocker );
+
+//-----------------------------------------------------------------------------
+// Purpose:
+// Input : &origin -
+// &mins -
+// &maxs -
+// NULL -
+// Output : CEntityBlocker
+//-----------------------------------------------------------------------------
+CEntityBlocker *CEntityBlocker::Create( const Vector &origin, const Vector &mins, const Vector &maxs, CBaseEntity *pOwner, bool bBlockPhysics )
+{
+ CEntityBlocker *pBlocker = (CEntityBlocker *) CBaseEntity::Create( "entity_blocker", origin, vec3_angle, pOwner );
+
+ if ( pBlocker != NULL )
+ {
+ pBlocker->SetSize( mins, maxs );
+ if ( bBlockPhysics )
+ {
+ pBlocker->VPhysicsInitStatic();
+ }
+ }
+
+ return pBlocker;
+}
+
+//-----------------------------------------------------------------------------
+// Purpose:
+//-----------------------------------------------------------------------------
+void CEntityBlocker::Spawn( void )
+{
+ SetSolid( SOLID_BBOX );
+ AddSolidFlags( FSOLID_CUSTOMRAYTEST );
+}
+
+//-----------------------------------------------------------------------------
+// Purpose: Entity blockers don't block tracelines so they don't screw up weapon fire, etc
+//-----------------------------------------------------------------------------
+bool CEntityBlocker::TestCollision( const Ray_t &ray, unsigned int mask, trace_t& trace )
+{
+ return false;
+}
+
+//------------------------------------------------------------------------------
+// Purpose :
+// Input :
+// Output :
+//------------------------------------------------------------------------------
+void CC_Test_Entity_Blocker( void )
+{
+ CBasePlayer *pPlayer = UTIL_GetCommandClient();
+ Vector vecForward;
+ pPlayer->GetVectors( &vecForward, NULL, NULL );
+
+ trace_t tr;
+ Vector vecOrigin = pPlayer->GetAbsOrigin() + (vecForward * 256);
+ UTIL_TraceHull( vecOrigin + Vector(0,0,256), vecOrigin - Vector(0,0,256), VEC_HULL_MIN_SCALED( pPlayer ), VEC_HULL_MAX_SCALED( pPlayer ), MASK_SOLID, pPlayer, COLLISION_GROUP_NONE, &tr );
+ if ( !tr.allsolid && !tr.startsolid )
+ {
+ CEntityBlocker::Create( tr.endpos, VEC_HULL_MIN_SCALED( pPlayer ), VEC_HULL_MAX_SCALED( pPlayer ), NULL, true );
+ NDebugOverlay::Box( tr.endpos, VEC_HULL_MIN_SCALED( pPlayer ), VEC_HULL_MAX_SCALED( pPlayer ), 0, 255, 0, 64, 1000.0 );
+ }
+}
static ConCommand test_entity_blocker("test_entity_blocker", CC_Test_Entity_Blocker, "Test command that drops an entity blocker out in front of the player.", FCVAR_CHEAT ); \ No newline at end of file