players stat reset after game end

This commit is contained in:
2023-08-14 14:59:37 +02:00
parent 3fe480d121
commit 4997715672

View File

@@ -19,7 +19,12 @@ void Game::Tick(std::uint64_t delta) {
void Game::Reset() { void Game::Reset() {
m_World->Reset(); m_World->Reset();
m_Players.clear();
for (auto& [id, player] : m_Players) {
player.SetExp(0);
player.SetGold(0);
player.SetTeamColor(TeamColor::None);
}
} }
Player* Game::GetPlayerById(PlayerID id) { Player* Game::GetPlayerById(PlayerID id) {