|
|
|
|
@@ -636,6 +636,7 @@ namespace actor
|
|
|
|
|
audio::playSound("snd_disappear.wav", SOUND_BASIC);
|
|
|
|
|
act = actor::replaceWithTemplate(act, "EXPLOSION");
|
|
|
|
|
act->name[0] = '_';
|
|
|
|
|
return PUSH_NONE;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (source->flags & FLAG_DEADLY)
|
|
|
|
|
@@ -712,6 +713,7 @@ namespace actor
|
|
|
|
|
act = actor::replaceWithTemplate(act, "EXPLOSION");
|
|
|
|
|
act->name[0] = '_';
|
|
|
|
|
room::cycleColor(1);
|
|
|
|
|
return PUSH_NONE;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return result;
|
|
|
|
|
@@ -1164,8 +1166,10 @@ namespace actor
|
|
|
|
|
actor::actor_t *other = actor::get_collision(act);
|
|
|
|
|
if (other || (act->pos.x < min.x && (!(room::getDoors() & DOOR_XN) || (act->pos.y != 28) || (act->pos.z != room::getDoor(XN) * 4) || !(act->flags & FLAG_HERO))))
|
|
|
|
|
{
|
|
|
|
|
if (other)
|
|
|
|
|
other->push |= push(act, other, PUSH_XN);
|
|
|
|
|
if (other) {
|
|
|
|
|
uint8_t push_value = push(act, other, PUSH_XN);
|
|
|
|
|
if (push_value) other->push |= push_value;
|
|
|
|
|
}
|
|
|
|
|
act->pos.x += vel;
|
|
|
|
|
if (act->flags & FLAG_MOVING)
|
|
|
|
|
changeMoving(act);
|
|
|
|
|
@@ -1202,8 +1206,10 @@ namespace actor
|
|
|
|
|
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)
|
|
|
|
|
other->push |= push(act, other, PUSH_XP);
|
|
|
|
|
if (other) {
|
|
|
|
|
uint8_t push_value = push(act, other, PUSH_XP);
|
|
|
|
|
if (push_value) other->push |= push_value;
|
|
|
|
|
}
|
|
|
|
|
act->pos.x -= vel;
|
|
|
|
|
if (act->flags & FLAG_MOVING)
|
|
|
|
|
changeMoving(act);
|
|
|
|
|
@@ -1243,8 +1249,10 @@ namespace actor
|
|
|
|
|
actor::actor_t *other = actor::get_collision(act);
|
|
|
|
|
if (other || (act->pos.y < min.y && (!(room::getDoors() & DOOR_YN) || (act->pos.x != 28) || (act->pos.z != room::getDoor(YN) * 4) || !(act->flags & FLAG_HERO))))
|
|
|
|
|
{
|
|
|
|
|
if (other)
|
|
|
|
|
other->push |= push(act, other, PUSH_YN);
|
|
|
|
|
if (other) {
|
|
|
|
|
uint8_t push_value = push(act, other, PUSH_YN);
|
|
|
|
|
if (push_value) other->push |= push_value;
|
|
|
|
|
}
|
|
|
|
|
act->pos.y += vel;
|
|
|
|
|
if (act->flags & FLAG_MOVING)
|
|
|
|
|
changeMoving(act);
|
|
|
|
|
@@ -1279,8 +1287,10 @@ namespace actor
|
|
|
|
|
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)
|
|
|
|
|
other->push |= push(act, other, PUSH_YP);
|
|
|
|
|
if (other) {
|
|
|
|
|
uint8_t push_value = push(act, other, PUSH_YP);
|
|
|
|
|
if (push_value) other->push |= push_value;
|
|
|
|
|
}
|
|
|
|
|
act->pos.y -= vel;
|
|
|
|
|
if (act->flags & FLAG_MOVING)
|
|
|
|
|
changeMoving(act);
|
|
|
|
|
@@ -1337,7 +1347,8 @@ namespace actor
|
|
|
|
|
if (is_above(act, act->below))
|
|
|
|
|
{
|
|
|
|
|
// ...li pase a ell el push, neteje el meu flag, canvie direcció si pertoca i me ane
|
|
|
|
|
act->push |= push(act, act->below, PUSH_ZN); // [RZC 20/09/2024] Canvie "act->below->push" per "act->push". Se li deu passar la reacció al que la inicia
|
|
|
|
|
uint8_t push_value = push(act, act->below, PUSH_ZN); // [RZC 20/09/2024] Canvie "act->below->push" per "act->push". Se li deu passar la reacció al que la inicia
|
|
|
|
|
if (push_value) act->push |= push_value;
|
|
|
|
|
act->push &= ~PUSH_ZN;
|
|
|
|
|
if ((act->flags & FLAG_MOVING) && (act->movement == MOV_Z))
|
|
|
|
|
changeMoving(act);
|
|
|
|
|
@@ -1358,7 +1369,9 @@ namespace actor
|
|
|
|
|
act->below = below;
|
|
|
|
|
below->above = act;
|
|
|
|
|
// ... i li passem el push, netejem el meu flag i gonnem
|
|
|
|
|
act->push |= push(act, act->below, PUSH_ZN); // [RZC 20/09/2024] Canvie "act->below->push" per "act->push". Se li deu passar la reacció al que la inicia
|
|
|
|
|
uint8_t push_value = push(act, act->below, PUSH_ZN); // [RZC 20/09/2024] Canvie "act->below->push" per "act->push". Se li deu passar la reacció al que la inicia
|
|
|
|
|
if (push_value) act->push |= push_value;
|
|
|
|
|
|
|
|
|
|
act->push &= ~PUSH_ZN;
|
|
|
|
|
if ((act->flags & FLAG_MOVING) && (act->movement == MOV_Z))
|
|
|
|
|
changeMoving(act);
|
|
|
|
|
@@ -1431,23 +1444,16 @@ namespace actor
|
|
|
|
|
act->anim_wait_count++;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (act->flags & FLAG_HERO)
|
|
|
|
|
updateUserInput(act);
|
|
|
|
|
if (act->flags & FLAG_HERO) updateUserInput(act);
|
|
|
|
|
if (act->flags & FLAG_MOVING)
|
|
|
|
|
{
|
|
|
|
|
if (act->movement == MOV_HUNT && ((act->pos.x & 7) == 0 || (act->pos.y & 7) == 0))
|
|
|
|
|
changeMoving(act);
|
|
|
|
|
updateMoving(act);
|
|
|
|
|
}
|
|
|
|
|
if (act->flags & FLAG_GRAVITY)
|
|
|
|
|
act->push |= PUSH_ZN;
|
|
|
|
|
if (act->flags & FLAG_GRAVITY) act->push |= PUSH_ZN;
|
|
|
|
|
|
|
|
|
|
// if (act->flags & FLAG_PUSHABLE)
|
|
|
|
|
updatePush(act);
|
|
|
|
|
// if (act->flags & FLAG_GRAVITY) updateGravity(act);
|
|
|
|
|
// if (act->flags & FLAG_REACTIVE) updateReactive(act);
|
|
|
|
|
|
|
|
|
|
// act->push = PUSH_NONE;
|
|
|
|
|
|
|
|
|
|
if (!room_changed && update_all && next)
|
|
|
|
|
update(next);
|
|
|
|
|
|