Fix respawn on non-air blocks. (Thanks goodlyay)

This commit is contained in:
UnknownShadow200 2016-04-01 11:44:51 +11:00
parent e9abb3def5
commit e66116bdf4
2 changed files with 3 additions and 2 deletions

View File

@ -14,7 +14,7 @@ namespace ClassicalSharp.Gui {
Block[] blocksTable;
Texture blockInfoTexture;
const int blocksPerRow = 10, maxRows = 4;
const int blocksPerRow = 10, maxRows = 8;
int selIndex, rows;
int startX, startY, blockSize;
float selBlockExpand;

View File

@ -284,7 +284,8 @@ namespace ClassicalSharp.Entities {
}
if( !anyHit ) {
spawn.Y = y + Entity.Adjustment;
byte block = collisions.GetPhysicsBlockId( P.X, y, P.Z );
spawn.Y = y + info.MaxBB[block].Y + Entity.Adjustment;
return;
}
}