]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/mapobjects/platforms.qc
Merge branch 'master' into Lyberta/WaypointIcons
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / mapobjects / platforms.qc
index cc909e5c5600fa0def2e10ab424282b6b0cb64f9..aae20894d36a6e4bb39b3ff5aaf421f7617c9d8f 100644 (file)
@@ -93,7 +93,7 @@ void plat_center_touch(entity this, entity toucher)
        if (!toucher.iscreature)
                return;
 
-       if (GetResourceAmount(toucher, RESOURCE_HEALTH) <= 0)
+       if (GetResource(toucher, RES_HEALTH) <= 0)
                return;
 #elif defined(CSQC)
        if (!IS_PLAYER(toucher))
@@ -114,7 +114,7 @@ void plat_outside_touch(entity this, entity toucher)
        if (!toucher.iscreature)
                return;
 
-       if (GetResourceAmount(toucher, RESOURCE_HEALTH) <= 0)
+       if (GetResource(toucher, RES_HEALTH) <= 0)
                return;
 #elif defined(CSQC)
        if (!IS_PLAYER(toucher))
@@ -179,7 +179,7 @@ void plat_use(entity this, entity actor, entity trigger)
 
 void plat_reset(entity this)
 {
-       IFTARGETED
+       if(this.targetname && this.targetname != "")
        {
                setorigin(this, this.pos1);
                this.state = STATE_UP;