From 562a5fa269831a224c5fdbccdcadcf0eb89922b0 Mon Sep 17 00:00:00 2001 From: viktorljung Date: Wed, 7 Oct 2015 15:40:04 +0200 Subject: [PATCH] fixed more bugs --- include/Physics/PhysicsSystem.h | 2 +- src/game/Physics/PhysicsSystem.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/Physics/PhysicsSystem.h b/include/Physics/PhysicsSystem.h index 8424ba0..f1a81a9 100755 --- a/include/Physics/PhysicsSystem.h +++ b/include/Physics/PhysicsSystem.h @@ -58,7 +58,7 @@ namespace dd struct Impulse { b2Body* Body; - b2Vec2 Impulse; + b2Vec2 Vector; b2Vec2 Point; }; bool m_Pause = false; diff --git a/src/game/Physics/PhysicsSystem.cpp b/src/game/Physics/PhysicsSystem.cpp index 4cc25a9..fa29bed 100755 --- a/src/game/Physics/PhysicsSystem.cpp +++ b/src/game/Physics/PhysicsSystem.cpp @@ -43,7 +43,7 @@ bool dd::Systems::PhysicsSystem::SetImpulse(const Events::SetImpulse &event) Impulse i; i.Body = it->second; - i.Impulse = impulse; + i.Vector = impulse; i.Point = point; m_Impulses.push_back(i); @@ -155,7 +155,7 @@ void dd::Systems::PhysicsSystem::Update(double dt) //Apply Impulses Must be done after SyncEntitiesWithBodies for (auto i : m_Impulses) { - i.Body->ApplyLinearImpulse(i.Impulse, i.Point, true); + i.Body->ApplyLinearImpulse(i.Vector, i.Point, true); } m_Impulses.clear();