X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Fmutators%2Fmutator%2Foverkill%2Foverkill.qc;h=2fb75b3f8d9696b8ce644748f5f837d0e19a89f5;hb=8cbf0e84432e075e617f43c037c645ea9846eba0;hp=a25dbe3e7829fa5f59e41c50643a8322bbf48b29;hpb=17308b9ad60c2f773be0de39b811a9752e3037af;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/mutators/mutator/overkill/overkill.qc b/qcsrc/common/mutators/mutator/overkill/overkill.qc index a25dbe3e7..2fb75b3f8 100644 --- a/qcsrc/common/mutators/mutator/overkill/overkill.qc +++ b/qcsrc/common/mutators/mutator/overkill/overkill.qc @@ -128,7 +128,7 @@ void ok_DropItem(entity this, entity targ) e.noalign = true; e.pickup_anyway = true; e.spawnfunc_checked = true; - WITHSELF(e, spawnfunc_item_armor_small(e)); + spawnfunc_item_armor_small(e); if (!wasfreed(e)) { // might have been blocked by a mutator e.movetype = MOVETYPE_TOSS; e.gravity = 1; @@ -165,12 +165,16 @@ MUTATOR_HOOKFUNCTION(ok, MonsterDropItem) } MUTATOR_HOOKFUNCTION(ok, PlayerRegen) -{SELFPARAM(); +{ + entity player = M_ARGV(0, entity); + // overkill's values are different, so use custom regen - if(!STAT(FROZEN, this)) + if(!STAT(FROZEN, player)) { - this.armorvalue = CalcRotRegen(this.armorvalue, autocvar_g_balance_armor_regenstable, autocvar_g_balance_armor_regen, autocvar_g_balance_armor_regenlinear, 1 * frametime * (time > this.ok_pauseregen_finished), 0, 0, 1, 1 * frametime * (time > this.pauserotarmor_finished), autocvar_g_balance_armor_limit); - this.health = CalcRotRegen(this.health, autocvar_g_balance_health_regenstable, 0, 100, 1 * frametime * (time > this.ok_pauseregen_finished), 200, 0, autocvar_g_balance_health_rotlinear, 1 * frametime * (time > this.pauserothealth_finished), autocvar_g_balance_health_limit); + player.armorvalue = CalcRotRegen(player.armorvalue, autocvar_g_balance_armor_regenstable, autocvar_g_balance_armor_regen, autocvar_g_balance_armor_regenlinear, + 1 * frametime * (time > player.ok_pauseregen_finished), 0, 0, 1, 1 * frametime * (time > player.pauserotarmor_finished), autocvar_g_balance_armor_limit); + player.health = CalcRotRegen(player.health, autocvar_g_balance_health_regenstable, 0, 100, 1 * frametime * (time > player.ok_pauseregen_finished), 200, 0, + autocvar_g_balance_health_rotlinear, 1 * frametime * (time > player.pauserothealth_finished), autocvar_g_balance_health_limit); float minf, maxf, limitf; @@ -178,7 +182,8 @@ MUTATOR_HOOKFUNCTION(ok, PlayerRegen) minf = autocvar_g_balance_fuel_regenstable; limitf = autocvar_g_balance_fuel_limit; - this.ammo_fuel = CalcRotRegen(this.ammo_fuel, minf, autocvar_g_balance_fuel_regen, autocvar_g_balance_fuel_regenlinear, frametime * (time > this.pauseregen_finished) * ((this.items & ITEM_JetpackRegen.m_itemid) != 0), maxf, autocvar_g_balance_fuel_rot, autocvar_g_balance_fuel_rotlinear, frametime * (time > this.pauserotfuel_finished), limitf); + player.ammo_fuel = CalcRotRegen(player.ammo_fuel, minf, autocvar_g_balance_fuel_regen, autocvar_g_balance_fuel_regenlinear, + frametime * (time > player.pauseregen_finished) * ((player.items & ITEM_JetpackRegen.m_itemid) != 0), maxf, autocvar_g_balance_fuel_rot, autocvar_g_balance_fuel_rotlinear, frametime * (time > player.pauserotfuel_finished), limitf); } return true; // return true anyway, as frozen uses no regen }