The logic for removing the world is working but when we send the map again the clients memory usage goes crazy.
This commit is contained in:
@@ -545,9 +545,12 @@ bool Server::OnPlayerDeath(const Events::PlayerDeath& e)
|
||||
|
||||
bool Server::OnWin(const Events::Win & e)
|
||||
{
|
||||
Events::Reset reset;
|
||||
m_EventBroker->Publish(reset);
|
||||
Packet removeMap(MessageType::RemoveWorld);
|
||||
reliableBroadcast(removeMap);
|
||||
removeWorld();
|
||||
// Hardcoded for now.
|
||||
auto entityFile = ResourceManager::Load<EntityFile>("Schema/Entities/CP_Rocky2.xml");
|
||||
entityFile->MergeInto(m_World);
|
||||
Packet newWorld(MessageType::Snapshot);
|
||||
|
||||
Reference in New Issue
Block a user