The International Simutrans Forum

Simutrans Extended => Simutrans-Extended development => Topic started by: Ves on June 18, 2016, 09:39:20 PM

Title: [develnew 5cd055f] Massive brakingforces...
Post by: Ves on June 18, 2016, 09:39:20 PM
The new feature with the braking forces reported for each vehicle in a convoy in the details window is very neat, but they are currently all shown as the value of 65535kN. However the added up braking force for the convoy seems sensible.
The unbraked vehicles are correctly reporting 0kN.
Title: Re: [develnew 5cd055f] Massive brakingforces...
Post by: jamespetts on June 18, 2016, 10:35:55 PM
That's rather odd - I can't reproduce that. What operating system are you using? I have tried changing the format specifier in the code to see whether that helps. It works for me just as well as it did before. Would you mind re-testing?
Title: Re: [develnew 5cd055f] Massive brakingforces...
Post by: Ves on June 18, 2016, 10:45:45 PM
No it is still reporting as 65535kN for all vehicles except unbraked ones.

Im using windows 10 and are compiling using MSVS 2015.
Title: Re: [develnew 5cd055f] Massive brakingforces...
Post by: jamespetts on June 18, 2016, 10:47:04 PM
Hmm - what pakset are you using?
Title: Re: [develnew 5cd055f] Massive brakingforces...
Post by: Ves on June 18, 2016, 10:58:15 PM
Im using pak britain, but havent compiled it fresh for a moment (my pakset is compiled 26/5). Do you think I would need to recompile it with a fresh makeobj?
Title: Re: [develnew 5cd055f] Massive brakingforces...
Post by: jamespetts on June 18, 2016, 11:02:56 PM
It might be worth having a go to eliminate any issues. I am not sure why I cannot reproduce this.
Title: Re: [develnew 5cd055f] Massive brakingforces...
Post by: DrSuperGood on June 18, 2016, 11:09:54 PM
What are you compiling exactly? Might be good to link the revision in case there is some confusion.

65535 is 0xFFFF (or 0XFFFFFFFF if a 16 bit precision fixed point) so it is not some random number. It is possible this is the result of a mathematics error (0 - 1) or that it is using unallocated memory. Debugging and seeing where the values come from during loading might help.
Title: Re: [develnew 5cd055f] Massive brakingforces...
Post by: Ves on June 19, 2016, 07:21:29 AM
After recompiling a fresh pakset with a fresh makeobj, the numbers seems to be represented correctly! :thumbsup: