From: Mario Date: Sat, 30 Apr 2016 08:32:09 +0000 (+1000) Subject: Don't show a carrier health bar if the carrier has no health, fixes empty health... X-Git-Tag: xonotic-v0.8.2~941 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=419733758b63c92df6d40701e4253825ccb4fce1;p=xonotic%2Fxonotic-data.pk3dir.git Don't show a carrier health bar if the carrier has no health, fixes empty health bar in nexball --- diff --git a/qcsrc/common/mutators/mutator/waypoints/waypointsprites.qc b/qcsrc/common/mutators/mutator/waypoints/waypointsprites.qc index 1fb8fda3b..d391c73fb 100644 --- a/qcsrc/common/mutators/mutator/waypoints/waypointsprites.qc +++ b/qcsrc/common/mutators/mutator/waypoints/waypointsprites.qc @@ -1100,7 +1100,7 @@ entity WaypointSprite_AttachCarrier( { WaypointSprite_Kill(carrier.waypointsprite_attached); // FC overrides attached entity e = WaypointSprite_Spawn(spr, 0, 0, carrier, '0 0 64', world, carrier.team, carrier, waypointsprite_attachedforcarrier, false, icon); - if (e) + if (carrier.health) { WaypointSprite_UpdateMaxHealth(e, '1 0 0' * healtharmor_maxdamage(start_health, start_armorvalue, autocvar_g_balance_armor_blockpercent, DEATH_WEAPON.m_id) * 2); WaypointSprite_UpdateHealth(e, '1 0 0' * healtharmor_maxdamage(carrier.health, carrier.armorvalue, autocvar_g_balance_armor_blockpercent, DEATH_WEAPON.m_id));