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

Multiplayer RoffSystem Fixes #1165

Merged
merged 2 commits into from
Sep 16, 2023
Merged

Conversation

Daggolin
Copy link
Contributor

This pull request fixes two multiplayer bugs related to the RoffSystem:

  1. The RoffSystem used the wrong time value (engine time rather than module time) since the times were separated in 92e12a9. This caused playback to be incorrect after the first mapchange. The same bug was also introduced by jk2mv and has been fixed the same way in mvdevs/jk2mv@11a108e.
  2. The RoffSystem used long instead if int for the mVersion header field, causing 64-bit versions to be unable to parse roff files and playing them back.

The ROFF system previously used engine time instead of module time when setting the time values for trajectories of shared entities. This caused issues when the server module time has been reset on map change, because the game module would misinterpret the trajectories.
Change type of mVersion in TROFFHeader and TROFF2Header from long to int.
@ensiform
Copy link
Member

Are either of these affected in SP as well?

Copy link
Member

@ensiform ensiform left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

@ensiform ensiform merged commit f90488d into JACoders:master Sep 16, 2023
24 checks passed
@Daggolin
Copy link
Contributor Author

Are either of these affected in SP as well?

No. For SP the relevant roff functions should be in module code and use level.time.
The mVersion type has been fixed for SP since 10dca1d.

taysta pushed a commit to taysta/TaystJK that referenced this pull request Sep 24, 2023
* [MP] Fix ROFF system using incorrect time value.

The ROFF system previously used engine time instead of module time when setting the time values for trajectories of shared entities. This caused issues when the server module time has been reset on map change, because the game module would misinterpret the trajectories.

* [MP] Fix roff not working on 64 bit builds.

Change type of mVersion in TROFFHeader and TROFF2Header from long to int.

(cherry picked from commit f90488d)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants