Teardown-Issue-Tracker-Maintainers / Teardown-Issue-Tracker

A public repo for the community to track issues/bugs/feature requests in Teardown.
11 stars 6 forks source link

[Bug] GetProperty(wheel, "steer") returns integer #535

Closed TTFH closed 3 months ago

TTFH commented 3 months ago

Describe the bug

The game does supports non-integer values for the steer property on wheels in the editor, that feature is used in a lot of vanilla and modded vehicles, for example the big excavator, both cranes, etc. However the function GetProperty() will truncate that value to an integer, perhaps this happen because in the implementation lua_tointeger is used instead of lua_tonumber which results in an implicit float to int conversion.

Steps to reproduce the behavior

  1. Create a vehicle with steer = 0.9 or some other value
  2. Obtain the vehicle wheels and call GetProperty(wheel, "steer")
  3. Notice the function returns 0 instead of the correct value

Expected behavior

For the function to return the correct values.

Environment

Additional context

No response

Gregory-Gregory commented 3 months ago

@TTFH hi!

Thank you for this bug report. The information has been shared with the QA team. If they need any additional details, I will let you know,