From 33d9573d8a0dcddbe4f590f3fa0573fe3b62a26f Mon Sep 17 00:00:00 2001 From: JailDoctor Date: Tue, 6 Jun 2023 19:20:32 +0200 Subject: [PATCH] - Al passar una porta reapareix en la contraria a la altura adequada --- source/actor.cpp | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/source/actor.cpp b/source/actor.cpp index 59edf3e..794c6c8 100644 --- a/source/actor.cpp +++ b/source/actor.cpp @@ -371,7 +371,10 @@ namespace actor act->above->push = 0; } } - if (act->pos.xpos.x = max.x; + if (act->pos.xpos.x = max.x; + act->pos.z = room::getDoor(XP)*4; + } actor::setDirty(act); } @@ -398,7 +401,10 @@ namespace actor act->above->push = 0; } } - if (act->pos.x>max.x+4) act->pos.x = min.x; + if (act->pos.x>max.x+4) { + act->pos.x = min.x; + act->pos.z = room::getDoor(XN)*4; + } actor::setDirty(act); } @@ -425,7 +431,10 @@ namespace actor act->above->push = 0; } } - if (act->pos.ypos.y = max.y; + if (act->pos.ypos.y = max.y; + act->pos.z = room::getDoor(YP)*4; + } actor::setDirty(act); } @@ -452,7 +461,10 @@ namespace actor act->above->push = 0; } } - if (act->pos.y>max.y+4) act->pos.y = min.y; + if (act->pos.y>max.y+4) { + act->pos.y = min.y; + act->pos.z = room::getDoor(YN)*4; + } actor::setDirty(act); }