mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-13 09:35:23 -04:00
Player should only be able to go outside map boundaries (except for flying above the map) when noclip is enabled, fixes #64.
This commit is contained in:
parent
a17cda3d3c
commit
061d9f7745
@ -11,8 +11,8 @@ namespace ClassicalSharp {
|
||||
protected BlockInfo info;
|
||||
|
||||
protected byte GetPhysicsBlockId( int x, int y, int z ) {
|
||||
if( x < 0 || x >= map.Width || z < 0 || z >= map.Length || y < 0 ) return (byte)Block.Bedrock;
|
||||
if( y >= map.Height ) return (byte)Block.Air;
|
||||
if( !map.IsValidPos( x, y, z ) ) return (byte)Block.Bedrock;
|
||||
return map.GetBlock( x, y, z );
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user