From 44fe8ecfeadafb5f652b0def17c41f24a955d041 Mon Sep 17 00:00:00 2001 From: Mario Date: Thu, 18 Apr 2013 16:39:46 +1000 Subject: [PATCH] Add cvars for the force field --- monsters.cfg | 3 +++ qcsrc/server/monsters/monster/shalrath.qc | 9 ++++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/monsters.cfg b/monsters.cfg index e4219c9c4..44d632ee1 100644 --- a/monsters.cfg +++ b/monsters.cfg @@ -190,6 +190,9 @@ set g_monster_shalrath_heal_friends 15 "Amount of health Vore will regenerate ne set g_monster_shalrath_heal_minhealth 250 "Health limit below which Vore will try to heal itself" set g_monster_shalrath_heal_range 200 "Maximum healing distance" set g_monster_shalrath_heal_delay 1.5 "Delay between healing bursts" +set g_monster_shalrath_shield_blockpercent 20 "% of damage inflicted on Vore if using a force field" +set g_monster_shalrath_shield_delay 7 "Refire for Vore force shield" +set g_monster_shalrath_shield_time 3 "Amount of time Vore force field lasts" // Zombie set g_monster_zombie 1 "Enable Zombies" diff --git a/qcsrc/server/monsters/monster/shalrath.qc b/qcsrc/server/monsters/monster/shalrath.qc index 7971d1d72..f06900257 100644 --- a/qcsrc/server/monsters/monster/shalrath.qc +++ b/qcsrc/server/monsters/monster/shalrath.qc @@ -20,6 +20,9 @@ float autocvar_g_monster_shalrath_heal_friends; float autocvar_g_monster_shalrath_heal_minhealth; float autocvar_g_monster_shalrath_heal_range; float autocvar_g_monster_shalrath_heal_delay; +float autocvar_g_monster_shalrath_shield_time; +float autocvar_g_monster_shalrath_shield_delay; +float autocvar_g_monster_shalrath_shield_blockpercent; // animations const float shalrath_anim_idle = 0; @@ -286,7 +289,7 @@ void shalrath_shield() setmodel(self.weaponentity, "models/onslaught/generator_shield.md3"); setattachment(self.weaponentity, self, ""); self.weaponentity.classname = "shield"; - self.weaponentity.ltime = time + 3; + self.weaponentity.ltime = time + autocvar_g_monster_shalrath_shield_time; self.weaponentity.health = 70; self.weaponentity.alpha = 0.5; self.weaponentity.scale = self.scale * 0.6; @@ -295,12 +298,12 @@ void shalrath_shield() self.weaponentity.movetype = MOVETYPE_NOCLIP; self.weaponentity.avelocity = '7 0 11'; - self.lastshielded = time + 7; // 1 shield every 7 seconds? + self.lastshielded = time + autocvar_g_monster_shalrath_shield_delay; monsters_setframe(shalrath_anim_attack); self.attack_finished_single = time + 1; - self.armorvalue = 0.2; + self.armorvalue = autocvar_g_monster_shalrath_shield_blockpercent / 100; } void shalrath_die () -- 2.39.2