summaryrefslogtreecommitdiff
path: root/game/client/c_te_beampoints.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/client/c_te_beampoints.cpp
downloadarchived-source-engine-2018-hl2-src-master.tar.xz
archived-source-engine-2018-hl2-src-master.zip
Diffstat (limited to 'game/client/c_te_beampoints.cpp')
-rw-r--r--game/client/c_te_beampoints.cpp76
1 files changed, 76 insertions, 0 deletions
diff --git a/game/client/c_te_beampoints.cpp b/game/client/c_te_beampoints.cpp
new file mode 100644
index 0000000..b2f4369
--- /dev/null
+++ b/game/client/c_te_beampoints.cpp
@@ -0,0 +1,76 @@
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose:
+//
+// $Workfile: $
+// $Date: $
+// $NoKeywords: $
+//=============================================================================//
+#include "cbase.h"
+#include "c_te_basebeam.h"
+#include "iviewrender_beams.h"
+
+// memdbgon must be the last include file in a .cpp file!!!
+#include "tier0/memdbgon.h"
+
+//-----------------------------------------------------------------------------
+// Purpose: BeamPoints TE
+//-----------------------------------------------------------------------------
+class C_TEBeamPoints : public C_TEBaseBeam
+{
+public:
+ DECLARE_CLASS( C_TEBeamPoints, C_TEBaseBeam );
+ DECLARE_CLIENTCLASS();
+
+ C_TEBeamPoints( void );
+ virtual ~C_TEBeamPoints( void );
+
+ virtual void PostDataUpdate( DataUpdateType_t updateType );
+
+public:
+ Vector m_vecStartPoint;
+ Vector m_vecEndPoint;
+};
+
+//-----------------------------------------------------------------------------
+// Purpose:
+//-----------------------------------------------------------------------------
+C_TEBeamPoints::C_TEBeamPoints( void )
+{
+ m_vecStartPoint.Init();
+ m_vecEndPoint.Init();
+}
+
+//-----------------------------------------------------------------------------
+// Purpose:
+//-----------------------------------------------------------------------------
+C_TEBeamPoints::~C_TEBeamPoints( void )
+{
+}
+
+void TE_BeamPoints( IRecipientFilter& filter, float delay,
+ const Vector* start, const Vector* end, int modelindex, int haloindex, int startframe, int framerate,
+ float life, float width, float endWidth, int fadeLength, float amplitude,
+ int r, int g, int b, int a, int speed )
+{
+ beams->CreateBeamPoints( (Vector&)*start, (Vector&)*end, modelindex, haloindex, 0.0f,
+ life, width, endWidth, fadeLength, amplitude, a, 0.1 * speed,
+ startframe, 0.1 * (float)framerate, r, g, b );
+}
+
+//-----------------------------------------------------------------------------
+// Purpose:
+// Input : bool -
+//-----------------------------------------------------------------------------
+void C_TEBeamPoints::PostDataUpdate( DataUpdateType_t updateType )
+{
+ beams->CreateBeamPoints( m_vecStartPoint, m_vecEndPoint, m_nModelIndex, m_nHaloIndex, 0.0f,
+ m_fLife, m_fWidth, m_fEndWidth, m_nFadeLength, m_fAmplitude, a, 0.1 * m_nSpeed,
+ m_nStartFrame, 0.1 * m_nFrameRate, r, g, b );
+}
+
+IMPLEMENT_CLIENTCLASS_EVENT_DT(C_TEBeamPoints, DT_TEBeamPoints, CTEBeamPoints)
+ RecvPropVector( RECVINFO(m_vecStartPoint)),
+ RecvPropVector( RECVINFO(m_vecEndPoint)),
+END_RECV_TABLE()
+