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

Method CanSpawn

src/game/server/gamecontroller.cpp:168–181  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

166}
167
168bool IGameController::CanSpawn(int Team, vec2 *pOutPos, int ClientId)
169{
170 // spectators can't spawn
171 if(Team == TEAM_SPECTATORS)
172 return false;
173
174 CSpawnEval Eval;
175 EvaluateSpawnType(&Eval, SPAWNTYPE_DEFAULT, ClientId);
176 EvaluateSpawnType(&Eval, SPAWNTYPE_RED, ClientId);
177 EvaluateSpawnType(&Eval, SPAWNTYPE_BLUE, ClientId);
178
179 *pOutPos = Eval.m_Pos;
180 return Eval.m_Got;
181}
182
183bool IGameController::OnEntity(int Index, int x, int y, int Layer, int Flags, bool Initial, int Number)
184{

Callers 2

TryRespawnMethod · 0.80
HandleTilesMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected