From 8f86f5c48324632b78d46f8bb324711ff4afc012 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Korg=C3=B3l?= Date: Sat, 3 Aug 2019 12:35:16 +0200 Subject: [PATCH] Allow normal enemies to spawn as humanoids --- server/src/lib.rs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/server/src/lib.rs b/server/src/lib.rs index 82ac23bf22..f21ae9c614 100644 --- a/server/src/lib.rs +++ b/server/src/lib.rs @@ -270,8 +270,15 @@ impl Server { // Handle chunk supplement for npc in supplement.npcs { - let mut stats = comp::Stats::new("Wolf".to_string()); - let mut body = comp::Body::QuadrupedMedium(comp::quadruped_medium::Body::random()); + let (mut stats, mut body) = if rand::random() { + let stats = comp::Stats::new("Humanoid".to_string()); + let body = comp::Body::Humanoid(comp::humanoid::Body::random()); + (stats, body) + } else { + let stats = comp::Stats::new("Wolf".to_string()); + let body = comp::Body::QuadrupedMedium(comp::quadruped_medium::Body::random()); + (stats, body) + }; let mut scale = 1.0; if npc.boss {