summaryrefslogtreecommitdiff
path: root/game/server/spotlightend.cpp
diff options
context:
space:
mode:
authorFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
committerFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
commit3bf9df6b2785fa6d951086978a3e66f49427166a (patch)
tree2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /game/server/spotlightend.cpp
downloadarchived-source-engine-2018-hl2-src-master.tar.xz
archived-source-engine-2018-hl2-src-master.zip
Diffstat (limited to 'game/server/spotlightend.cpp')
-rw-r--r--game/server/spotlightend.cpp52
1 files changed, 52 insertions, 0 deletions
diff --git a/game/server/spotlightend.cpp b/game/server/spotlightend.cpp
new file mode 100644
index 0000000..57c0856
--- /dev/null
+++ b/game/server/spotlightend.cpp
@@ -0,0 +1,52 @@
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose: Dynamic light at the end of a spotlight
+//
+// $Workfile: $
+// $Date: $
+// $NoKeywords: $
+//=============================================================================//
+
+#include "cbase.h"
+#include "spotlightend.h"
+
+// memdbgon must be the last include file in a .cpp file!!!
+#include "tier0/memdbgon.h"
+
+LINK_ENTITY_TO_CLASS(spotlight_end, CSpotlightEnd);
+
+IMPLEMENT_SERVERCLASS_ST(CSpotlightEnd, DT_SpotlightEnd)
+ SendPropFloat(SENDINFO(m_flLightScale), 0, SPROP_NOSCALE),
+ SendPropFloat(SENDINFO(m_Radius), 0, SPROP_NOSCALE),
+// SendPropVector(SENDINFO(m_vSpotlightDir), -1, SPROP_NORMAL),
+// SendPropVector(SENDINFO(m_vSpotlightOrg), -1, SPROP_COORD),
+END_SEND_TABLE()
+
+
+//---------------------------------------------------------
+// Save/Restore
+//---------------------------------------------------------
+BEGIN_DATADESC( CSpotlightEnd )
+
+ DEFINE_FIELD( m_flLightScale, FIELD_FLOAT ),
+ DEFINE_FIELD( m_Radius, FIELD_FLOAT ),
+ DEFINE_FIELD( m_vSpotlightDir, FIELD_VECTOR ),
+ DEFINE_FIELD( m_vSpotlightOrg, FIELD_POSITION_VECTOR ),
+
+END_DATADESC()
+
+
+//------------------------------------------------------------------------------
+// Purpose :
+// Input :
+// Output :
+//------------------------------------------------------------------------------
+void CSpotlightEnd::Spawn( void )
+{
+ Precache();
+ m_flLightScale = 100;
+ SetSolid( SOLID_NONE );
+ SetMoveType( MOVETYPE_FLY );
+ UTIL_SetSize( this, vec3_origin, vec3_origin );
+ AddEFlags( EFL_FORCE_CHECK_TRANSMIT );
+}