powerup bugfix

This commit is contained in:
ViktorLjung
2014-03-13 23:01:55 +01:00
parent c53913f63b
commit 7013546314
3 changed files with 25 additions and 41 deletions
+4 -6
View File
@@ -153,18 +153,16 @@ void Systems::PlayerSystem::UpdateEntity(double dt, EntityID entity, EntityID pa
if(name == "PowerUp")
{
auto powerupComp = m_World->GetComponent<Components::PowerUp>(ent, "PowerUp");
if(powerupComp != nullptr)
{
transform->Velocity.z = powerupComp->Speed;
m_poweruptimeleft = 3.f;
m_World->RemoveEntity(ent);
}
transform->Velocity.z = powerupComp->Speed;
m_poweruptimeleft = 3.f;
m_World->RemoveEntity(ent);
}
}
if(m_poweruptimeleft <= 0)
{
transform->Velocity.z = m_basespeed;
}
//fixa FOV
// Update camera