Make ignoring work on sliding tiles again

This commit is contained in:
Eevee (Evelyn Woods) 2020-09-03 10:28:17 -06:00
parent 4972b0bc82
commit 041d0223c7

View File

@ -544,7 +544,7 @@ class Level {
if (! blocked) { if (! blocked) {
let goal_cell = this.cells[goal_y][goal_x]; let goal_cell = this.cells[goal_y][goal_x];
for (let tile of Array.from(goal_cell)) { for (let tile of Array.from(goal_cell)) {
if (check_for_slide && tile.type.slide_mode) { if (check_for_slide && tile.type.slide_mode && ! actor.ignores(tile.type.name)) {
check_for_slide = false; check_for_slide = false;
speed /= 2; speed /= 2;
} }
@ -622,7 +622,7 @@ class Level {
// TODO i guess this covers blocks too // TODO i guess this covers blocks too
// TODO do blocks smash monsters? // TODO do blocks smash monsters?
for (let tile of goal_cell) { for (let tile of goal_cell) {
if (tile.type.slide_mode) { if (tile.type.slide_mode && ! actor.ignores(tile.type.name)) {
this.make_slide(actor, tile.type.slide_mode); this.make_slide(actor, tile.type.slide_mode);
} }
if ((actor.type.is_player && tile.type.is_monster) || if ((actor.type.is_player && tile.type.is_monster) ||