]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Rebalance monsters, add more options to the regen hook, also fix nades
authorMario <zacjardine@y7mail.com>
Sat, 29 Aug 2015 13:27:59 +0000 (23:27 +1000)
committerMario <zacjardine@y7mail.com>
Sat, 29 Aug 2015 13:27:59 +0000 (23:27 +1000)
monsters.cfg
qcsrc/client/csqcmodel_hooks.qc
qcsrc/client/weapons/projectile.qc
qcsrc/server/cl_client.qc
qcsrc/server/mutators/events.qh

index 3ff25a404f410256a83243c070db9bfaeb75c621..9d961c0ad636036bfd440a91ecdddbb2f83dc75b 100644 (file)
@@ -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
index 91ab02098ceb6ab824b7044f24307b4582973c7d..d8c44d660c022dc49d5cf5f481fd4aedfde2bc94 100644 (file)
@@ -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)
index 90d3a29e68a2b7bef80f7688945f2bad59109c31..c85347dff376c83e398232e3e2df9c860d5945e3 100644 (file)
@@ -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"));
index bb3d76e1f0c898050d836c29458e4aa11fe5055e..6d804149725cd560a773f4a42bc8db788d3fcb04 100644 (file)
@@ -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!
index d84ec70eb44226e848e05f36eb46a917dd6e6581..d6f00989792b19d3b7694ef86a2db3dbffce9dca 100644 (file)
@@ -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