Prevent tiles with chests from falling.
This commit is contained in:
parent
fd8799f36b
commit
6e6f28dd8e
|
@ -586,7 +586,7 @@ monster_update(Monster *m, UpdateData *data)
|
|||
|
||||
sprite_update(m->sprite, data);
|
||||
|
||||
if (m->sprite->state == SPRITE_STATE_FALLING && m->sprite->dim.width < 4) {
|
||||
if (m->sprite->hidden == SPRITE_STATE_FALLING && m->sprite->hidden) {
|
||||
m->stats.hp = 0;
|
||||
player_monster_kill_check(data->player, m);
|
||||
return;
|
||||
|
|
|
@ -300,7 +300,8 @@ move(Player *player, RoomMatrix *matrix, Vector2d direction)
|
|||
lastPos.y < 10 &&
|
||||
lastSpace->decoration == NULL &&
|
||||
lastSpace->trap == NULL &&
|
||||
lastSpace->objects == NULL
|
||||
lastSpace->objects == NULL &&
|
||||
lastSpace->items == NULL
|
||||
)
|
||||
map_trigger_tile_fall(lastSpace->tile);
|
||||
}
|
||||
|
|
|
@ -136,8 +136,10 @@ sprite_update(Sprite *s, UpdateData *data)
|
|||
s->dim.height /2
|
||||
};
|
||||
}
|
||||
if (s->dim.width < 4)
|
||||
if (s->dim.width < 4) {
|
||||
s->hidden = true;
|
||||
s->state = SPRITE_STATE_DEFAULT;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue