experimental fix for pickup

This commit is contained in:
verysecrethero
2016-02-25 15:23:00 +01:00
parent bc227c3d61
commit 8740e8b77a
5 changed files with 81 additions and 13 deletions
+2 -2
View File
@@ -208,12 +208,12 @@ bool PlayerSpawnSystem::OnPlayerDeath(Events::PlayerDeath& e)
void PlayerSpawnSystem::CheckForLatePlayers(double dt) {
for (size_t i = 0; i < m_LatePlayersVector.size(); i++)
{
auto& req = m_SpawnRequests[i];
auto& req = m_LatePlayersVector[i];
req.timeSinceDeath += dt;
if (req.timeSinceDeath > 2.5f) {
//good but, this will only spawn them in the next cycle - i.e. not immediately
//m_SpawnRequests.push_back(spawnReq);
//insta spawn
auto playerSpawns = m_World->GetComponents("PlayerSpawn");
for (auto& cPlayerSpawn : *playerSpawns) {