]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Survival: Bugfixes.
authorLyberta <lyberta@lyberta.net>
Sat, 3 Jun 2017 17:53:37 +0000 (20:53 +0300)
committerLyberta <lyberta@lyberta.net>
Sat, 3 Jun 2017 17:53:37 +0000 (20:53 +0300)
qcsrc/server/mutators/mutator/gamemode_survival.qc

index d8b571e6b416b0b3063491762cc006982f8c9229..8ec252f11424b8a5d34967d1644743eaf1af42b2 100644 (file)
@@ -962,6 +962,11 @@ void Surv_RoundCleanup()
                {
                        WaypointSprite_Kill(it.surv_attack_sprite);
                }
+               if (it.surv_savedplayerstate)
+               {
+                       delete(it.surv_savedplayerstate);
+                       it.surv_savedplayerstate = NULL;
+               }
        });
        if (surv_type == SURVIVAL_TYPE_VERSUS)
        {
@@ -1791,8 +1796,16 @@ MUTATOR_HOOKFUNCTION(surv, PlayerDamaged)
        }
        else
        {
-               WaypointSprite_UpdateHealth(target.surv_attack_sprite,
-                       target.armorvalue + 1);
+               if (autocvar_g_instagib == 1)
+               {
+                       WaypointSprite_UpdateHealth(target.surv_attack_sprite,
+                               target.armorvalue + 1);
+               }
+               else
+               {
+                       WaypointSprite_UpdateHealth(target.surv_attack_sprite,
+                               target.health + target.armorvalue);
+               }
        }
 }