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

Train HUD disappears after level change or save game load #3064

Open
SamVanheer opened this issue Feb 27, 2021 · 0 comments
Open

Train HUD disappears after level change or save game load #3064

SamVanheer opened this issue Feb 27, 2021 · 0 comments

Comments

@SamVanheer
Copy link

The train HUD disappears after a level change or save game load.

This happens because when either happens the game is saved and loaded. While loading CBasePlayer::Precache is called, which resets the train variable:

m_iTrain = TRAIN_NEW;

This should be:

m_iTrain |= TRAIN_NEW;

The restored value is retained this way, and the flag that gets added ensures the train speed value is correctly sent to the client, which then displays the train HUD correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants