Make Unsynced reset and reordered registers

This commit is contained in:
Sofia 2020-08-08 02:10:20 +03:00
parent adf3acabeb
commit 5feda5b8c2
2 changed files with 4 additions and 2 deletions

View File

@ -20,10 +20,10 @@ namespace NeonTea.Quakeball.Networking {
RegisterPacket(typeof(HelloPckt));
RegisterPacket(typeof(SpawnPckt));
RegisterPacket(typeof(SelfIdentPckt));
RegisterPacket(typeof(MultiplePlayerUpdatesPckt));
RegisterPacket(typeof(PlayerUpdatePckt));
RegisterPacket(typeof(PlayerJumpPckt));
RegisterPacket(typeof(PlayerSyncPacket));
RegisterPacket(typeof(MultiplePlayerUpdatesPckt));
RegisterPacket(typeof(MultipleSyncsPckt));
}

View File

@ -48,7 +48,9 @@ namespace NeonTea.Quakeball.Networking.Packets {
if (p.Controlled == null) {
continue;
}
Syncs.Add(p.Controlled.CreateSyncPacket(p.Id, p.Unsynced));
PlayerSyncPacket pckt = p.Controlled.CreateSyncPacket(p.Id, p.Unsynced);
p.Unsynced = false;
Syncs.Add(pckt);
}
}