2010-11-20 10:37:14 +00:00
|
|
|
/* (c) Magnus Auvinen. See licence.txt in the root of the distribution for more information. */
|
|
|
|
/* If you are missing that file, acquire a complete release at teeworlds.com. */
|
2010-05-29 07:25:38 +00:00
|
|
|
#ifndef GAME_SERVER_ENTITIES_PROJECTILE_H
|
|
|
|
#define GAME_SERVER_ENTITIES_PROJECTILE_H
|
|
|
|
|
|
|
|
class CProjectile : public CEntity
|
|
|
|
{
|
|
|
|
public:
|
2010-08-30 23:45:42 +00:00
|
|
|
CProjectile
|
|
|
|
(
|
|
|
|
CGameWorld *pGameWorld,
|
|
|
|
int Type,
|
|
|
|
int Owner,
|
|
|
|
vec2 Pos,
|
|
|
|
vec2 Dir,
|
|
|
|
int Span,
|
|
|
|
bool Freeeze,
|
|
|
|
bool Explosive,
|
|
|
|
float Force,
|
|
|
|
int SoundImpact,
|
2010-11-13 13:22:19 +00:00
|
|
|
int Weapon,
|
|
|
|
int Layer = 0,
|
|
|
|
int Number = 0
|
2010-08-30 23:45:42 +00:00
|
|
|
);
|
2010-05-29 07:25:38 +00:00
|
|
|
|
|
|
|
vec2 GetPos(float Time);
|
|
|
|
void FillInfo(CNetObj_Projectile *pProj);
|
|
|
|
|
|
|
|
virtual void Reset();
|
|
|
|
virtual void Tick();
|
2012-01-09 23:49:31 +00:00
|
|
|
virtual void TickPaused();
|
2010-05-29 07:25:38 +00:00
|
|
|
virtual void Snap(int SnappingClient);
|
2011-04-13 18:37:12 +00:00
|
|
|
|
2010-05-29 07:25:38 +00:00
|
|
|
private:
|
|
|
|
vec2 m_Direction;
|
2018-03-24 13:01:01 +00:00
|
|
|
int m_InitialLifeSpan;
|
2010-05-29 07:25:38 +00:00
|
|
|
int m_LifeSpan;
|
|
|
|
int m_Owner;
|
|
|
|
int m_Type;
|
2010-07-29 05:21:18 +00:00
|
|
|
//int m_Damage;
|
2010-05-29 07:25:38 +00:00
|
|
|
int m_SoundImpact;
|
|
|
|
int m_Weapon;
|
|
|
|
float m_Force;
|
|
|
|
int m_StartTick;
|
|
|
|
bool m_Explosive;
|
2011-04-09 06:41:31 +00:00
|
|
|
|
|
|
|
// DDRace
|
|
|
|
|
2010-07-29 05:21:18 +00:00
|
|
|
int m_Bouncing;
|
|
|
|
bool m_Freeze;
|
2014-03-12 23:54:44 +00:00
|
|
|
int m_TuneZone;
|
2011-04-09 06:41:31 +00:00
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
void SetBouncing(int Value);
|
2014-12-01 00:31:58 +00:00
|
|
|
void FillExtraInfo(CNetObj_Projectile *pProj);
|
2010-05-29 07:25:38 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|