Skip to content

Commit

Permalink
Fix system ordering issue with command_system due to npc despawn on d…
Browse files Browse the repository at this point in the history
…eath.

This can cause a crash if command_system depawns the npc before any
of these systems try to modify the entity.
  • Loading branch information
exjam committed Apr 26, 2023
1 parent 7fb8b0d commit adf32d4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -814,7 +814,10 @@ fn run_client(config: &Config, app_state: AppState, mut systems_config: SystemsC
(
ability_values_system,
clan_system,
command_system,
command_system
.after(npc_model_update_system)
.after(npc_model_add_collider_system)
.after(spawn_effect_system),
facing_direction_system.after(command_system),
update_position_system.before(directional_light_system),
collision_player_system_join_zoin
Expand Down

0 comments on commit adf32d4

Please sign in to comment.