X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fportals.qc;h=6f128716365933599e271f4294ef295a779ef8b8;hb=ceb215a0fdd60fadc7d6185f14268967fbe67a0f;hp=58c42110fd08f141b40752cc3fa21bc507e32017;hpb=3fc2359b7933352424af07db8f84cbb9342e934f;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/portals.qc b/qcsrc/server/portals.qc index 58c42110f..6f1287163 100644 --- a/qcsrc/server/portals.qc +++ b/qcsrc/server/portals.qc @@ -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); - SetResourceAmount(teleporter, RES_HEALTH, autocvar_g_balance_portal_health); - SetResourceAmount(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; } @@ -436,7 +436,7 @@ void Portal_Damage(entity this, entity inflictor, entity attacker, float damage, if(IS_INDEPENDENT_PLAYER(attacker) || IS_INDEPENDENT_PLAYER(this.aiment)) return; TakeResource(this, RES_HEALTH, damage); - if(GetResourceAmount(this, RES_HEALTH) < 0) + if(GetResource(this, RES_HEALTH) < 0) Portal_Remove(this, 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); - SetResourceAmount(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);