mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-12-26 04:11:18 +00:00
SRB2 Kart Public
db7d217199
Exit your server desync fix This branch fixes this bug: https://mb.srb2.org/showthread.php?t=41811 Here's an explanation of how this bug is actually happening: * Pressing Enter with "Start" selected calls `D_MapChange` to make a map change command. (Note that part of it is actually delayed because it's called from a menu, but this isn't relevant to the bug) * `D_MapChange` itself calls `SV_StartServer` to start up the server, if you're supposed to be the server player. * Pressing Esc while starting up a server like shown in the gif causes the server to be cancelled, and go back to the title screen. * HOWEVER, since we're still in `D_MapChange`, the map change command is made anyway. * Since we're not in a netgame as expected, no random seed is added, and the map change command has a total size of 9 bytes (1 for the id + 8 for the actual data). This is then stored in the net command buffer. The random seed would add another 4 bytes if it WAS added, note. * Next time you start a server, and let it work as normal, two more net commands are added: an "add player" command (size 3), and a map change command (size 13, including random seed this time). Your net command buffer now has a total size of **25** (9 + 3 + 13). * This net command buffer is then sent as a `PT_TEXTCMD` packet to yourself. * SRB2 recieves the `PT_TEXTCMD` you sent to yourself, and some time later, tries to run the net commands stored in it. * The first map command is read as if it's size 13 rather than size 9 (it isn't), mistakeningly thinking a 4-byte random seed is stored (since you ARE in a netgame now). This means your buffer reads what it thinks is the next net command starting from position **[14]** in the buffer. * Bad luck, it gets an id of **0**, which doesn't correspond with any net command! * This message is then printed in the console: > WARNING: Got unknown net command [14]=0 (max 25) * The game subsequently kicks you out the server with a "desynch" message. tl;dr The game doesn't correctly cancel the map change when you cancel the server with Esc like that. This is not a good thing. See merge request !188 |
||
---|---|---|
.circleci | ||
android | ||
assets | ||
bin | ||
cmake/Modules | ||
debian | ||
doc | ||
extras | ||
libs | ||
objs | ||
src | ||
tools | ||
.gitattributes | ||
.gitignore | ||
.travis.yml | ||
Android.mk | ||
appveyor.yml | ||
CMakeLists.txt | ||
comptime.bat | ||
comptime.mk | ||
comptime.props | ||
comptime.sh | ||
cpdebug.mk | ||
Doxyfile | ||
LICENSE | ||
README.md | ||
srb2-vc9.sln | ||
srb2-vc10.sln | ||
SRB2.cbp | ||
Srb2.dev | ||
srb2.png | ||
SRB2_common.props | ||
SRB2_Debug.props | ||
SRB2_Release.props |
Sonic Robo Blast 2
Sonic Robo Blast 2 is a 3D Sonic the Hedgehog fangame based on a modified version of Doom Legacy.
Dependencies
- NASM (x86 builds only)
- SDL2 (Linux/OS X only)
- SDL2-Mixer (Linux/OS X only)
- libupnp (Linux/OS X only)
- libgme (Linux/OS X only)
Warning: 64-bit builds are not netgame compatible with 32-bit builds. Use at your own risk.
Compiling
See SRB2 Wiki/Source code compiling
Disclaimer
Sonic Team Junior is in no way affiliated with SEGA or Sonic Team. We do not claim ownership of any of SEGA's intellectual property used in SRB2.