Open NiteKat opened 4 years ago
Sounds like this bug would also be in the original game, has that been tested?
I just tried to reproduce in the GOG version, and was unable to do so. That doesn't completely rule out it being in the original game.
I also tried to reproduce in DevilutionX again, and wasn't able to do so. This makes me think this is a frame perfect bug, if not nearly so.
Thanks for testing it
Describe Client joining an existing game while the host of existing game transitions from one level to another, the joining client gets frozen with a black screen (town music will still play), while the host client will remain unaffected.
To Reproduce Steps to reproduce the behavior:
Expected behavior The host should load the new level, and the joining client should load town and successfully join the game.
Screenshots This screenshot shows how it should look when the joining client gets stuck.
Additional context It seems to be stuck looping in in msg_pre_packet(). The joining client is trying to process a CMD_NEWLVL command from pnum 0, but ParseCmd is stuck returning 0 on line 182 because on line 985 sgwPackPlrOffsetTbl[pnum] != 0 for pnum 0 (it was value 976 in my test). This forces ParseCmd to return 0, so spaceLeft is never modified, therefore it never breaks out of while (spaceLeft != pkt->dwSpaceLeft), meaning it never moves onto the next packet (or does anything with the CMD_NEWLVL).