From 04d5c41328583a88d747a73a23e89ca6b4d4bb7e Mon Sep 17 00:00:00 2001 From: Raimon Zamora Date: Mon, 17 Jun 2024 08:10:00 +0200 Subject: [PATCH] - [FIX] Ja funcionen les eixides per el piso --- data/rooms/00.txt | 2 +- source/actor.cpp | 2 +- source/room.cpp | 8 ++++---- source/room.h | 8 ++++---- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/data/rooms/00.txt b/data/rooms/00.txt index 899e2d1..50ccb3f 100644 --- a/data/rooms/00.txt +++ b/data/rooms/00.txt @@ -8,7 +8,7 @@ wall-texture: 2 door-texture: 0 under-door-texture: 0 exit-xn: 1 -exit-zn: 0 +exit-zn: 2 actor{ name: PLATFORM00 diff --git a/source/actor.cpp b/source/actor.cpp index c3331e3..9682213 100644 --- a/source/actor.cpp +++ b/source/actor.cpp @@ -719,7 +719,7 @@ namespace actor // Si estic sobre el piso, no faig res [TODO]: Si no hi ha piso ha de caure if (act->pos.z == 0) { - if ((act->flags&FLAG_HERO)==0 || room::getExit(ZN)==-1) return; + if ( ((act->flags&FLAG_HERO)==0) || (room::getExit(ZN)==-1) ) return; room::load(room::getExit(ZN)); act->pos.z = room::getMax().z; diff --git a/source/room.cpp b/source/room.cpp index 804a110..9742a29 100644 --- a/source/room.cpp +++ b/source/room.cpp @@ -339,22 +339,22 @@ namespace room return max; } - uint8_t getDoors() + int getDoors() { return doors; } - uint8_t getDoor(const int d) + int getDoor(const int d) { return door_height[d]; } - uint8_t getExit(const int d) + int getExit(const int d) { return exits[d]; } - uint8_t getColor() + int getColor() { return color; } diff --git a/source/room.h b/source/room.h index f5934cd..c8bab73 100644 --- a/source/room.h +++ b/source/room.h @@ -27,10 +27,10 @@ namespace room vec3_t getSize(); vec3_t getMin(); vec3_t getMax(); - uint8_t getDoors(); - uint8_t getDoor(const int d); - uint8_t getExit(const int d); - uint8_t getColor(); + int getDoors(); + int getDoor(const int d); + int getExit(const int d); + int getColor(); namespace editor {