- [FIX] Els boosters, skills i parts no han de desapareixer al pillarlos jugant des de l'editor

- [FIX] Al soltar un objecte pillat podia acabar parcialment fora de l'habitació
This commit is contained in:
2024-09-27 17:02:01 +02:00
parent 70cb65237a
commit 1521c7e152
3 changed files with 9 additions and 90 deletions

View File

@@ -3,65 +3,17 @@ height: 3
door-height-yn: 0 door-height-yn: 0
color: PURPLE color: PURPLE
floor-texture: 7 floor-texture: 7
wall-texture: 4 wall-texture: 5
door-texture: 4 door-texture: 4
under-door-texture: 0 under-door-texture: 0
exit-yn: 37 exit-yn: 37
actor{
name: BLOCMATA-00
bmp: altres.gif
bmp-rect: 0 133 32 27
bmp-offset: 0 27
pos: 8 56 24
size: 8 8 6
flags: REACTIVE DEADLY
react-mask: XP XN YP YN ZP ZN
movement: CW
}
actor{
name: BLOCMATA-01
bmp: altres.gif
bmp-rect: 0 133 32 27
bmp-offset: 0 27
pos: 16 56 24
size: 8 8 6
flags: REACTIVE DEADLY
react-mask: XP XN YP YN ZP ZN
movement: CW
}
actor{
name: BLOCMATA-02
bmp: altres.gif
bmp-rect: 0 133 32 27
bmp-offset: 0 27
pos: 24 56 24
size: 8 8 6
flags: REACTIVE DEADLY
react-mask: XP XN YP YN ZP ZN
movement: CW
}
actor{
name: BLOCMATA-03
bmp: altres.gif
bmp-rect: 0 133 32 27
bmp-offset: 0 27
pos: 32 56 24
size: 8 8 6
flags: REACTIVE DEADLY
react-mask: XP XN YP YN ZP ZN
movement: CW
}
actor{ actor{
name: BOX-A name: BOX-A
bmp: caixes.gif bmp: caixes.gif
bmp-rect: 0 0 32 32 bmp-rect: 0 0 32 32
bmp-offset: 0 32 bmp-offset: 0 32
pos: 8 56 30 pos: 18 51 0
size: 8 8 8 size: 8 8 8
flags: PICKABLE PUSHABLE GRAVITY flags: PICKABLE PUSHABLE GRAVITY
movement: CW movement: CW
@@ -250,40 +202,7 @@ actor{
bmp: caixes.gif bmp: caixes.gif
bmp-rect: 160 128 32 32 bmp-rect: 160 128 32 32
bmp-offset: 0 32 bmp-offset: 0 32
pos: 8 56 20 pos: 8 56 24
size: 8 8 4
orient: ZP
movement: Z
}
actor{
name: PLATH-01
bmp: caixes.gif
bmp-rect: 160 128 32 32
bmp-offset: 0 32
pos: 16 56 20
size: 8 8 4
orient: ZP
movement: Z
}
actor{
name: PLATH-02
bmp: caixes.gif
bmp-rect: 160 128 32 32
bmp-offset: 0 32
pos: 24 56 20
size: 8 8 4
orient: ZP
movement: Z
}
actor{
name: PLATH-03
bmp: caixes.gif
bmp-rect: 160 128 32 32
bmp-offset: 0 32
pos: 32 56 20
size: 8 8 4 size: 8 8 4
orient: ZP orient: ZP
movement: Z movement: Z

View File

@@ -644,8 +644,8 @@ namespace actor
{ {
if (picked) if (picked)
{ {
picked->pos.x = act->pos.x; picked->pos.x = act->pos.x; if (picked->pos.x + picked->size.x > room::getMax().x) picked->pos.x = room::getMax().x - picked->size.x;
picked->pos.y = act->pos.y; picked->pos.y = act->pos.y; if (picked->pos.y + picked->size.y > room::getMax().y) picked->pos.y = room::getMax().y - picked->size.y;
picked->pos.z = act->pos.z; picked->pos.z = act->pos.z;
act->pos.z += picked->size.z; act->pos.z += picked->size.z;
actor::actor_t *above = act->above; actor::actor_t *above = act->above;

View File

@@ -249,25 +249,25 @@ namespace room
if (!::editor::isEditing() && act->flags & FLAG_SPECIAL) if (!::editor::isEditing() && act->flags & FLAG_SPECIAL)
{ {
if (act->name[0]=='B') { // Es un booster if (act->name[0]=='B') { // Es un booster
if (actor::hero::wasBoosterCollected((act->name[3]-48)*10+(act->name[4]-48))) if (!::editor::isDevMode() && actor::hero::wasBoosterCollected((act->name[3]-48)*10+(act->name[4]-48)))
{ {
actor::remove(act); actor::remove(act);
act = nullptr; act = nullptr;
} }
} else if (act->name[0]=='S') { // Es un skill } else if (act->name[0]=='S') { // Es un skill
if (actor::hero::wasSkillCollected(&act->name[2])) if (!::editor::isDevMode() && actor::hero::wasSkillCollected(&act->name[2]))
{ {
actor::remove(act); actor::remove(act);
act = nullptr; act = nullptr;
} }
} else if (act->name[0]=='P') { // Es una part } else if (act->name[0]=='P') { // Es una part
if (actor::hero::wasPartCollected(&act->name[2])) if (!::editor::isDevMode() && actor::hero::wasPartCollected(&act->name[2]))
{ {
actor::remove(act); actor::remove(act);
act = nullptr; act = nullptr;
} }
} else if (act->name[0]=='G') { // Es un ghost d'una part } else if (act->name[0]=='G') { // Es un ghost d'una part
if (actor::hero::wasPartCollected(&act->name[2])) if (!::editor::isDevMode() && actor::hero::wasPartCollected(&act->name[2]))
{ {
act->flags &= ~FLAG_ANIMATED; act->flags &= ~FLAG_ANIMATED;
act->bmp_rect.x += act->bmp_rect.w; act->bmp_rect.x += act->bmp_rect.w;