Unlocks mouse when changing to SpectatorCamera and locking when respawning.

This commit is contained in:
William Moberg
2016-03-04 09:49:27 +01:00
parent 7a2f1ac9fd
commit 0dfe00b406
4 changed files with 24 additions and 9 deletions
+3
View File
@@ -1,4 +1,5 @@
#include "Systems/PlayerSpawnSystem.h"
#include "Core/ELockMouse.h"
PlayerSpawnSystem::PlayerSpawnSystem(SystemParams params)
: System(params)
@@ -100,6 +101,8 @@ void PlayerSpawnSystem::Update(double dt)
e.Player = player;
e.Spawner = spawner;
m_EventBroker->Publish(e);
Events::LockMouse lock;
m_EventBroker->Publish(lock);
++numSpawnedPlayers;
it = m_SpawnRequests.erase(it);
break;