DDraceNetwork Docs
projectile.h
Go to the documentation of this file.
1/* (c) Magnus Auvinen. See licence.txt in the root of the distribution for more information. */
2/* If you are missing that file, acquire a complete release at teeworlds.com. */
3#ifndef GAME_SERVER_ENTITIES_PROJECTILE_H
4#define GAME_SERVER_ENTITIES_PROJECTILE_H
5
7
8class CProjectile : public CEntity
9{
10public:
12 CGameWorld *pGameWorld,
13 int Type,
14 int Owner,
15 vec2 Pos,
16 vec2 Dir,
17 int Span,
18 bool Freeze,
19 bool Explosive,
20 int SoundImpact,
21 vec2 InitDir,
22 int Layer = 0,
23 int Number = 0);
24
25 vec2 GetPos(float Time);
26 void FillInfo(CNetObj_Projectile *pProj);
27
28 virtual void Reset() override;
29 virtual void Tick() override;
30 virtual void TickPaused() override;
31 virtual void Snap(int SnappingClient) override;
32 virtual void SwapClients(int Client1, int Client2) override;
33
34private:
36 int m_LifeSpan;
37 int m_Owner;
38 int m_Type;
39 //int m_Damage;
40 int m_SoundImpact;
41 int m_StartTick;
42 bool m_Explosive;
43
44 // DDRace
45
46 int m_Bouncing;
47 bool m_Freeze;
48 int m_TuneZone;
51
52public:
53 void SetBouncing(int Value);
56
57 virtual int GetOwnerId() const override { return m_Owner; }
58};
59
60#endif
Definition: entity.h:13
Definition: gameworld.h:17
Definition: projectile.h:11
bool FillExtraInfoLegacy(CNetObj_DDRaceProjectile *pProj)
Definition: projectile.cpp:376
bool m_Freeze
Definition: projectile.h:55
virtual int GetOwnerId() const override
Definition: projectile.h:57
int m_Bouncing
Definition: projectile.h:54
vec2 m_Direction
Definition: projectile.h:43
void FillInfo(CNetObj_Projectile *pProj)
Definition: projectile.cpp:294
int m_SoundImpact
Definition: projectile.h:47
int m_Owner
Definition: projectile.h:45
vec2 GetPos(float Time)
CProjectile(CGameWorld *pGameWorld, int Type, int Owner, vec2 Pos, vec2 Dir, int Span, bool Freeze, bool Explosive, int SoundImpact, int Layer=0, int Number=0)
Definition: projectile.cpp:13
bool m_BelongsToPracticeTeam
Definition: projectile.h:49
void FillExtraInfo(CNetObj_DDNetProjectile *pProj)
Definition: projectile.cpp:409
virtual void TickPaused() override
Definition: projectile.cpp:289
int m_TuneZone
Definition: projectile.h:56
virtual void Reset() override
Definition: projectile.cpp:52
virtual void Snap(int SnappingClient) override
Definition: projectile.cpp:304
void SetBouncing(int Value)
bool m_Explosive
Definition: projectile.h:50
virtual void Tick() override
int m_StartTick
Definition: projectile.h:49
int m_LifeSpan
Definition: projectile.h:44
int m_Type
Definition: projectile.h:46
virtual void SwapClients(int Client1, int Client2) override
Definition: projectile.cpp:364
vec2 m_InitDir
Definition: projectile.h:50
Definition: protocol.h:568
Definition: protocol.h:543
Definition: protocol.h:375