diff --git a/source/actor.cpp b/source/actor.cpp index 9e3b74e..eff7ee1 100644 --- a/source/actor.cpp +++ b/source/actor.cpp @@ -780,7 +780,11 @@ namespace actor { hero::useBoostRun(); act->orient = PUSH_XP; - if (((act->pos.x + act->size.x) < max.x && act->pos.y >= min.y && (act->pos.y + act->size.y) <= max.y) || ((room::getDoors() & DOOR_XP) && (act->pos.y >= 24) && (act->pos.y <= 32))) + if ( + ( ((act->pos.x + act->size.x) < max.x) && (act->pos.y >= min.y) && ((act->pos.y + act->size.y) <= max.y) ) + || + ( (room::getDoors() & DOOR_XP) && (act->pos.y >= 24) && (act->pos.y <= 32) ) + ) { moving = true; // Si està en les vores d'una porta, espenta cap a centrar-lo @@ -1269,7 +1273,7 @@ namespace actor { act->pos.x += vel; actor::actor_t *other = actor::get_collision(act); - if (other || ((act->pos.x + act->size.x) > max.x && (!(room::getDoors() & DOOR_XP) || (act->pos.y != 28) || !(act->flags & FLAG_HERO)))) + if (other || ((act->pos.x + act->size.x) > max.x && (!(room::getDoors() & DOOR_XP) || (act->pos.y != 28) || (act->pos.z != room::getDoor(XP) * 4) || !(act->flags & FLAG_HERO)))) { if (other) { uint8_t push_value = push(act, other, PUSH_XP); @@ -1350,7 +1354,7 @@ namespace actor { act->pos.y += vel; actor::actor_t *other = actor::get_collision(act); - if (other || ((act->pos.y + act->size.y) > max.y && (!(room::getDoors() & DOOR_YP) || (act->pos.x != 28) || !(act->flags & FLAG_HERO)))) + if (other || ((act->pos.y + act->size.y) > max.y && (!(room::getDoors() & DOOR_YP) || (act->pos.x != 28) || (act->pos.z != room::getDoor(YP) * 4) || !(act->flags & FLAG_HERO)))) { if (other) { uint8_t push_value = push(act, other, PUSH_YP); @@ -2072,7 +2076,7 @@ namespace actor if (complete) { stats::reset(); - lives = 1; + lives = 8; skills = SKILL_NONE; if (prologo) skills &= SKILL_SHOES; for (int i=0;i<4;++i) prologo_objects[i] = PROLOGO_OBJECT_INITIAL;