]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/mapobjects/func/breakable.qc
Revert e30214cf "Purge SetResourceAmountExplicit" because it breaks map vote and...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / mapobjects / func / breakable.qc
index a1b8c76ba42c49e736f5e742cdb1a787c4fbc3ab..32926d4908cfa8fff4941f31773a3725ccb90bbc 100644 (file)
@@ -129,7 +129,7 @@ void func_breakable_look_restore(entity this)
 
 void func_breakable_behave_destroyed(entity this)
 {
-       SetResource(this, RES_HEALTH, this.max_health);
+       SetResourceExplicit(this, RES_HEALTH, this.max_health);
        this.takedamage = DAMAGE_NO;
        if(this.bot_attack)
                IL_REMOVE(g_bot_targets, this);
@@ -157,7 +157,7 @@ void func_breakable_think(entity this)
 void func_breakable_destroy(entity this, entity actor, entity trigger);
 void func_breakable_behave_restore(entity this)
 {
-       SetResource(this, RES_HEALTH, this.max_health);
+       SetResourceExplicit(this, RES_HEALTH, this.max_health);
        if(this.sprite)
        {
                WaypointSprite_UpdateMaxHealth(this.sprite, this.max_health);
@@ -316,7 +316,7 @@ spawnfunc(func_breakable)
 {
        float n, i;
        if(!GetResource(this, RES_HEALTH))
-               SetResource(this, RES_HEALTH, 100);
+               SetResourceExplicit(this, RES_HEALTH, 100);
        this.max_health = GetResource(this, RES_HEALTH);
 
        // yes, I know, MOVETYPE_NONE is not available here, not that one would want it here anyway