Skip to content

Commit 4497b47

Browse files
committed
allow animations on char fall event
1 parent 1af23c0 commit 4497b47

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

base/game_events/CharFallEvent.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,17 +54,21 @@ export class CharFallEvent extends GameEvent {
5454

5555
if (target_char) {
5656
++this.data.game_event_manager.events_running_count;
57+
const prev_force_idle_action_in_event = target_char.force_idle_action_in_event;
58+
target_char.force_idle_action_in_event = false;
5759
const target_obj = Object.assign({}, this.options, {
5860
on_fall_finish_callback: () => {
5961
if (!this.options.teleport) {
6062
--this.data.game_event_manager.events_running_count;
63+
target_char.force_idle_action_in_event = prev_force_idle_action_in_event;
6164
this.finish_events.forEach(event => event.fire(this.origin_npc));
6265
}
6366
},
6467
});
6568
if (target_obj.teleport) {
6669
target_obj.teleport.on_before_teleport = () => {
6770
this.data.game_event_manager.events_running_count = 0;
71+
target_char.force_idle_action_in_event = prev_force_idle_action_in_event;
6872
};
6973
}
7074
target_char.fall(target_obj);

0 commit comments

Comments
 (0)