ddnet/src/game/server/entities/projectile.h

57 lines
1.1 KiB
C
Raw Normal View History

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
#include <game/server/entity.h>
2010-05-29 07:25:38 +00:00
class CProjectile : public CEntity
{
public:
CProjectile(
CGameWorld *pGameWorld,
int Type,
int Owner,
vec2 Pos,
vec2 Dir,
int Span,
bool Freeze,
bool Explosive,
float Force,
int SoundImpact,
int Layer = 0,
int Number = 0);
2010-05-29 07:25:38 +00:00
vec2 GetPos(float Time);
void FillInfo(CNetObj_Projectile *pProj);
virtual void Reset() override;
virtual void Tick() override;
virtual void TickPaused() override;
virtual void Snap(int SnappingClient) override;
virtual void SwapClients(int Client1, int Client2) override;
2010-05-29 07:25:38 +00:00
private:
vec2 m_Direction;
int m_LifeSpan;
int m_Owner;
int m_Type;
//int m_Damage;
2010-05-29 07:25:38 +00:00
int m_SoundImpact;
float m_Force;
int m_StartTick;
bool m_Explosive;
// DDRace
int m_Bouncing;
bool m_Freeze;
int m_TuneZone;
public:
void SetBouncing(int Value);
bool FillExtraInfo(CNetObj_DDNetProjectile *pProj);
2010-05-29 07:25:38 +00:00
};
#endif