- [FIX] La porta de l'habitacio de les sabates, que vaig pujar en la party pero se m'havia oblidat fer-ho en el repo
- [FIX] Solució a un dangling pointer que me va trobar valgrind - [COMMIT ABANS DEL MEGACANVI]
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -4,4 +4,5 @@
|
||||
*.dSYM/*
|
||||
build/*
|
||||
thepool
|
||||
thepool_debug
|
||||
thepool_debug
|
||||
valgrind*
|
||||
@@ -1,7 +1,7 @@
|
||||
width: 2
|
||||
height: 3
|
||||
door-height-xn: 3
|
||||
door-height-yp: 2
|
||||
door-height-yp: 3
|
||||
color: WHITE
|
||||
floor-texture: 11
|
||||
wall-texture: 2
|
||||
|
||||
@@ -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)
|
||||
@@ -682,6 +683,7 @@ namespace actor
|
||||
act = actor::replaceWithTemplate(act, "EXPLOSION");
|
||||
act->name[0] = '_';
|
||||
room::cycleColor(1);
|
||||
return PUSH_NONE;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
@@ -1134,8 +1136,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);
|
||||
@@ -1172,8 +1176,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);
|
||||
@@ -1213,8 +1219,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);
|
||||
@@ -1249,8 +1257,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);
|
||||
@@ -1307,7 +1317,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);
|
||||
@@ -1328,7 +1339,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);
|
||||
@@ -1401,23 +1414,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);
|
||||
|
||||
Reference in New Issue
Block a user