Make a safe-check for HandleUpdatePlayer and HandleSyncPckt
This commit is contained in:
parent
72aa771a83
commit
becb920129
@ -131,14 +131,14 @@ namespace NeonTea.Quakeball.Networking.Instances {
|
||||
}
|
||||
|
||||
private void HandleUpdatePlayer(PlayerUpdatePckt pckt) {
|
||||
if (pckt.PlayerId == LocalPlayer.Id) {
|
||||
if (pckt.PlayerId == LocalPlayer.Id && Players[pckt.PlayerId] != null) {
|
||||
return; // Ignore, again.
|
||||
}
|
||||
Players[pckt.PlayerId].Controlled.ProcessUpdatePacket(pckt);
|
||||
}
|
||||
|
||||
private void HandleSyncPckt(PlayerSyncPacket syncPckt) {
|
||||
if (syncPckt.Unsynced || syncPckt.PlayerId != LocalPlayer.Id) {
|
||||
if (Players[syncPckt.PlayerId] != null && (syncPckt.Unsynced || syncPckt.PlayerId != LocalPlayer.Id)) {
|
||||
Players[syncPckt.PlayerId].Controlled.ProcessSyncPacket(syncPckt);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user