Skip to content

Commit 94657c1

Browse files
committed
Limit reversing by speed not power
1 parent 4697d8c commit 94657c1

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/game/car.cpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,14 @@ void Car::accelerate(bool deccelerate)
204204
MCVector2dF direction(m_dx, m_dy);
205205
if (deccelerate)
206206
{
207-
direction *= -0.33f;
207+
if (std::abs(speedInKmh()) < 25)
208+
{
209+
direction *= -1;
210+
}
211+
else
212+
{
213+
direction *= 0;
214+
}
208215
}
209216

210217
physicsComponent().addForce(direction * currentForce * damageFactor());

0 commit comments

Comments
 (0)