- [NEW] Ja funciona el tema de les parts

This commit is contained in:
2024-07-03 12:16:30 +02:00
parent c7186119c2
commit ea61a56c22
2 changed files with 8 additions and 2 deletions

View File

@@ -12,13 +12,13 @@ exit-yp: 4
exit-zp: 0 exit-zp: 0
actor{ actor{
name: BARREL name: G-FILTER
bmp: objectes.gif bmp: objectes.gif
bmp-rect: 0 0 24 32 bmp-rect: 0 0 24 32
bmp-offset: 0 32 bmp-offset: 0 32
pos: 8 16 0 pos: 8 16 0
size: 8 8 8 size: 8 8 8
anim-wait: 4 anim-wait: 4
flags: PUSHABLE ANIMATED GRAVITY flags: PUSHABLE ANIMATED GRAVITY SPECIAL
movement: CW movement: CW
} }

View File

@@ -202,6 +202,12 @@ namespace room
actor::remove(act); actor::remove(act);
act = nullptr; act = nullptr;
} }
} else if (act->name[0]=='G') { // Es un ghost d'una part
if (actor::hero::wasPartCollected(&act->name[2]))
{
act->flags &= ~FLAG_ANIMATED;
act->bmp_rect.x += act->bmp_rect.w;
}
} }
} }
if (act) actor::setDirty(act, true); if (act) actor::setDirty(act, true);