MCPcopy Create free account
hub / github.com/GlobedGD/globed2 / onLocalPlayerDeath

Method onLocalPlayerDeath

src/modules/active-player-switch/APSModule.cpp:44–51  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

42}
43
44void APSModule::onLocalPlayerDeath(GlobedGJBGL* gjbgl, bool real) {
45 // don't respawn immediately if we are not the main player, instead wait for the main player to respawn us
46 auto apl = APSPlayLayer::get(gjbgl);
47 auto& cont = apl->m_fields->m_controller;
48 if (cont.m_gameActive && cont.m_activePlayer != 0 && !cont.m_meActive) {
49 gjbgl->cancelLocalRespawn();
50 }
51}
52
53void APSModule::onPlayerRespawn(GlobedGJBGL* gjbgl, RemotePlayer* player) {
54 auto apl = APSPlayLayer::get(gjbgl);

Callers

nothing calls this directly

Calls 2

cancelLocalRespawnMethod · 0.80
getFunction · 0.50

Tested by

no test coverage detected