OpenTTD

Tasklist

FS#5300 - Support for var B8 (movement substeps)

Attached to Project: OpenTTD
Opened by Johannes E. Krause (Eddi) - Sunday, 16 September 2012, 10:50 GMT
Last edited by andythenorth (andythenorth) - Friday, 25 August 2017, 09:42 GMT
Type Patch
Category NewGRF
Status Closed
Assigned To No-one
Operating System All
Severity Low
Priority Normal
Reported Version trunk
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

This patch maps the OpenTTD-internal "progress" variable to the variable 80+38 (B8).

from the TTD internals documentation:
> 38 B On each round of vehicle processing, if the vehicle is not stopped, the low byte of current speed (or 3/4 of the current speed, if bit 0 of vehicle direction is clear) is subtracted from this field; if the result overflows the vehicle is to move by 1 unit of location (for trains, the vehicle additionally is to move by the number of units equal to the high byte of the current speed)

Forum-Discussion: https://www.tt-forums.net/viewtopic.php?f=29&t=62565

Something i noticed: neither in oldloader.cpp nor in AfterLoadGame, i found any evidence of a conversion going on, so:
1) this never worked like it is documented above, or
2) this was changed somewhen in OpenTTD, but somebody decided that the change on loading old savegames was insignificant enough to not worry.

can someone confirm any of that? how does Var B8 behave in TTDPatch?
This task depends upon

Closed by  andythenorth (andythenorth)
Friday, 25 August 2017, 09:42 GMT
Reason for closing:  Won't implement
Additional comments about closing:  Flyspray clean up: ~5 years old, and not obvious what should be done with this next, so closing. If this offends, discuss with andythenorth in irc. Thanks. Also hi Eddi :)
Comment by frosch (frosch) - Sunday, 16 September 2012, 12:54 GMT
In OTTD 0.1 that slot is indeed used for "progress". But already in 0.5 it is not exposed to NewGRFs.
I would suspect that the TTDP description is only correct for trains, and that the value changed in OTTD at some point. Accelerations works very different for the various vehicle types.
In any case I would not use variable B8 for this. Use a 40+x variable, but even then I doubt this works nice when stopping at signals or stations.

Loading...