fixed more bugs

This commit is contained in:
viktorljung
2015-10-07 15:40:04 +02:00
parent 9ef845955b
commit 562a5fa269
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -58,7 +58,7 @@ namespace dd
struct Impulse
{
b2Body* Body;
b2Vec2 Impulse;
b2Vec2 Vector;
b2Vec2 Point;
};
bool m_Pause = false;
+2 -2
View File
@@ -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();