ddnet/src/game/client/prediction/entities/projectile.h

61 lines
1.3 KiB
C
Raw Normal View History

/* (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. */
#ifndef GAME_CLIENT_PREDICTION_ENTITIES_PROJECTILE_H
#define GAME_CLIENT_PREDICTION_ENTITIES_PROJECTILE_H
#include <game/client/prediction/entity.h>
class CProjectileData;
class CProjectile : public CEntity
{
friend class CGameWorld;
2019-04-13 22:54:29 +00:00
friend class CItems;
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);
vec2 GetPos(float Time);
CProjectileData GetData() const;
void Tick() override;
2019-04-13 23:34:15 +00:00
bool Match(CProjectile *pProj);
void SetBouncing(int Value);
const vec2 &GetDirection() { return m_Direction; }
const int &GetOwner() { return m_Owner; }
const int &GetStartTick() { return m_StartTick; }
CProjectile(CGameWorld *pGameWorld, int ID, CProjectileData *pProj, const CNetObj_EntityEx *pEntEx = 0);
2019-04-13 23:34:15 +00:00
2019-04-13 22:54:29 +00:00
private:
vec2 m_Direction;
int m_LifeSpan;
int m_Owner;
int m_Type;
int m_SoundImpact;
float m_Force;
int m_StartTick;
bool m_Explosive;
// DDRace
int m_Bouncing;
bool m_Freeze;
2019-09-08 22:53:07 +00:00
int m_TuneZone;
};
#endif