]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/triggers/func/door.qc
Combine `SELFCALL` and `SELFCALL_DONE` with `WITH`
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / triggers / func / door.qc
index 0ea2f6dfe28756a2aee3eebe17485d6032d25724..053f0f5f669111264279bd9978756cf276fb92ea 100644 (file)
@@ -273,8 +273,7 @@ void door_use()
 
        if (self.owner)
        {
-               SELFCALL(self.owner, door_fire());
-               SELFCALL_DONE();
+               WITH(entity, self, self.owner, door_fire());
        }
 }
 
@@ -295,8 +294,7 @@ void door_damage(entity inflictor, entity attacker, float damage, int deathtype,
        {
                self.owner.health = self.owner.max_health;
                self.owner.takedamage = DAMAGE_NO;      // wil be reset upon return
-               SELFCALL(self.owner, door_use());
-               SELFCALL_DONE();
+               WITH(entity, self, self.owner, door_use());
        }
 }