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

Vehicle::coord not update when sprite changes without the vehicle being moved #3060

Closed
DorpsGek opened this issue Jul 28, 2009 · 4 comments
Closed
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)

Comments

@DorpsGek
Copy link
Member

andythenorth opened the ticket and wrote:

Ach, this one might turn out to be bad nfo by me, but if so I'm unable to figure out why.

Issue: some HEQS road vehicle sprites disappear intermittently whilst loading. Sometimes artefacts of several pixels are left in the screen from the 'missing' sprite. Sprites reappear intermittently, or if a game window is moved over them, dropped, then picked up and moved again.

Easiest description is in the attached image: on the left the sprites for the rear trailer are missing. On the right, the sprites have reappeared. The only difference is that I moved the vehicle window as described above.

This vehicle is unusual in that it includes a transparent sprite, used when the vehicle is travelling unloaded. It could be a problem with my code, or perhaps it's a bug and hasn't been noticed because usually the difference would be visually hard to notice. Drop me a line for nfo etc. if that helps.

This is present in 0.7.2 RC2 and nightly 16762. To reproduce, try a full load of wood with the Cascade C16 logging truck in HEQS v0.5c (available on BaNaNas).

cheers,

Andy

Attachments

Reported version: 0.7.2-RC2
Operating system: All


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

frosch wrote:

To simplify things, here is a testgame that shows the effect.

It is not related to spritesorting, so no #119 :o

Activating bounding boxes (Ctrl-B) shows that even they glitch, so something is wrong with the vehicle display position hash or similiar.

On a side note: Andy, why are there more articulated parts than one would expect? (Edit: ok, the trailer is not really visible when not loaded)

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/3060#comment6395

@DorpsGek
Copy link
Member Author

DorpsGek commented Aug 2, 2009

Rubidium wrote:

Could the following have something to do with the glitching?
dbg: [grf] [heqs__heavy_equipment_set_.0.5c/heqs.grf:2774] NewSpriteGroup (Deterministic): Invalid pseudo sprite length 12 (expected 14)!


This comment was imported from FlySpray: https://bugs.openttd.org/task/3060#comment6429

@DorpsGek
Copy link
Member Author

DorpsGek commented Aug 3, 2009

frosch wrote:

Ok, the initial weirdness with the bounding boxes turned out as false alarm.

But now I guess I found the cause:
VehicleMove sets v->coord when the vehicle arrives at the stop. But the sprite of the unloaded vehicle is significantly smaller than the loaded one. So while the vehicle is loading it is not considered for drawing when it needs to. (Note for debugging: coord is not saved, so when a game with vehicle showing the glitch is saved and loaded again, it is gone :( )

So, attached is a better testgame for reproducing. Unpause the game. Let the vehicle load to 30%, pause the game. Scrolling will make the vehicle vanish. Forcing redraw by toggling Ctrl-B will make it appear again. A save/load cycle removes the glitch.

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/3060#comment6441

@DorpsGek
Copy link
Member Author

DorpsGek commented Aug 8, 2009

frosch closed the ticket.

Reason for closing: Fixed

in r17121


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

@DorpsGek DorpsGek closed this as completed Aug 8, 2009
@DorpsGek DorpsGek added flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) Vehicles labels Apr 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)
Projects
None yet
Development

No branches or pull requests

1 participant