Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for var B8 (movement substeps) #5300

Closed
DorpsGek opened this issue Sep 16, 2012 · 2 comments
Closed

Support for var B8 (movement substeps) #5300

DorpsGek opened this issue Sep 16, 2012 · 2 comments
Labels
component: NewGRF This issue is related to NewGRFs flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) patch from FlySpray This issue is in fact a Patch, but imported from FlySrpay

Comments

@DorpsGek
Copy link
Member

Eddi opened the ticket and wrote:

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: http://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?

Attachments

Reported version: trunk
Operating system: All


This issue was imported from FlySpray: https://bugs.openttd.org/task/5300
@DorpsGek
Copy link
Member Author

frosch wrote:

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.


This comment was imported from FlySpray: https://bugs.openttd.org/task/5300#comment11515

@DorpsGek
Copy link
Member Author

andythenorth closed the ticket.

Reason for closing: Won't implement

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 :)


This comment was imported from FlySpray: https://bugs.openttd.org/task/5300

@DorpsGek DorpsGek added flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) component: NewGRF This issue is related to NewGRFs wontfix patch from FlySpray This issue is in fact a Patch, but imported from FlySrpay labels Apr 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: NewGRF This issue is related to NewGRFs flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) patch from FlySpray This issue is in fact a Patch, but imported from FlySrpay
Projects
None yet
Development

No branches or pull requests

1 participant