From 72c06a258940696093f255fb1061beb58e1cdd0b Mon Sep 17 00:00:00 2001 From: Magnus Auvinen Date: Sat, 29 May 2010 07:25:38 +0000 Subject: copied refactor to trunk --- src/game/server/entities/laser.h | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 src/game/server/entities/laser.h (limited to 'src/game/server/entities/laser.h') diff --git a/src/game/server/entities/laser.h b/src/game/server/entities/laser.h new file mode 100644 index 00000000..040cfb4c --- /dev/null +++ b/src/game/server/entities/laser.h @@ -0,0 +1,28 @@ +#ifndef GAME_SERVER_ENTITIES_LASER_H +#define GAME_SERVER_ENTITIES_LASER_H + +#include + +class CLaser : public CEntity +{ +public: + CLaser(CGameWorld *pGameWorld, vec2 Pos, vec2 Direction, float StartEnergy, int Owner); + + virtual void Reset(); + virtual void Tick(); + virtual void Snap(int SnappingClient); + +protected: + bool HitCharacter(vec2 From, vec2 To); + void DoBounce(); + +private: + vec2 m_From; + vec2 m_Dir; + float m_Energy; + int m_Bounces; + int m_EvalTick; + int m_Owner; +}; + +#endif -- cgit 1.4.1