aboutsummaryrefslogtreecommitdiff
path: root/crates/fparkan-runtime/src/unit_spawn.rs
diff options
context:
space:
mode:
authorValentin Popov <valentin@popov.link>2026-12-02 10:09:58 +0300
committerValentin Popov <valentin@popov.link>2026-12-02 10:09:58 +0300
commit5f0b8c076b40f8eca67e2745367c731f803914f4 (patch)
tree95bf85609d44cebfaabb86dede135c728d994cdb /crates/fparkan-runtime/src/unit_spawn.rs
parent7dfbf534267011ad629c11c7140d0f9c0fe9cd3b (diff)
downloadfparkan-5f0b8c076b40f8eca67e2745367c731f803914f4.tar.xz
fparkan-5f0b8c076b40f8eca67e2745367c731f803914f4.zip
feat(ui): select units from the strategic warbot roster
Diffstat (limited to 'crates/fparkan-runtime/src/unit_spawn.rs')
-rw-r--r--crates/fparkan-runtime/src/unit_spawn.rs8
1 files changed, 3 insertions, 5 deletions
diff --git a/crates/fparkan-runtime/src/unit_spawn.rs b/crates/fparkan-runtime/src/unit_spawn.rs
index 09345192..7af5db10 100644
--- a/crates/fparkan-runtime/src/unit_spawn.rs
+++ b/crates/fparkan-runtime/src/unit_spawn.rs
@@ -60,11 +60,9 @@ pub(super) fn spawn_prepared_unit(
.behavior_control_groupings
.push(crate::project_mission_behavior_control_grouping(&table));
mission.control_device_tables.push(table);
- mission.mission_events.register_unit(
- world,
- handle,
- draft.unit_dat_header_flags.expect("prepared reserve"),
- );
+ let class = draft.unit_dat_header_flags.expect("prepared reserve");
+ mission.mission_events.register_unit(world, handle, class);
+ mission.unit_serials.register(handle, OwnerId(clan), class);
mission.note_clan_registration(OwnerId(clan), handle);
Ok(handle)
}