boulders are pushed in the movement not facing direction (fixes #81)
This commit is contained in:
parent
a87db67d84
commit
8feb732a8f
@ -1618,7 +1618,7 @@ export class Level extends LevelInterface {
|
||||
let original_name = tile.type.name;
|
||||
// TODO check ignores here?
|
||||
if (tile.type.on_bumped) {
|
||||
tile.type.on_bumped(tile, this, actor);
|
||||
tile.type.on_bumped(tile, this, actor, direction);
|
||||
}
|
||||
|
||||
// Death happens here: if a monster or block even thinks about moving into a player, or
|
||||
|
||||
@ -1226,10 +1226,10 @@ const TILE_TYPES = {
|
||||
return null;
|
||||
}
|
||||
},
|
||||
on_bumped(me, level, other) {
|
||||
on_bumped(me, level, other, direction) {
|
||||
if (other.type.name === 'boulder') {
|
||||
level._set_tile_prop(me, 'rolling', true);
|
||||
level._set_tile_prop(me, 'direction', other.direction);
|
||||
level._set_tile_prop(me, 'direction', direction);
|
||||
level._set_tile_prop(other, 'rolling', false);
|
||||
}
|
||||
},
|
||||
|
||||
Loading…
Reference in New Issue
Block a user