mirror of
https://github.com/neoStudiosLCE/neoLegacy.git
synced 2026-06-08 23:13:00 +00:00
fix: change painting gaps from 16 to 32
This commit is contained in:
parent
48a5e882e3
commit
267d98954b
|
|
@ -58,8 +58,12 @@ void HangingEntity::setDir(int dir)
|
|||
float x = xTile + 0.5f;
|
||||
float y = yTile + 0.5f;
|
||||
float z = zTile + 0.5f;
|
||||
|
||||
float originalX = x;
|
||||
float originalZ = z;
|
||||
float fOffs = 0.5f + 1.0f / 16.0f;
|
||||
if (this->GetType() == eTYPE_PAINTING) {
|
||||
fOffs = 0.5f + 1.0f / 32.0f;
|
||||
}
|
||||
|
||||
if (dir == Direction::NORTH) z -= fOffs;
|
||||
if (dir == Direction::WEST) x -= fOffs;
|
||||
|
|
@ -75,6 +79,19 @@ void HangingEntity::setDir(int dir)
|
|||
setPos(x, y, z);
|
||||
|
||||
float ss = -(0.5f / 16.0f);
|
||||
if (this->GetType() == eTYPE_PAINTING) {
|
||||
fOffs = 0.5f + 1.0f / 16.0f;
|
||||
if (dir == Direction::NORTH) originalZ -= fOffs;
|
||||
if (dir == Direction::WEST) originalX -= fOffs;
|
||||
if (dir == Direction::SOUTH) originalZ += fOffs;
|
||||
if (dir == Direction::EAST) originalX += fOffs;
|
||||
if (dir == Direction::NORTH) originalX -= offs(getWidth());
|
||||
if (dir == Direction::WEST) originalZ += offs(getWidth());
|
||||
if (dir == Direction::SOUTH) originalX += offs(getWidth());
|
||||
if (dir == Direction::EAST) originalZ -= offs(getWidth());
|
||||
x = originalX;
|
||||
z = originalZ;
|
||||
}
|
||||
|
||||
// 4J Stu - Due to rotations the bb couold be set with a lower bound x/z being higher than the higher bound
|
||||
float x0 = x - w - ss;
|
||||
|
|
@ -291,4 +308,4 @@ void HangingEntity::readAdditionalSaveData(CompoundTag *tag)
|
|||
bool HangingEntity::repositionEntityAfterLoad()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue