]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/portals.qc
Revert e30214cf "Purge SetResourceAmountExplicit" because it breaks map vote and...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / portals.qc
index fb09d352b2ec365e2a450b14d51a56d34d93c410..6f128716365933599e271f4294ef295a779ef8b8 100644 (file)
@@ -199,8 +199,8 @@ float Portal_TeleportPlayer(entity teleporter, entity player)
        // reset fade counter
        teleporter.portal_wants_to_vanish = 0;
        teleporter.fade_time = ((autocvar_g_balance_portal_lifetime >= 0) ? time + autocvar_g_balance_portal_lifetime : 0);
-       SetResource(teleporter, RES_HEALTH, autocvar_g_balance_portal_health);
-       SetResource(teleporter.enemy, RES_HEALTH, autocvar_g_balance_portal_health);
+       SetResourceExplicit(teleporter, RES_HEALTH, autocvar_g_balance_portal_health);
+       SetResourceExplicit(teleporter.enemy, RES_HEALTH, autocvar_g_balance_portal_health);
 
        return 1;
 }
@@ -639,7 +639,7 @@ entity Portal_Spawn(entity own, vector org, vector ang)
        portal.takedamage = DAMAGE_AIM;
        portal.event_damage = Portal_Damage;
        portal.fade_time = ((autocvar_g_balance_portal_lifetime >= 0) ? time + autocvar_g_balance_portal_lifetime : 0);
-       SetResource(portal, RES_HEALTH, autocvar_g_balance_portal_health);
+       SetResourceExplicit(portal, RES_HEALTH, autocvar_g_balance_portal_health);
        setmodel(portal, MDL_PORTAL);
        portal.savemodelindex = portal.modelindex;
        setcefc(portal, Portal_Customize);