Fix rolling a second RFF direction under Lynx

This commit is contained in:
Eevee (Evelyn Woods) 2021-05-11 17:09:25 -06:00
parent c9a2897bc2
commit 3c00e0ba36

View File

@ -1081,17 +1081,18 @@ export class Level extends LevelInterface {
// function, as a bonking monster will notice the item now and take it. // function, as a bonking monster will notice the item now and take it.
this.step_on_cell(actor, actor.cell); this.step_on_cell(actor, actor.cell);
if (! this.compat.bonking_isnt_instant) {
// Note that ghosts bonk even on ice corners, which they can otherwise pass through! // Note that ghosts bonk even on ice corners, which they can otherwise pass through!
let forced_move = this.get_forced_move(actor, terrain); let forced_move = this.get_forced_move(actor, terrain);
if (actor.type.name === 'ghost') { if (actor.type.name === 'ghost') {
forced_move = actor.direction; forced_move = actor.direction;
} }
// If we got a new direction, try moving again // If we got a new direction, try moving again
// FIXME in compat case, i guess we just set direction? if (forced_move && direction !== forced_move) {
if (forced_move && direction !== forced_move && ! this.compat.bonking_isnt_instant) {
success = this.attempt_step(actor, forced_move); success = this.attempt_step(actor, forced_move);
} }
} }
}
else if (terrain.type.name === 'teleport_red' && ! terrain.is_active) { else if (terrain.type.name === 'teleport_red' && ! terrain.is_active) {
// Curious special-case red teleporter behavior: if you pass through a wired but // Curious special-case red teleporter behavior: if you pass through a wired but
// inactive one, you keep sliding indefinitely. Players can override out of it, but // inactive one, you keep sliding indefinitely. Players can override out of it, but