mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-15 02:25:32 -04:00
Fix two reported bugs: Client crashes when receiving block update while still loading a map (thanks Goodlyay), client doesn't remove player names from list when ExtPlayerList CPE extension is used (thanks 123DMWM)
This commit is contained in:
parent
0f187cf5b0
commit
fb566ac505
@ -351,7 +351,10 @@ namespace ClassicalSharp {
|
|||||||
int y = reader.ReadInt16();
|
int y = reader.ReadInt16();
|
||||||
int z = reader.ReadInt16();
|
int z = reader.ReadInt16();
|
||||||
byte type = reader.ReadUInt8();
|
byte type = reader.ReadUInt8();
|
||||||
|
if( !game.Map.IsNotLoaded )
|
||||||
game.UpdateBlock( x, y, z, type );
|
game.UpdateBlock( x, y, z, type );
|
||||||
|
else
|
||||||
|
Utils.LogWarning( "Server tried to update a block while still sending us the map!" );
|
||||||
} break;
|
} break;
|
||||||
|
|
||||||
case PacketId.AddEntity:
|
case PacketId.AddEntity:
|
||||||
@ -513,6 +516,7 @@ namespace ClassicalSharp {
|
|||||||
short nameId = reader.ReadInt16();
|
short nameId = reader.ReadInt16();
|
||||||
if( nameId >= 0 && nameId <= 255 ) {
|
if( nameId >= 0 && nameId <= 255 ) {
|
||||||
game.RaiseCpeListInfoRemoved( (byte)nameId );
|
game.RaiseCpeListInfoRemoved( (byte)nameId );
|
||||||
|
game.CpePlayersList[nameId] = null;
|
||||||
}
|
}
|
||||||
} break;
|
} break;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user