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

42 lines
873 B
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_LASER_H
#define GAME_SERVER_ENTITIES_LASER_H
#include <game/server/entity.h>
class CLaser : public CEntity
{
public:
CLaser(CGameWorld *pGameWorld, vec2 Pos, vec2 Direction, float StartEnergy, int Owner, int Type);
2010-05-29 07:25:38 +00:00
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);
2010-05-29 07:25:38 +00:00
protected:
bool HitCharacter(vec2 From, vec2 To);
void DoBounce();
2010-05-29 07:25:38 +00:00
private:
vec2 m_From;
vec2 m_Dir;
2013-07-18 23:06:48 +00:00
vec2 m_TelePos;
2013-07-20 12:16:41 +00:00
bool m_WasTele;
2010-05-29 07:25:38 +00:00
float m_Energy;
int m_Bounces;
int m_EvalTick;
int m_Owner;
int m_TeamMask;
// DDRace
vec2 m_PrevPos;
int m_Type;
int m_TuneZone;
2018-02-14 15:27:26 +00:00
bool m_TeleportCancelled;
2010-05-29 07:25:38 +00:00
};
#endif