InZidiuZ / op-framework-issue-tracker

Effective bug-reporting and bug-tracking for op-framework
67 stars 41 forks source link

Cruise Control #1610

Closed mmxtt closed 3 years ago

mmxtt commented 3 years ago

Player Identification: Steam: https://steamcommunity.com/id/mattxiv/

Summary: When setting cruise control with (Z), the information popup in the top right hand corner always states "Cruise control set to 20mph". If you try to update the cruise control with (/cc [number]), this information popup is correct. It will say "Cruise control set to [number]mph" If you then try to update the cruise control with (Z), the information popup in the top right hand corner will always state the number you used when setting the cruise control with (/cc [number])

Steps to Reproduce: I tested this on a sovereign bike. Get into a vehicle and start to speed up. Press Z to limit it to 20mph. See that you are going 20mph and that it shows that the cruise has been set to 20mph. Press Z to turn off the limit, speed up and press it again. See that you are going above 20mph but the information in the top right corner says you set it to 20mph. Press Z to turn off the limit, and type /cc 100. See that you are limited at 100mph by travelling at that speed, and see that it shows you set the cruise control to 100mph. Press Z to turn off the limit, slow down and press it again. See that you are limited to a speed below 100mph, yet the information in the top right corner says you set it to 100mph.

Expected Results: The information box tells you exactly what number you set it to, not the previous number or a static number.

Actual Results: The information box is inaccurate and does not follow what we're actually cruising at,

Additional Information

Notes: Weirdly enough, if you stop (0mph) and type (/cc) then speed up and continue to press (Z) again and again, you can see that it now works perfectly. But if you type (/cc 100) again (for example) it will limit it to 100mph, you can turn off the cruise control once more to go above 100mph, then set the cruise control again and the information box will tell you that you set it to 100, even though you are faster.

Also, the above happens only if you go above 100mph, if you tried setting the cruise with (Z) after setting it to 100, it will say it has been set to 100 again, and you are indeed limited at that amount.

InZidiuZ commented 3 years ago

Hi,

I read through this and tried following the reproduction steps multiple times but got lost. Not sure if at the beginning you wanted me to do /cc or not.

Though from what I can gather, the main issue raised is that when doing /cc X and enabling the cruise control when going Y, a speed faster than X, it'll not lock you to X instantly. That's because if I'd do that, it'd create a very weird and unrealistic effect on the vehicle of a 'noclip-like' speed change. Thus, say you start your vehicle going Y, as you slow down towards X, it'll gradually set your true speed limit to whichever number you are going. That means if you're going 120 and your /cc is set to 100 and after having enabled the cruise you slow down to 110, 110 is the new limit.

I hope this makes sense. From my testing I was not able to find any unintended behavior.