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

Method OnCharacterSpawn

src/game/server/gamecontroller.cpp:532–543  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

530}
531
532void IGameController::OnCharacterSpawn(class CCharacter *pChr)
533{
534 pChr->SetTeams(&Teams());
535 Teams().OnCharacterSpawn(pChr->GetPlayer()->GetCid());
536
537 // default health
538 pChr->IncreaseHealth(10);
539
540 // give default weapons
541 pChr->GiveWeapon(WEAPON_HAMMER);
542 pChr->GiveWeapon(WEAPON_GUN);
543}
544
545void IGameController::HandleCharacterTiles(CCharacter *pChr, int MapIndex)
546{

Callers

nothing calls this directly

Calls 5

SetTeamsMethod · 0.80
IncreaseHealthMethod · 0.80
GetCidMethod · 0.45
GetPlayerMethod · 0.45
GiveWeaponMethod · 0.45

Tested by

no test coverage detected