From 25f0b76a10dbd5ac2cfabd5354f621ae82cf19b4 Mon Sep 17 00:00:00 2001 From: Valentin Popov Date: Thu, 26 Nov 2026 09:15:38 +0400 Subject: feat(combat): enable the authored weapons of hostile animals The armed Constructor creatures use the shared enemy search and fire their CTL weapon from Gun_Y. The stock start is outside range. The close encounter fixture shows the projectile in the Vulkan window and leaves the hero at 30 percent after one hit. --- crates/fparkan-runtime/src/lib.rs | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) (limited to 'crates/fparkan-runtime/src/lib.rs') diff --git a/crates/fparkan-runtime/src/lib.rs b/crates/fparkan-runtime/src/lib.rs index e54c81bb..24341ef6 100644 --- a/crates/fparkan-runtime/src/lib.rs +++ b/crates/fparkan-runtime/src/lib.rs @@ -2681,18 +2681,24 @@ node_provider_distribution_suspended: false, event.name_raw == b"Problems0\0" && !event.instructions.is_empty() }) }); - let autodemo_combat = (unit_patrol.is_some() || guard_clans.contains(&true) || periodic_ai) - .then(|| { - unit_combat::AutoDemoCombat::new( - &vfs, - &mission, - &object_drafts, - &handles, - &mission_assets, - reserve_start, - guard_clans, - ) - }); + let animals = options.start_autodemo + && object_drafts[..reserve_start] + .iter() + .any(|draft| draft.unit_dat_header_flags == Some(projectile::ANIMAL_UNIT_CLASS)); + let autodemo_combat = + (unit_patrol.is_some() || guard_clans.contains(&true) || periodic_ai || animals).then( + || { + unit_combat::AutoDemoCombat::new( + &vfs, + &mission, + &object_drafts, + &handles, + &mission_assets, + reserve_start, + guard_clans, + ) + }, + ); for &handle in &handles[reserve_start..] { fparkan_world::request_delete(&mut new_runtime_world, handle)?; } -- cgit v1.2.3