Moar fixes and optimizations

This commit is contained in:
2026-09-12 17:10:20 +02:00
parent df18ffa1a7
commit 531ecc1aec
14 changed files with 371 additions and 128 deletions
+15
View File
@@ -34,6 +34,21 @@ pub struct FighterHurtbox {
pub radius: FGi32,
}
impl FighterHurtbox {
pub fn validate(&self) -> Result<(), String> {
if self.bone.trim().is_empty() {
return Err("bone name is empty".into());
}
if self.radius <= FGi32::ZERO {
return Err("radius must be positive".into());
}
if self.half_length < FGi32::ZERO {
return Err("half-length must be non-negative".into());
}
Ok(())
}
}
#[derive(Clone, Asset, Deserialize, Reflect, RonAsset)]
pub struct FighterManifest {
pub id: FighterId,