MCPcopy Create free account
hub / github.com/deathkiller/jazz2-native / GetPlayerCount

Method GetPlayerCount

Sources/Jazz2/LevelInitialization.cpp:78–95  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

76 }
77
78 std::int32_t LevelInitialization::GetPlayerCount(const PlayerCarryOver** firstPlayer) const
79 {
80 if (firstPlayer != nullptr) {
81 *firstPlayer = nullptr;
82 }
83
84 std::int32_t playerCount = 0;
85 for (std::int32_t i = playerCount; i < MaxPlayerCount; i++) {
86 if (PlayerCarryOvers[i].Type != PlayerType::None) {
87 playerCount++;
88 if (firstPlayer != nullptr && *firstPlayer == nullptr) {
89 *firstPlayer = &PlayerCarryOvers[i];
90 }
91 }
92 }
93
94 return playerCount;
95 }
96}

Callers 4

HandleEndOfGameMethod · 0.80
SaveEpisodeEndMethod · 0.80
SaveEpisodeContinueMethod · 0.80
SpawnPlayersMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected