mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-16 02:56:09 -04:00
Fix for critical bug with BulkBlockUpdate packet handling. (Thanks 123DMWM)
This commit is contained in:
parent
0e320c6cf0
commit
77e52bb592
@ -475,6 +475,7 @@ namespace ClassicalSharp {
|
|||||||
int* indices = stackalloc int[bulkCount];
|
int* indices = stackalloc int[bulkCount];
|
||||||
for( int i = 0; i < count; i++ )
|
for( int i = 0; i < count; i++ )
|
||||||
indices[i] = reader.ReadInt32();
|
indices[i] = reader.ReadInt32();
|
||||||
|
reader.Skip( (bulkCount - count) * sizeof(int) );
|
||||||
|
|
||||||
for( int i = 0; i < count; i++ ) {
|
for( int i = 0; i < count; i++ ) {
|
||||||
byte block = reader.ReadUInt8();
|
byte block = reader.ReadUInt8();
|
||||||
@ -486,6 +487,7 @@ namespace ClassicalSharp {
|
|||||||
}
|
}
|
||||||
game.UpdateBlock( coords.X, coords.Y, coords.Z, block );
|
game.UpdateBlock( coords.X, coords.Y, coords.Z, block );
|
||||||
}
|
}
|
||||||
|
reader.Skip( bulkCount - count );
|
||||||
}
|
}
|
||||||
|
|
||||||
void HandleSetTextColor() {
|
void HandleSetTextColor() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user