mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-13 11:38:19 +00:00
5d9ee1736e
Conflicts: data/languages/dutch.txt data/languages/french.txt data/languages/german.txt data/languages/russian.txt src/game/server/entities/flag.cpp src/game/server/entities/flag.h src/game/server/gamecontext.cpp src/game/server/gamemodes/ctf.cpp src/game/server/gamemodes/ctf.h src/game/server/gamemodes/dm.cpp src/game/server/gamemodes/dm.h src/game/server/gamemodes/mod.cpp src/game/server/gamemodes/tdm.cpp src/game/server/gamemodes/tdm.h
33 lines
740 B
C++
33 lines
740 B
C++
/* (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_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);
|
|
|
|
virtual void Reset();
|
|
virtual void Tick();
|
|
virtual void Snap(int SnappingClient);
|
|
|
|
protected:
|
|
bool HitCharacter(vec2 From, vec2 To);
|
|
void DoBounce();
|
|
|
|
private:
|
|
vec2 m_PrevPos;
|
|
vec2 m_From;
|
|
vec2 m_Dir;
|
|
float m_Energy;
|
|
int m_Bounces;
|
|
int m_EvalTick;
|
|
int m_Owner;
|
|
int m_Type;
|
|
};
|
|
|
|
#endif
|