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:
Jocke
2016-03-12 17:49:50 +01:00
parent 0c1a2d3160
commit c544f349fd
9 changed files with 64 additions and 12 deletions
+3
View File
@@ -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);