Brakes working
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
@@ -94,15 +94,8 @@ void Systems::TankSteeringSystem::TowerSteeringInputController::Update( double d
|
||||
|
||||
bool Systems::TankSteeringSystem::TankSteeringInputController::OnCommand(const Events::InputCommand &event)
|
||||
{
|
||||
float val;
|
||||
if(abs(event.Value) < 0.3f)
|
||||
{
|
||||
val = 0.f;
|
||||
}
|
||||
else
|
||||
{
|
||||
val = event.Value;
|
||||
}
|
||||
|
||||
float val = event.Value;
|
||||
|
||||
if (event.Command == "horizontal")
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user