FREESCAPE: reduce separation offset for planar rendering

This commit is contained in:
neuromancer committed 2024-05-12 20:26:23 +02:00
1 parent 79095547e5
commit 4e443d2eb9
1 file changed
+1 -2
+1 -2
View File
@@ -228,6 +228,7 @@ void Area::draw(Freescape::Renderer *gfx, uint32 animationTicks, Math::Vector3d
ObjectArray planarObjects;
ObjectArray nonPlanarObjects;
Object *floor = nullptr;
float offset = 0.5;
for (auto &obj : _drawableObjects) {
if (!obj->isDestroyed() && !obj->isInvisible()) {
@@ -267,7 +268,6 @@ void Area::draw(Freescape::Renderer *gfx, uint32 animationTicks, Math::Vector3d
if (distance.length() > 0)
continue;
float offset = 1;
if (planar->getSize().x() == 0) {
if (object->getOrigin().x() >= centerPlanar.x())
offsetMap[planar] = -offset;
@@ -316,7 +316,6 @@ void Area::draw(Freescape::Renderer *gfx, uint32 animationTicks, Math::Vector3d
if (offsetMap[planar] == offsetMap[object] && offsetMap[object] != 0) {
// Nothing to do?
} else if (offsetMap[planar] == offsetMap[object] && offsetMap[object] == 0) {
float offset = 1.0;
if (planar->getSize().x() == 0) {
if (object->getOrigin().x() < centerPlanar.x())
offsetMap[planar] = -offset;