From f56bb35301836e56582a575a75864392a0177875 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rgen=20P=2E=20Tjern=C3=B8?= Date: Mon, 2 Dec 2013 19:31:46 -0800 Subject: Fix line endings. WHAMMY. --- mp/src/game/server/te_decal.cpp | 260 ++++++++++++++++++++-------------------- 1 file changed, 130 insertions(+), 130 deletions(-) (limited to 'mp/src/game/server/te_decal.cpp') diff --git a/mp/src/game/server/te_decal.cpp b/mp/src/game/server/te_decal.cpp index 1c9edc27..3dab5382 100644 --- a/mp/src/game/server/te_decal.cpp +++ b/mp/src/game/server/te_decal.cpp @@ -1,131 +1,131 @@ -//========= Copyright Valve Corporation, All rights reserved. ============// -// -// Purpose: -// -// $Workfile: $ -// $Date: $ -// -//----------------------------------------------------------------------------- -// $Log: $ -// -// $NoKeywords: $ -//=============================================================================// -#include "cbase.h" -#include "basetempentity.h" - -// memdbgon must be the last include file in a .cpp file!!! -#include "tier0/memdbgon.h" - -//----------------------------------------------------------------------------- -// Purpose: Dispatches decal tempentity -//----------------------------------------------------------------------------- -class CTEDecal : public CBaseTempEntity -{ -public: - DECLARE_CLASS( CTEDecal, CBaseTempEntity ); - - CTEDecal( const char *name ); - virtual ~CTEDecal( void ); - - virtual void Test( const Vector& current_origin, const QAngle& current_angles ); - - DECLARE_SERVERCLASS(); - -public: - CNetworkVector( m_vecOrigin ); - CNetworkVector( m_vecStart ); - CNetworkVar( int, m_nEntity ); - CNetworkVar( int, m_nHitbox ); - CNetworkVar( int, m_nIndex ); -}; - -//----------------------------------------------------------------------------- -// Purpose: -// Input : *name - -//----------------------------------------------------------------------------- -CTEDecal::CTEDecal( const char *name ) : - CBaseTempEntity( name ) -{ - m_vecOrigin.Init(); - m_nEntity = 0; - m_nIndex = 0; -} - -//----------------------------------------------------------------------------- -// Purpose: -//----------------------------------------------------------------------------- -CTEDecal::~CTEDecal( void ) -{ -} - -//----------------------------------------------------------------------------- -// Purpose: -// Input : *current_origin - -// *current_angles - -//----------------------------------------------------------------------------- -void CTEDecal::Test( const Vector& current_origin, const QAngle& current_angles ) -{ - // Fill in data - m_nEntity = 0; - m_nIndex = 0; - m_vecOrigin = current_origin; - - Vector vecEnd; - - Vector forward; - - m_vecOrigin.GetForModify()[2] += 24; - - AngleVectors( current_angles, &forward ); - forward[2] = 0.0; - VectorNormalize( forward ); - - VectorMA( m_vecOrigin, 50.0, forward, m_vecOrigin.GetForModify() ); - VectorMA( m_vecOrigin, 1024.0, forward, vecEnd ); - - trace_t tr; - - UTIL_TraceLine( m_vecOrigin, vecEnd, MASK_SOLID_BRUSHONLY, NULL, COLLISION_GROUP_NONE, &tr ); - - m_vecOrigin = tr.endpos; - - CBroadcastRecipientFilter filter; - Create( filter, 0.0 ); -} - - -IMPLEMENT_SERVERCLASS_ST(CTEDecal, DT_TEDecal) - SendPropVector( SENDINFO(m_vecOrigin), -1, SPROP_COORD), - SendPropVector( SENDINFO(m_vecStart), -1, SPROP_COORD), - SendPropInt( SENDINFO(m_nEntity), MAX_EDICT_BITS, SPROP_UNSIGNED ), - SendPropInt( SENDINFO(m_nHitbox), 12, SPROP_UNSIGNED ), - SendPropInt( SENDINFO(m_nIndex), 9, SPROP_UNSIGNED ), -END_SEND_TABLE() - - -// Singleton to fire TEDecal objects -static CTEDecal g_TEDecal( "Entity Decal" ); - -//----------------------------------------------------------------------------- -// Purpose: -// Input : msg_dest - -// delay - -// *origin - -// *recipient - -// *pos - -// entity - -// index - -//----------------------------------------------------------------------------- -void TE_Decal( IRecipientFilter& filter, float delay, - const Vector* pos, const Vector* start, int entity, int hitbox, int index ) -{ - Assert( pos && start ); - g_TEDecal.m_vecOrigin = *pos; - g_TEDecal.m_vecStart = *start; - g_TEDecal.m_nEntity = entity; - g_TEDecal.m_nHitbox = hitbox; - g_TEDecal.m_nIndex = index; - - // Send it over the wire - g_TEDecal.Create( filter, delay ); +//========= Copyright Valve Corporation, All rights reserved. ============// +// +// Purpose: +// +// $Workfile: $ +// $Date: $ +// +//----------------------------------------------------------------------------- +// $Log: $ +// +// $NoKeywords: $ +//=============================================================================// +#include "cbase.h" +#include "basetempentity.h" + +// memdbgon must be the last include file in a .cpp file!!! +#include "tier0/memdbgon.h" + +//----------------------------------------------------------------------------- +// Purpose: Dispatches decal tempentity +//----------------------------------------------------------------------------- +class CTEDecal : public CBaseTempEntity +{ +public: + DECLARE_CLASS( CTEDecal, CBaseTempEntity ); + + CTEDecal( const char *name ); + virtual ~CTEDecal( void ); + + virtual void Test( const Vector& current_origin, const QAngle& current_angles ); + + DECLARE_SERVERCLASS(); + +public: + CNetworkVector( m_vecOrigin ); + CNetworkVector( m_vecStart ); + CNetworkVar( int, m_nEntity ); + CNetworkVar( int, m_nHitbox ); + CNetworkVar( int, m_nIndex ); +}; + +//----------------------------------------------------------------------------- +// Purpose: +// Input : *name - +//----------------------------------------------------------------------------- +CTEDecal::CTEDecal( const char *name ) : + CBaseTempEntity( name ) +{ + m_vecOrigin.Init(); + m_nEntity = 0; + m_nIndex = 0; +} + +//----------------------------------------------------------------------------- +// Purpose: +//----------------------------------------------------------------------------- +CTEDecal::~CTEDecal( void ) +{ +} + +//----------------------------------------------------------------------------- +// Purpose: +// Input : *current_origin - +// *current_angles - +//----------------------------------------------------------------------------- +void CTEDecal::Test( const Vector& current_origin, const QAngle& current_angles ) +{ + // Fill in data + m_nEntity = 0; + m_nIndex = 0; + m_vecOrigin = current_origin; + + Vector vecEnd; + + Vector forward; + + m_vecOrigin.GetForModify()[2] += 24; + + AngleVectors( current_angles, &forward ); + forward[2] = 0.0; + VectorNormalize( forward ); + + VectorMA( m_vecOrigin, 50.0, forward, m_vecOrigin.GetForModify() ); + VectorMA( m_vecOrigin, 1024.0, forward, vecEnd ); + + trace_t tr; + + UTIL_TraceLine( m_vecOrigin, vecEnd, MASK_SOLID_BRUSHONLY, NULL, COLLISION_GROUP_NONE, &tr ); + + m_vecOrigin = tr.endpos; + + CBroadcastRecipientFilter filter; + Create( filter, 0.0 ); +} + + +IMPLEMENT_SERVERCLASS_ST(CTEDecal, DT_TEDecal) + SendPropVector( SENDINFO(m_vecOrigin), -1, SPROP_COORD), + SendPropVector( SENDINFO(m_vecStart), -1, SPROP_COORD), + SendPropInt( SENDINFO(m_nEntity), MAX_EDICT_BITS, SPROP_UNSIGNED ), + SendPropInt( SENDINFO(m_nHitbox), 12, SPROP_UNSIGNED ), + SendPropInt( SENDINFO(m_nIndex), 9, SPROP_UNSIGNED ), +END_SEND_TABLE() + + +// Singleton to fire TEDecal objects +static CTEDecal g_TEDecal( "Entity Decal" ); + +//----------------------------------------------------------------------------- +// Purpose: +// Input : msg_dest - +// delay - +// *origin - +// *recipient - +// *pos - +// entity - +// index - +//----------------------------------------------------------------------------- +void TE_Decal( IRecipientFilter& filter, float delay, + const Vector* pos, const Vector* start, int entity, int hitbox, int index ) +{ + Assert( pos && start ); + g_TEDecal.m_vecOrigin = *pos; + g_TEDecal.m_vecStart = *start; + g_TEDecal.m_nEntity = entity; + g_TEDecal.m_nHitbox = hitbox; + g_TEDecal.m_nIndex = index; + + // Send it over the wire + g_TEDecal.Create( filter, delay ); } \ No newline at end of file -- cgit v1.2.3