]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Don't show a carrier health bar if the carrier has no health, fixes empty health...
authorMario <mario@smbclan.net>
Sat, 30 Apr 2016 08:32:09 +0000 (18:32 +1000)
committerMario <mario@smbclan.net>
Sat, 30 Apr 2016 08:32:09 +0000 (18:32 +1000)
qcsrc/common/mutators/mutator/waypoints/waypointsprites.qc

index 1fb8fda3b09db8952ec0d7e1e9516a89f719dd5b..d391c73fb18c7aa86b44603d77c3ad1e89d05d17 100644 (file)
@@ -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));