michael-fadely / sa2-battle-network

Online multiplayer for Sonic Adventure 2 PC
MIT License
31 stars 1 forks source link

PacketBroker::WaitForPlayers soft locks when called in quick succession #3

Closed michael-fadely closed 8 years ago

michael-fadely commented 8 years ago

This is preventing synchronization of rand() calls for Emerald Hunting (although I want to properly reverse engineer the emerald manager), as well as aggressive frame synchronization.

michael-fadely commented 8 years ago

Looks like the actual issue is that one game instance can be any number of frames ahead or behind, and if another hook calls WaitForPlayers, they both get stuck waiting for messages they'll never receive. The moral of the story is to inject in a better locations, or not call it so frequently.