From c64349e18e1aabef5999d81a8a6a85482b925ffd Mon Sep 17 00:00:00 2001 From: Mario Date: Sat, 29 Aug 2015 23:27:59 +1000 Subject: [PATCH] Rebalance monsters, add more options to the regen hook, also fix nades --- monsters.cfg | 75 ++++++++++++++++-------------- qcsrc/client/csqcmodel_hooks.qc | 2 +- qcsrc/client/weapons/projectile.qc | 4 +- qcsrc/server/cl_client.qc | 23 ++++++--- qcsrc/server/mutators/events.qh | 18 +++---- 5 files changed, 67 insertions(+), 55 deletions(-) diff --git a/monsters.cfg b/monsters.cfg index 3ff25a404..9d961c0ad 100644 --- a/monsters.cfg +++ b/monsters.cfg @@ -1,35 +1,37 @@ // {{{ #1: Zombie -set g_monster_zombie_attack_leap_damage 50 +set g_monster_zombie_attack_leap_damage 60 set g_monster_zombie_attack_leap_delay 1.5 set g_monster_zombie_attack_leap_force 55 set g_monster_zombie_attack_leap_speed 500 -set g_monster_zombie_attack_melee_damage 40 -set g_monster_zombie_attack_melee_delay 1.2 -set g_monster_zombie_health 150 -set g_monster_zombie_speed_run 400 +set g_monster_zombie_attack_melee_damage 55 +set g_monster_zombie_attack_melee_delay 1 +set g_monster_zombie_damageforcescale 0.550000012 +set g_monster_zombie_health 200 +set g_monster_zombie_speed_run 600 set g_monster_zombie_speed_stop 100 -set g_monster_zombie_speed_walk 150 +set g_monster_zombie_speed_walk 300 // }}} // {{{ #2: Spider set g_monster_spider_attack_bite_damage 35 -set g_monster_spider_attack_bite_delay 1.2 -set g_monster_spider_attack_web_damagetime 4 +set g_monster_spider_attack_bite_delay 1.5 +set g_monster_spider_attack_web_damagetime 7 set g_monster_spider_attack_web_delay 1.5 -set g_monster_spider_attack_web_speed 1000 +set g_monster_spider_attack_web_speed 1300 set g_monster_spider_attack_web_speed_up 150 -set g_monster_spider_health 160 -set g_monster_spider_speed_run 450 +set g_monster_spider_damageforcescale 0.600000024 +set g_monster_spider_health 180 +set g_monster_spider_speed_run 750 set g_monster_spider_speed_stop 100 -set g_monster_spider_speed_walk 150 +set g_monster_spider_speed_walk 400 // }}} // {{{ #3: Mage -set g_monster_mage_attack_push_damage 15 +set g_monster_mage_attack_push_damage 25 set g_monster_mage_attack_push_delay 1 set g_monster_mage_attack_push_force 300 set g_monster_mage_attack_push_radius 150 -set g_monster_mage_attack_spike_accel 400 -set g_monster_mage_attack_spike_damage 30 -set g_monster_mage_attack_spike_decel 400 +set g_monster_mage_attack_spike_accel 480 +set g_monster_mage_attack_spike_damage 45 +set g_monster_mage_attack_spike_decel 480 set g_monster_mage_attack_spike_delay 2 set g_monster_mage_attack_spike_radius 60 set g_monster_mage_attack_spike_smart 1 @@ -38,44 +40,49 @@ set g_monster_mage_attack_spike_smart_trace_max 2500 set g_monster_mage_attack_spike_smart_trace_min 1000 set g_monster_mage_attack_spike_speed_max 370 set g_monster_mage_attack_spike_turnrate 0.65 -set g_monster_mage_heal_allies 15 +set g_monster_mage_damageforcescale 0.5 +set g_monster_mage_heal_allies 20 set g_monster_mage_heal_delay 1.5 set g_monster_mage_heal_minhealth 250 -set g_monster_mage_heal_range 200 -set g_monster_mage_heal_self 35 -set g_monster_mage_health 200 +set g_monster_mage_heal_range 250 +set g_monster_mage_heal_self 40 +set g_monster_mage_health 400 set g_monster_mage_shield_blockpercent 0.8 set g_monster_mage_shield_delay 7 set g_monster_mage_shield_time 3 -set g_monster_mage_speed_run 75 +set g_monster_mage_speed_run 400 set g_monster_mage_speed_stop 50 -set g_monster_mage_speed_walk 50 +set g_monster_mage_speed_walk 250 // }}} // {{{ #4: Wyvern -set g_monster_wyvern_attack_fireball_damage 30 -set g_monster_wyvern_attack_fireball_damagetime 3 +set g_monster_wyvern_attack_fireball_damage 50 +set g_monster_wyvern_attack_fireball_damagetime 2 set g_monster_wyvern_attack_fireball_edgedamage 20 set g_monster_wyvern_attack_fireball_force 50 set g_monster_wyvern_attack_fireball_radius 120 -set g_monster_wyvern_attack_fireball_speed 900 -set g_monster_wyvern_health 95 -set g_monster_wyvern_speed_run 120 +set g_monster_wyvern_attack_fireball_speed 1200 +set g_monster_wyvern_damageforcescale 0.600000024 +set g_monster_wyvern_health 150 +set g_monster_wyvern_speed_run 250 set g_monster_wyvern_speed_stop 300 -set g_monster_wyvern_speed_walk 40 +set g_monster_wyvern_speed_walk 120 // }}} // {{{ #5: Shambler -set g_monster_shambler_attack_claw_damage 50 -set g_monster_shambler_attack_lightning_damage 15 +set g_monster_shambler_attack_claw_damage 60 +set g_monster_shambler_attack_lightning_damage 25 +set g_monster_shambler_attack_lightning_damage_zap 15 set g_monster_shambler_attack_lightning_force 100 set g_monster_shambler_attack_lightning_radius 50 set g_monster_shambler_attack_lightning_radius_zap 250 -set g_monster_shambler_attack_lightning_speed 800 +set g_monster_shambler_attack_lightning_speed 1000 set g_monster_shambler_attack_lightning_speed_up 150 set g_monster_shambler_attack_smash_damage 50 -set g_monster_shambler_health 500 -set g_monster_shambler_speed_run 150 +set g_monster_shambler_attack_smash_range 0 +set g_monster_shambler_damageforcescale 0.100000001 +set g_monster_shambler_health 650 +set g_monster_shambler_speed_run 320 set g_monster_shambler_speed_stop 300 -set g_monster_shambler_speed_walk 100 +set g_monster_shambler_speed_walk 150 // }}} // {{{ Misc diff --git a/qcsrc/client/csqcmodel_hooks.qc b/qcsrc/client/csqcmodel_hooks.qc index 91ab02098..d8c44d660 100644 --- a/qcsrc/client/csqcmodel_hooks.qc +++ b/qcsrc/client/csqcmodel_hooks.qc @@ -740,7 +740,7 @@ void CSQCModel_Hook_PreUpdate(bool isnew, bool isplayer, bool islocalplayer) void CSQCModel_Hook_PostUpdate(bool isnew, bool isplayer, bool islocalplayer) { // is it a player model? (shared state) - self.isplayermodel = (substring(self.model, 0, 14) == "models/player/" || substring(self.model, 0, 17) == "models/ok_player/"); + self.isplayermodel = (substring(self.model, 0, 14) == "models/player/" || substring(self.model, 0, 17) == "models/ok_player/" || (substring(self.model, 0, 16) == "models/monsters/" && (self.entnum >= 1 && self.entnum <= maxclients))); // save values set by server if(self.isplayermodel) diff --git a/qcsrc/client/weapons/projectile.qc b/qcsrc/client/weapons/projectile.qc index 90d3a29e6..c85347dff 100644 --- a/qcsrc/client/weapons/projectile.qc +++ b/qcsrc/client/weapons/projectile.qc @@ -516,8 +516,8 @@ void Projectile_Precache() precache_model("models/tracer.mdl"); precache_model("models/sphere/sphere.md3"); - precache_model(W_Model("v_ok_grenade")); - precache_model(W_Model("ok_rocket")); + precache_model(W_Model("v_ok_grenade.md3")); + precache_model(W_Model("ok_rocket.md3")); precache_sound(W_Sound("electro_fly")); precache_sound(W_Sound("rocket_fly")); diff --git a/qcsrc/server/cl_client.qc b/qcsrc/server/cl_client.qc index bb3d76e1f..6d8041497 100644 --- a/qcsrc/server/cl_client.qc +++ b/qcsrc/server/cl_client.qc @@ -1635,13 +1635,22 @@ void player_regen (void) { float max_mod, regen_mod, rot_mod, limit_mod; max_mod = regen_mod = rot_mod = limit_mod = 1; - if(!MUTATOR_CALLHOOK(PlayerRegen, max_mod, regen_mod, rot_mod, limit_mod)) + regen_mod_max = max_mod; + regen_mod_regen = regen_mod; + regen_mod_rot = rot_mod; + regen_mod_limit = limit_mod; + + regen_health = autocvar_g_balance_health_regen; + regen_health_linear = autocvar_g_balance_health_regenlinear; + regen_health_rot = autocvar_g_balance_health_rot; + regen_health_rotlinear = autocvar_g_balance_health_rotlinear; + regen_health_stable = autocvar_g_balance_health_regenstable; + regen_health_rotstable = autocvar_g_balance_health_rotstable; + if(!MUTATOR_CALLHOOK(PlayerRegen)) if(!self.frozen) { - float minh, mina, maxh, maxa, limith, limita; - maxh = autocvar_g_balance_health_rotstable; + float mina, maxa, limith, limita; maxa = autocvar_g_balance_armor_rotstable; - minh = autocvar_g_balance_health_regenstable; mina = autocvar_g_balance_armor_regenstable; limith = autocvar_g_balance_health_limit; limita = autocvar_g_balance_armor_limit; @@ -1651,13 +1660,13 @@ void player_regen (void) rot_mod = regen_mod_rot; limit_mod = regen_mod_limit; - maxh = maxh * max_mod; - minh = minh * max_mod; + regen_health_rotstable = regen_health_rotstable * max_mod; + regen_health_stable = regen_health_stable * max_mod; limith = limith * limit_mod; limita = limita * limit_mod; self.armorvalue = CalcRotRegen(self.armorvalue, mina, autocvar_g_balance_armor_regen, autocvar_g_balance_armor_regenlinear, regen_mod * frametime * (time > self.pauseregen_finished), maxa, autocvar_g_balance_armor_rot, autocvar_g_balance_armor_rotlinear, rot_mod * frametime * (time > self.pauserotarmor_finished), limita); - self.health = CalcRotRegen(self.health, minh, autocvar_g_balance_health_regen, autocvar_g_balance_health_regenlinear, regen_mod * frametime * (time > self.pauseregen_finished), maxh, autocvar_g_balance_health_rot, autocvar_g_balance_health_rotlinear, rot_mod * frametime * (time > self.pauserothealth_finished), limith); + self.health = CalcRotRegen(self.health, regen_health_stable, regen_health, regen_health_linear, regen_mod * frametime * (time > self.pauseregen_finished), regen_health_rotstable, regen_health_rot, regen_health_rotlinear, rot_mod * frametime * (time > self.pauserothealth_finished), limith); } // if player rotted to death... die! diff --git a/qcsrc/server/mutators/events.qh b/qcsrc/server/mutators/events.qh index d84ec70eb..d6f009897 100644 --- a/qcsrc/server/mutators/events.qh +++ b/qcsrc/server/mutators/events.qh @@ -345,21 +345,17 @@ MUTATOR_HOOKABLE(PlayerPowerups, EV_PlayerPowerups); * called every player think frame * return 1 to disable regen */ -#define EV_PlayerRegen(i, o) \ - /**/ i(float, regen_mod_max) \ - /**/ o(float, regen_mod_max) \ - /**/ i(float, regen_mod_regen) \ - /**/ o(float, regen_mod_regen) \ - /**/ i(float, regen_mod_rot) \ - /**/ o(float, regen_mod_rot) \ - /**/ i(float, regen_mod_limit) \ - /**/ o(float, regen_mod_limit) \ - /**/ float regen_mod_max; float regen_mod_regen; float regen_mod_rot; float regen_mod_limit; -MUTATOR_HOOKABLE(PlayerRegen, EV_PlayerRegen); +float regen_health; +float regen_health_linear; +float regen_health_rot; +float regen_health_rotlinear; +float regen_health_stable; +float regen_health_rotstable; +MUTATOR_HOOKABLE(PlayerRegen, EV_NO_ARGS); /** * called when the use key is pressed -- 2.39.2