- Ja es pot moure entre habitacions (falten dalt i baix)

This commit is contained in:
2024-06-13 14:21:57 +02:00
parent d04176b363
commit 377ca978e2
2 changed files with 13 additions and 9 deletions

View File

@@ -588,7 +588,8 @@ namespace actor
// Si ja havem atravesat la porta, ens movem a la porta de l'altra costat
// [TODO] que es moga a l'habitació que toca!!!
if (act->pos.x<min.x-4) {
act->pos.x = max.x;
room::load(room::getExit(XN));
act->pos.x = room::getMax().x+3;
act->pos.z = room::getDoor(XP)*4;
}
@@ -613,7 +614,8 @@ namespace actor
}
if (act->pos.x>max.x+4) {
act->pos.x = min.x;
room::load(room::getExit(XP));
act->pos.x = room::getMin().x-3;
act->pos.z = room::getDoor(XN)*4;
}
@@ -638,7 +640,8 @@ namespace actor
}
if (act->pos.y<min.y-4) {
act->pos.y = max.y;
room::load(room::getExit(YN));
act->pos.y = room::getMax().y+3;
act->pos.z = room::getDoor(YP)*4;
}
@@ -663,7 +666,8 @@ namespace actor
}
if (act->pos.y>max.y+4) {
act->pos.y = min.y;
room::load(room::getExit(YP));
act->pos.y = room::getMin().y-3;
act->pos.z = room::getDoor(YN)*4;
}