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/server/func_areaportalbase.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/server/func_areaportalbase.cpp')
| -rw-r--r-- | mp/src/game/server/func_areaportalbase.cpp | 142 |
1 files changed, 71 insertions, 71 deletions
diff --git a/mp/src/game/server/func_areaportalbase.cpp b/mp/src/game/server/func_areaportalbase.cpp index 1fcc4784..88cb2a61 100644 --- a/mp/src/game/server/func_areaportalbase.cpp +++ b/mp/src/game/server/func_areaportalbase.cpp @@ -1,71 +1,71 @@ -//========= Copyright Valve Corporation, All rights reserved. ============//
-//
-// Purpose:
-//
-// $NoKeywords: $
-//===========================================================================//
-
-#include "cbase.h"
-#include "func_areaportalbase.h"
-
-// memdbgon must be the last include file in a .cpp file!!!
-#include "tier0/memdbgon.h"
-
-// A sphere around the player used for backface culling of areaportals.
-#define VIEWER_PADDING 80
-
-
-CUtlLinkedList<CFuncAreaPortalBase*, unsigned short> g_AreaPortals;
-
-
-
-//---------------------------------------------------------
-// Save/Restore
-//---------------------------------------------------------
-BEGIN_DATADESC( CFuncAreaPortalBase )
-
- DEFINE_FIELD( m_portalNumber, FIELD_INTEGER ),
- DEFINE_KEYFIELD( m_iPortalVersion, FIELD_INTEGER, "PortalVersion" )
-// DEFINE_FIELD( m_AreaPortalsElement, FIELD_SHORT ),
-
-END_DATADESC()
-
-
-
-
-CFuncAreaPortalBase::CFuncAreaPortalBase()
-{
- m_portalNumber = -1;
- m_AreaPortalsElement = g_AreaPortals.AddToTail( this );
- m_iPortalVersion = 0;
-}
-
-
-CFuncAreaPortalBase::~CFuncAreaPortalBase()
-{
- g_AreaPortals.Remove( m_AreaPortalsElement );
-}
-
-
-bool CFuncAreaPortalBase::UpdateVisibility( const Vector &vOrigin, float fovDistanceAdjustFactor, bool &bIsOpenOnClient )
-{
- // NOTE: We leave bIsOpenOnClient alone on purpose here. See the header for a description of why.
-
- if( m_portalNumber == -1 )
- return false;
-
- // See if the viewer is on the backside.
- VPlane plane;
- if( !engine->GetAreaPortalPlane( vOrigin, m_portalNumber, &plane ) )
- return true; // leave it open if there's an error here for some reason
-
- bool bOpen = false;
- if( plane.DistTo( vOrigin ) + VIEWER_PADDING > 0 )
- bOpen = true;
-
- return bOpen;
-}
-
-
-
-
+//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: +// +// $NoKeywords: $ +//===========================================================================// + +#include "cbase.h" +#include "func_areaportalbase.h" + +// memdbgon must be the last include file in a .cpp file!!! +#include "tier0/memdbgon.h" + +// A sphere around the player used for backface culling of areaportals. +#define VIEWER_PADDING 80 + + +CUtlLinkedList<CFuncAreaPortalBase*, unsigned short> g_AreaPortals; + + + +//--------------------------------------------------------- +// Save/Restore +//--------------------------------------------------------- +BEGIN_DATADESC( CFuncAreaPortalBase ) + + DEFINE_FIELD( m_portalNumber, FIELD_INTEGER ), + DEFINE_KEYFIELD( m_iPortalVersion, FIELD_INTEGER, "PortalVersion" ) +// DEFINE_FIELD( m_AreaPortalsElement, FIELD_SHORT ), + +END_DATADESC() + + + + +CFuncAreaPortalBase::CFuncAreaPortalBase() +{ + m_portalNumber = -1; + m_AreaPortalsElement = g_AreaPortals.AddToTail( this ); + m_iPortalVersion = 0; +} + + +CFuncAreaPortalBase::~CFuncAreaPortalBase() +{ + g_AreaPortals.Remove( m_AreaPortalsElement ); +} + + +bool CFuncAreaPortalBase::UpdateVisibility( const Vector &vOrigin, float fovDistanceAdjustFactor, bool &bIsOpenOnClient ) +{ + // NOTE: We leave bIsOpenOnClient alone on purpose here. See the header for a description of why. + + if( m_portalNumber == -1 ) + return false; + + // See if the viewer is on the backside. + VPlane plane; + if( !engine->GetAreaPortalPlane( vOrigin, m_portalNumber, &plane ) ) + return true; // leave it open if there's an error here for some reason + + bool bOpen = false; + if( plane.DistTo( vOrigin ) + VIEWER_PADDING > 0 ) + bOpen = true; + + return bOpen; +} + + + + |