Brakes working

This commit is contained in:
ViktorLjung
2014-05-19 00:58:48 +02:00
parent f14a83caa8
commit 998ee3cfab
6 changed files with 18 additions and 21 deletions
+4
View File
@@ -582,6 +582,10 @@ bool Systems::PhysicsSystem::OnTankSteer(const Events::TankSteer &event)
hkpVehicleDriverInputAnalogStatus* deviceStatus = (hkpVehicleDriverInputAnalogStatus*)m_Vehicles[event.Entity]->m_deviceStatus;
deviceStatus->m_positionX = event.PositionX;
deviceStatus->m_positionY = event.PositionY;
if(event.PositionY > 0)
{
deviceStatus->m_reverseButtonPressed = true;
}
deviceStatus->m_handbrakeButtonPressed = event.Handbrake;
m_PhysicsWorld->unmarkForWrite();
}