Loading

Paste #pes8pzyp7

  1. 19:23 < juzza1> strings.cpp line 748 begins the conversion from kmhish->display, it then calls the ToDisplay (line 647) of the unit, with the input value multiplied by 10, and only after the ToDisplay function is done, is the value divided by 16. In nmlc, the value is divided right after multiplication by 10. Am I reading this right? So ottd_display_speed in nmlc should be changed to divide by 16 after other calculations
  2. 19:23 < juzza1> I am referring to this strings.cpp http://git.openttd.org/?p=trunk.git;a=blob;f=src/strings.cpp;h=d2ce762b70cf5a4d47967baaace620ee066a2f1c;hb=HEAD
  3. 19:23 < juzza1> ottd_display_speed is at line 257 in http://git.openttd.org/?p=trunk.git;a=blob;f=src/strings.cpp;h=d2ce762b70cf5a4d47967baaace620ee066a2f1c;hb=HEAD
  4. 19:24 < juzza1> If I do that fix, the values seem right in the output nfo
  5. 19:24 < juzza1> whoops, ottd_display_speed here http://dev.openttdcoop.org/projects/nml/repository/entry/nml/actions/action0properties.py
  6. 19:47 < Rubidium> then the implementation in NML might be "wrong"
  7. 19:48 < juzza1> "svn diff -r 23944:23945 src/strings.cpp" at the ottd source shows the change, before that the division was done earlier (as is in nmlc currently)
  8. 19:48 < Rubidium> does "(int(value.value / divisor) * 10 * unit.ottd_mul >> unit.ottd_shift) // 16" work?
  9. 19:49 < juzza1> yes

Comments