From 5bc426ab9505b34ae9276b4165236372c064baf1 Mon Sep 17 00:00:00 2001 From: Ian Date: Wed, 21 Dec 2022 14:25:36 -0500 Subject: [PATCH] CTR: Allow Zombie Skin Varients --- source/server/ai/zombie_core.qc | 37 +++++++++++++++++---------------- 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/source/server/ai/zombie_core.qc b/source/server/ai/zombie_core.qc index 17db8ad..2f74395 100644 --- a/source/server/ai/zombie_core.qc +++ b/source/server/ai/zombie_core.qc @@ -1655,23 +1655,6 @@ void(entity where) spawn_a_zombieB = szombie.maxs = '8 8 30';//16 16 40 setsize (szombie, szombie.mins, szombie.maxs);//-16,-16,-32,16,16,40 - //Setting Uniform skin================= - /*if(random() > 0.5) - { - szombie.skin = 1; - szombie.larm.skin = 1; - szombie.rarm.skin = 1; - } - //Setting Skin - if(random() < 0.5) - szombie.head.skin = 0; - else - szombie.head.skin = 1;*/ - - local float tex; - tex = random(); - - szombie.skin = 0; //==================================== @@ -1748,7 +1731,25 @@ void(entity where) spawn_a_zombieB = self = old_self; LinkZombiesHitbox(); - //bprint (PRINT_HIGH, "Linked hitboxes"); + +#ifdef CTR + // + // Zombie skin setting + // + float tex; + tex = random(); + + if (tex > 0.75) + szombie.skin = 0; + else if (tex > 0.50) + szombie.skin = 1; + else if (tex > 0.25) + szombie.skin = 2; + else + szombie.skin = 3; +#endif // CTR + + szombie.head.skin = szombie.larm.skin = szombie.rarm.skin = szombie.skin; // set up timer for next spawn zombie_spawn_timer = zombie_spawn_delay + time;