]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/triggers/func/door.qc
Use SELFPARAM() in every function that uses self
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / triggers / func / door.qc
index 4c56815d2ffc3488a089a23c27ab56b26d6176a8..9688214e3be7c07a3e94d6d8e47eab25af175fc1 100644 (file)
@@ -26,7 +26,7 @@ void() door_rotating_go_down;
 void() door_rotating_go_up;
 
 void door_blocked()
-{
+{SELFPARAM();
        if((self.spawnflags & 8)
 #ifdef SVQC
                && (other.takedamage != DAMAGE_NO)
@@ -85,7 +85,7 @@ void door_blocked()
 }
 
 void door_hit_top()
-{
+{SELFPARAM();
        if (self.noise1 != "")
                sound (self, CH_TRIGGER_SINGLE, self.noise1, VOL_BASE, ATTEN_NORM);
        self.state = STATE_TOP;
@@ -102,14 +102,14 @@ void door_hit_top()
 }
 
 void door_hit_bottom()
-{
+{SELFPARAM();
        if (self.noise1 != "")
                sound (self, CH_TRIGGER_SINGLE, self.noise1, VOL_BASE, ATTEN_NORM);
        self.state = STATE_BOTTOM;
 }
 
 void door_go_down()
-{
+{SELFPARAM();
        if (self.noise2 != "")
                sound (self, CH_TRIGGER_SINGLE, self.noise2, VOL_BASE, ATTEN_NORM);
        if (self.max_health)
@@ -123,7 +123,7 @@ void door_go_down()
 }
 
 void door_go_up()
-{
+{SELFPARAM();
        if (self.state == STATE_UP)
                return;         // already going up
 
@@ -155,7 +155,7 @@ ACTIVATION FUNCTIONS
 */
 
 float door_check_keys(void)
-{
+{SELFPARAM();
        local entity door;
 
 
@@ -212,7 +212,7 @@ float door_check_keys(void)
 }
 
 void door_fire()
-{
+{SELFPARAM();
        entity  oself;
        entity  starte;
 
@@ -271,7 +271,7 @@ void door_fire()
 }
 
 void door_use()
-{
+{SELFPARAM();
        entity oself;
 
        //dprint("door_use (model: ");dprint(self.model);dprint(")\n");
@@ -286,7 +286,7 @@ void door_use()
 }
 
 void door_damage(entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
-{
+{SELFPARAM();
        entity oself;
        if(self.spawnflags & DOOR_NOSPLASH)
                if(!(DEATH_ISSPECIAL(deathtype)) && (deathtype & HITTYPE_SPLASH))
@@ -320,7 +320,7 @@ Prints messages
 */
 
 void door_touch()
-{
+{SELFPARAM();
        if (!IS_PLAYER(other))
                return;
        if (self.owner.attack_finished_single > time)
@@ -339,7 +339,7 @@ void door_touch()
 }
 
 void door_generic_plat_blocked()
-{
+{SELFPARAM();
 
        if((self.spawnflags & 8) && (other.takedamage != DAMAGE_NO)) { // KIll Kill Kill!!
 #ifdef SVQC
@@ -377,7 +377,7 @@ void door_generic_plat_blocked()
 }
 
 void door_rotating_hit_top()
-{
+{SELFPARAM();
        if (self.noise1 != "")
                sound (self, CH_TRIGGER_SINGLE, self.noise1, VOL_BASE, ATTEN_NORM);
        self.state = STATE_TOP;
@@ -388,7 +388,7 @@ void door_rotating_hit_top()
 }
 
 void door_rotating_hit_bottom()
-{
+{SELFPARAM();
        if (self.noise1 != "")
                sound (self, CH_TRIGGER_SINGLE, self.noise1, VOL_BASE, ATTEN_NORM);
        if (self.lip==666) // self.lip is used to remember reverse opening direction for door_rotating
@@ -400,7 +400,7 @@ void door_rotating_hit_bottom()
 }
 
 void door_rotating_go_down()
-{
+{SELFPARAM();
        if (self.noise2 != "")
                sound (self, CH_TRIGGER_SINGLE, self.noise2, VOL_BASE, ATTEN_NORM);
        if (self.max_health)
@@ -414,7 +414,7 @@ void door_rotating_go_down()
 }
 
 void door_rotating_go_up()
-{
+{SELFPARAM();
        if (self.state == STATE_UP)
                return;         // already going up
 
@@ -445,7 +445,7 @@ Spawned if a door lacks a real activator
 */
 
 void door_trigger_touch()
-{
+{SELFPARAM();
        if (other.health < 1)
 #ifdef SVQC
                if (!((other.iscreature || (other.flags & FL_PROJECTILE)) && !PHYS_DEAD(other)))
@@ -470,7 +470,7 @@ void door_trigger_touch()
 }
 
 void spawn_field(vector fmins, vector fmaxs)
-{
+{SELFPARAM();
        entity  trigger;
        vector  t1 = fmins, t2 = fmaxs;
 
@@ -500,7 +500,7 @@ LinkDoors
 */
 
 entity LinkDoors_nextent(entity cur, entity near, entity pass)
-{
+{SELFPARAM();
        while((cur = find(cur, classname, self.classname)) && ((cur.spawnflags & 4) || cur.enemy))
        {
        }
@@ -524,7 +524,7 @@ bool LinkDoors_isconnected(entity e1, entity e2, entity pass)
 void door_link();
 #endif
 void LinkDoors()
-{
+{SELFPARAM();
        entity  t;
        vector  cmins, cmaxs;
 
@@ -647,7 +647,7 @@ FIXME: only one sound set available at the time being
 */
 
 float door_send(entity to, float sf)
-{
+{SELFPARAM();
        WriteByte(MSG_ENTITY, ENT_CLIENT_DOOR);
        WriteByte(MSG_ENTITY, sf);
 
@@ -709,7 +709,7 @@ void door_link()
 #endif
 
 void door_init_startopen()
-{
+{SELFPARAM();
        SUB_SETORIGIN(self, self.pos2);
        self.pos2 = self.pos1;
        self.pos1 = self.origin;
@@ -720,7 +720,7 @@ void door_init_startopen()
 }
 
 void door_reset()
-{
+{SELFPARAM();
        SUB_SETORIGIN(self, self.pos1);
        self.SUB_VELOCITY = '0 0 0';
        self.state = STATE_BOTTOM;
@@ -736,7 +736,7 @@ void door_reset()
 
 // spawnflags require key (for now only func_door)
 void spawnfunc_func_door()
-{
+{SELFPARAM();
        // Quake 1 keys compatibility
        if (self.spawnflags & SPAWNFLAGS_GOLD_KEY)
                self.itemkeys |= ITEM_KEY_BIT(0);
@@ -815,7 +815,7 @@ void door_draw()
 }
 
 void ent_door()
-{
+{SELFPARAM();
        float sf = ReadByte();
 
        if(sf & SF_TRIGGER_INIT)