X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fserver%2Fclient.qc;h=f1d417d6bace6987d6f1a72984f6f77260b7db0f;hp=a4908860530be4122a87ddaa32940182e4a982a2;hb=b791eb248d3b3b932fcb3268015a38b7da2a08e7;hpb=71fe184f82d7cbe63831897f865754dd667f41ca diff --git a/qcsrc/server/client.qc b/qcsrc/server/client.qc index a490886053..f1d417d6ba 100644 --- a/qcsrc/server/client.qc +++ b/qcsrc/server/client.qc @@ -1622,7 +1622,6 @@ void player_regen(entity this) regen_health_stable = M_ARGV(9, float); regen_health_rotstable = M_ARGV(10, float); - if(!mutator_returnvalue) if(!STAT(FROZEN, this)) { @@ -1661,6 +1660,18 @@ void player_regen(entity this) 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); } + // Ugly hack to make sure the health and armor don't go beyond hard limit. + // TODO: Remove this hack when all code uses GivePlayerHealth and + // GivePlayerArmor. + if (this.health > RESOURCE_AMOUNT_HARD_LIMIT) + { + this.health = RESOURCE_AMOUNT_HARD_LIMIT; + } + if (this.armorvalue > RESOURCE_AMOUNT_HARD_LIMIT) + { + this.armorvalue = RESOURCE_AMOUNT_HARD_LIMIT; + } + // End hack. } bool zoomstate_set;