Fixes smaller problems

This commit is contained in:
PlatinumSkink
2015-10-08 16:53:51 +02:00
parent 74d7e1feb7
commit 3ac6fdce5f
5 changed files with 15 additions and 8 deletions
+7 -6
View File
@@ -104,6 +104,12 @@ void dd::Systems::BallSystem::UpdateEntity(double dt, EntityID entity, EntityID
if (templateCheck != nullptr){ return; }
if (ballComponent != nullptr) {
if (ReplaceBall()) {
SetReplaceBall(false);
m_Waiting = true;
ballComponent->Waiting = true;
}
if (ballComponent->Waiting) {
if (m_Waiting == false) {
ballComponent->Waiting = false;
@@ -126,12 +132,7 @@ void dd::Systems::BallSystem::UpdateEntity(double dt, EntityID entity, EntityID
return;
}
}
if (ReplaceBall()) {
SetReplaceBall(false);
m_Waiting = true;
ballComponent->Waiting = true;
}
auto transformBall = m_World->GetComponent<Components::Transform>(entity);
if (glm::abs(transformBall->Velocity.y) < 2) {
if (transformBall->Velocity.y > 0) {