aboutsummaryrefslogtreecommitdiff
path: root/crates/fparkan-runtime/src/player_weapon.rs
diff options
context:
space:
mode:
authorValentin Popov <valentin@popov.link>2026-11-14 09:02:23 +0300
committerValentin Popov <valentin@popov.link>2026-11-14 09:02:23 +0300
commitd4c2ee22771b20208ee07ec38d868c3b0ce963bf (patch)
tree2ccf2da527dd9e664d3f2ab541e852ded8474e2d /crates/fparkan-runtime/src/player_weapon.rs
parent176b377c8d4406161ff206a8cb5ac8c8359877cf (diff)
downloadfparkan-d4c2ee22771b20208ee07ec38d868c3b0ce963bf.tar.xz
fparkan-d4c2ee22771b20208ee07ec38d868c3b0ce963bf.zip
feat(runtime): replenish AutoDemo clans after combat losses
Diffstat (limited to 'crates/fparkan-runtime/src/player_weapon.rs')
-rw-r--r--crates/fparkan-runtime/src/player_weapon.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/crates/fparkan-runtime/src/player_weapon.rs b/crates/fparkan-runtime/src/player_weapon.rs
index 5e5e4152..f1fcbf7e 100644
--- a/crates/fparkan-runtime/src/player_weapon.rs
+++ b/crates/fparkan-runtime/src/player_weapon.rs
@@ -4,7 +4,7 @@ use fparkan_assets::{
};
/// The starting hero's selectable weapon devices, in resource order.
-#[derive(Default)]
+#[derive(Clone, Default)]
pub struct PlayerWeapons {
weapons: Vec<PlayerWeapon>,
selected: Option<usize>,
@@ -13,6 +13,7 @@ pub struct PlayerWeapons {
}
/// A manual-fire device prepared from its CTLD record and effect rows.
+#[derive(Clone)]
pub struct PlayerWeapon {
/// Name of the projectile prototype.
pub projectile: String,
@@ -30,13 +31,14 @@ pub struct PlayerWeapon {
phase_end_ms: f64,
}
+#[derive(Clone)]
struct Barrel {
muzzle: PreparedControlPoint,
rate: f64,
blend: f64,
}
-#[derive(PartialEq)]
+#[derive(Clone, PartialEq)]
enum FirePhase {
Idle,
Shot,