-
-
Notifications
You must be signed in to change notification settings - Fork 437
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
Revert "setWaterLevel: add option to change water level outside world… #1882
Conversation
Uh, I'm not sure what to do about the bitstream version tho.... Older servers might still write that portion(that is, the bit + float), which would cause newer clients(that is, which have this PR) to crash |
Can you provide better link? |
Yes,
It is the same crash as in #1873 |
Ah, my bad, I see.. if (bitStream.Can(eBitStreamVersion::SetWaterLevel_ChangeOutsideWorldLevel)) Just search for it, I can't give a link to it, for whatever reason. It's in |
Why |
How to repro related issue? |
I have no clue. It seems like connecting to a server running an older version (that is, one that doesnt have this commit) will make the client (which has this commit) crash. That's the part I dont understand either(from the description):
|
Yep, connecting is enough to get a crash (i was connecting to server running r20693). |
But i can connect to older MTA version, So |
r20693 server and client are unavailable to download. Can we confirm this bug for another versions? |
They're available for download.
|
20694 and 20689 only |
Interesting.. here, see the |
check next version |
@@ -446,12 +446,12 @@ enum class eBitStreamVersion : unsigned short | |||
|
|||
// setWaterLevel: add bIncludeWorldSeaLevel and bIncludeOutsideWorldLevel | |||
// 2020-11-03 0x70 | |||
SetWaterLevel_ChangeOutsideWorldLevel, | |||
// SetWaterLevel_ChangeOutsideWorldLevel, - Reverted commit |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can't do this, because servers with SetWaterLevel_ChangeOutsideWorldLevel
bitstream version will send SetWaterLevel_ChangeOutsideWorldLevel
packets for clients with PedEnterExit
version.
Turns out the issue is only present in r20693, it was later fixed in r20694. |
According to our research over at #development, and thanks to Dutchman's help the issue seems to be caused by this commit. (Since it modifies the MapInfo packet, and even after reverting bd89570 it still exists I presume this is the commit causing the issue).
As of my knowledge the client bitstream version reflects the one the stream was written with.
Eg.: Server is at 0x10, client at 0x20, the bitstream (that is,
bitStream.getVersion()
on the client) will at most be 0x10.If not, then this line causes the issue, since a
bit
might betrue
at the point whenReadBit
is called, which in turn reads 4 bytes (the float), and hence the whole packet is corrupted.