- [FIX] [#6] En l'habitacio de baix la piscina, botant per damunt les bambolles es pot passar per damunt d'una porta

- [FIX] [#10] Avistat problema de enganzar-se en la porta YP de l'habitacio 58
This commit is contained in:
2024-10-31 12:26:46 +01:00
parent 0ab4ca06e3
commit 3946ea749b

View File

@@ -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;