if ord(self.data[0]) == 15: # state data
self.playerid = ord(self.data[1])
self.spawned = False # missing line
A new state data packet might appear if, while recording, the server changes map. Without that line, we can not spawn again to spectate after a map change.
I think the code:
https://github.com/BR-/aos_replay/blob/d478d667c0c19cb8490345a4920b7f92dbac4d84/playback.py#L47-L48
misses this line
self.spawned = False
.A new state data packet might appear if, while recording, the server changes map. Without that line, we can not spawn again to spectate after a map change.