summaryrefslogtreecommitdiff
path: root/game/shared/tf2/plasmaprojectile_shared.h
blob: 2b112b85a4d46bc12600fd518754c44971546ac1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose: 
//
// $NoKeywords: $
//=============================================================================//

#ifndef PLASMAPROJECTILE_SHARED_H
#define PLASMAPROJECTILE_SHARED_H

#ifndef _WIN32
#pragma once
#endif

#include "predictable_entity.h"
#include "server_class.h"
#include "client_class.h"
#include "mathlib/vector.h"

class CPlasmaProjectileShared
{
public:
	DECLARE_PREDICTABLE();
	DECLARE_NETWORKCLASS_NOBASE();
	DECLARE_CLASS_NOBASE( CPlasmaProjectileShared );
	DECLARE_EMBEDDED_NETWORKVAR();

public:
	void Init( const Vector &vecStart, const Vector &vecDir, float flSpawnSpeed );
	float GetSpawnTime() const { return m_flSpawnTime; }
	void SetSpawnTime( float flSpawnTime );
	void SetDeathTime( float flDeathTime );
	float GetDeathTime() const { return m_flDeathTime; }

	void ComputePosition( float flTime, Vector *pNewPosition, Vector *pNewVelocity, QAngle *pNewAngles, QAngle *pNewAngVelocity );

	const Vector &TracerDir() { return m_vTracerDir.Get(); }

private:
	CNetworkVector( m_vTracerDir );
	CNetworkVector( m_vecSpawnPosition );
	CNetworkVar( float, m_flSpawnTime );
	CNetworkVar( float, m_flSpawnSpeed );
	CNetworkVar( float, m_flDeathTime );
};


#endif // PLASMAPROJECTILE_SHARED_H