mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-01-09 08:22:28 +00:00
WIP: improved countersteering
This commit is contained in:
parent
660d2f6454
commit
44b642ffa3
1 changed files with 8 additions and 1 deletions
|
|
@ -8854,10 +8854,17 @@ INT16 K_UpdateSteeringValue(INT16 inputSteering, INT16 destSteering)
|
||||||
// player->steering is the turning value, but with easing applied.
|
// player->steering is the turning value, but with easing applied.
|
||||||
// Keeps micro-turning from old easing, but isn't controller dependent.
|
// Keeps micro-turning from old easing, but isn't controller dependent.
|
||||||
|
|
||||||
const INT16 amount = KART_FULLTURN/3;
|
INT16 amount = KART_FULLTURN/3;
|
||||||
INT16 diff = destSteering - inputSteering;
|
INT16 diff = destSteering - inputSteering;
|
||||||
INT16 outputSteering = inputSteering;
|
INT16 outputSteering = inputSteering;
|
||||||
|
|
||||||
|
|
||||||
|
if ((inputSteering > 0 && destSteering < inputSteering) || (inputSteering < 0 && destSteering > inputSteering))
|
||||||
|
{
|
||||||
|
amount = KART_FULLTURN;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if (abs(diff) <= amount)
|
if (abs(diff) <= amount)
|
||||||
{
|
{
|
||||||
// Reached the intended value, set instantly.
|
// Reached the intended value, set instantly.
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue