From 64ca8f008c9a0b2308925304a6249a991a66c7a8 Mon Sep 17 00:00:00 2001 From: "Eevee (Evelyn Woods)" Date: Thu, 11 Apr 2024 00:23:21 -0600 Subject: [PATCH] Restore standing on arrival A few CC2LP1 replays desynced, so, I guess this is right actually. --- js/game.js | 7 +++++++ js/tiletypes.js | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/js/game.js b/js/game.js index 4e0ca1f..b6173ae 100644 --- a/js/game.js +++ b/js/game.js @@ -2016,6 +2016,13 @@ export class Level extends LevelInterface { // XXX that is jank as hell what are you talking about tile.type.on_arrive(tile, this, actor); } + + // XXX this does seem to be correct by CC2 rules, but it's very weird -- this will + // usually happen anyway during the actor's idle phase. it also requires random force + // floors to have a clumsy check that you aren't already about to slide + if (tile.type.on_stand && !actor.slide_ignores(tile.type.name)) { + tile.type.on_stand(tile, this, actor); + } } } diff --git a/js/tiletypes.js b/js/tiletypes.js index 69a8e92..107261a 100644 --- a/js/tiletypes.js +++ b/js/tiletypes.js @@ -990,7 +990,7 @@ const TILE_TYPES = { } }, on_stand(me, level, other) { - if (! level.compat.force_floors_on_arrive) { + if (! other.is_pending_slide && ! level.compat.force_floors_on_arrive) { level.schedule_actor_slide(other, level.get_force_floor_direction()); } },