DDNet documentation
Toggle main menu visibility
Loading...
Searching...
No Matches
laser.h
Go to the documentation of this file.
1
/* (c) Magnus Auvinen. See licence.txt in the root of the distribution for more information. */
2
/* If you are missing that file, acquire a complete release at teeworlds.com. */
3
#ifndef GAME_SERVER_ENTITIES_LASER_H
4
#define GAME_SERVER_ENTITIES_LASER_H
5
6
#include <
game/server/entity.h
>
7
#include <
game/server/interactions.h
>
8
9
class
CLaser
:
public
CEntity
10
{
11
public
:
12
CLaser
(
CGameWorld
*pGameWorld,
vec2
Pos,
vec2
Direction
,
float
StartEnergy,
int
Owner,
int
Type);
13
14
void
Reset
()
override
;
15
void
Tick
()
override
;
16
void
TickPaused
()
override
;
17
void
Snap
(
int
SnappingClient)
override
;
18
void
SwapClients
(
int
Client1,
int
Client2)
override
;
19
20
int
GetOwnerId
()
const override
{
return
m_Owner
; }
21
22
protected
:
23
bool
HitCharacter
(
vec2
From,
vec2
To);
24
void
DoBounce
();
25
26
private
:
27
vec2
m_From
;
28
vec2
m_Dir
;
29
vec2
m_TelePos
;
30
bool
m_WasTele
;
31
float
m_Energy
;
32
int
m_Bounces
;
33
int
m_EvalTick
;
34
int
m_Owner
;
35
bool
m_ZeroEnergyBounceInLastTick
;
36
CInteractions
m_InteractState
;
37
38
// DDRace
39
40
vec2
m_PrevPos
;
41
int
m_Type
;
42
int
m_TuneZone
;
43
bool
m_TeleportCancelled
;
44
bool
m_IsBlueTeleport
;
45
bool
m_BelongsToPracticeTeam
;
46
void
SyncInteractState
();
47
};
48
49
#endif
CEntity
Definition
entity.h:13
CInteractions
Definition
interactions.h:11
CLaser
Definition
laser.h:11
CLaser::m_Bounces
int m_Bounces
Definition
laser.h:34
CLaser::Tick
void Tick() override
CLaser::Reset
void Reset() override
Definition
laser.cpp:257
CLaser::Snap
void Snap(int SnappingClient) override
Definition
laser.cpp:284
CLaser::GetOwnerId
int GetOwnerId() const override
Definition
laser.h:20
CLaser::m_TeleportCancelled
bool m_TeleportCancelled
Definition
laser.h:43
CLaser::DoBounce
void DoBounce()
CLaser::m_PrevPos
vec2 m_PrevPos
Definition
laser.h:41
CLaser::HitCharacter
bool HitCharacter(vec2 From, vec2 To)
CLaser::CLaser
CLaser(CGameWorld *pGameWorld, vec2 Pos, vec2 Direction, float StartEnergy, int Owner, int Type)
CLaser::m_InteractState
CInteractions m_InteractState
Definition
laser.h:36
CLaser::m_Type
int m_Type
Definition
laser.h:42
CLaser::m_ZeroEnergyBounceInLastTick
bool m_ZeroEnergyBounceInLastTick
Definition
laser.h:37
CLaser::m_TelePos
vec2 m_TelePos
Definition
laser.h:29
CLaser::SyncInteractState
void SyncInteractState()
Definition
laser.cpp:304
CLaser::m_IsBlueTeleport
bool m_IsBlueTeleport
Definition
laser.h:44
CLaser::m_Energy
float m_Energy
Definition
laser.h:33
CLaser::m_WasTele
bool m_WasTele
Definition
laser.h:30
CLaser::m_TuneZone
int m_TuneZone
Definition
laser.h:43
CLaser::m_From
vec2 m_From
Definition
laser.h:31
CLaser::TickPaused
void TickPaused() override
Definition
laser.cpp:279
CLaser::m_BelongsToPracticeTeam
bool m_BelongsToPracticeTeam
Definition
laser.h:45
CLaser::CGameWorld
friend class CGameWorld
Definition
laser.h:12
CLaser::m_Owner
int m_Owner
Definition
laser.h:36
CLaser::m_Dir
vec2 m_Dir
Definition
laser.h:32
CLaser::m_EvalTick
int m_EvalTick
Definition
laser.h:35
CLaser::SwapClients
void SwapClients(int Client1, int Client2) override
Definition
laser.cpp:299
interactions.h
Direction
Direction
Definition
nameplates.cpp:211
entity.h
vec2
vector2_base< float > vec2
Definition
vmath.h:168
src
game
server
entities
laser.h
Generated by
1.18.0