MCPcopy Create free account
hub / github.com/ddnet/ddnet / CLight

Method CLight

src/game/server/entities/light.cpp:15–30  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13#include <game/teamscore.h>
14
15CLight::CLight(CGameWorld *pGameWorld, vec2 Pos, float Rotation, int Length,
16 int Layer, int Number) :
17 CEntity(pGameWorld, CGameWorld::ENTTYPE_LASER)
18{
19 m_To = vec2(0.0f, 0.0f);
20 m_Core = vec2(0.0f, 0.0f);
21 m_Layer = Layer;
22 m_Number = Number;
23 m_Tick = (Server()->TickSpeed() * 0.15f);
24 m_Pos = Pos;
25 m_Rotation = Rotation;
26 m_Length = Length;
27 m_EvalTick = Server()->Tick();
28 GameWorld()->InsertEntity(this);
29 Step();
30}
31
32bool CLight::HitCharacter()
33{

Callers

nothing calls this directly

Calls 4

TickSpeedMethod · 0.80
ServerClass · 0.50
TickMethod · 0.45
InsertEntityMethod · 0.45

Tested by

no test coverage detected