]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/triggers/func/door_secret.qc
Deprecate weapon_func
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / triggers / func / door_secret.qc
index 09ded99b9acf2c76b0a4704b6d0cd9246051c9c3..b793228784822068ec579e1b29924c95c5c5a789 100644 (file)
@@ -14,12 +14,12 @@ const float SECRET_NO_SHOOT = 8;            // only opened by trigger
 const float SECRET_YES_SHOOT = 16;     // shootable even if targeted
 
 void fd_secret_use()
-{
+{SELFPARAM();
        float temp;
        string message_save;
 
        self.health = 10000;
-       self.bot_attack = TRUE;
+       self.bot_attack = true;
 
        // exit if still moving around...
        if (self.origin != self.oldorigin)
@@ -36,7 +36,7 @@ void fd_secret_use()
 
        if (self.noise1 != "")
                sound(self, CH_TRIGGER_SINGLE, self.noise1, VOL_BASE, ATTEN_NORM);
-       self.nextthink = self.ltime + 0.1;
+       self.SUB_NEXTTHINK = self.SUB_LTIME + 0.1;
 
        temp = 1 - (self.spawnflags & SECRET_1ST_LEFT); // 1 or -1
        makevectors(self.mangle);
@@ -63,15 +63,15 @@ void fd_secret_use()
                sound(self, CH_TRIGGER_SINGLE, self.noise2, VOL_BASE, ATTEN_NORM);
 }
 
-void fd_secret_damage(entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force)
+void fd_secret_damage(entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
 {
        fd_secret_use();
 }
 
 // Wait after first movement...
 void fd_secret_move1()
-{
-       self.nextthink = self.ltime + 1.0;
+{SELFPARAM();
+       self.SUB_NEXTTHINK = self.SUB_LTIME + 1.0;
        self.think = fd_secret_move2;
        if (self.noise3 != "")
                sound(self, CH_TRIGGER_SINGLE, self.noise3, VOL_BASE, ATTEN_NORM);
@@ -79,7 +79,7 @@ void fd_secret_move1()
 
 // Start moving sideways w/sound...
 void fd_secret_move2()
-{
+{SELFPARAM();
        if (self.noise2 != "")
                sound(self, CH_TRIGGER_SINGLE, self.noise2, VOL_BASE, ATTEN_NORM);
        SUB_CalcMove(self.dest2, TSPEED_LINEAR, self.speed, fd_secret_move3);
@@ -87,19 +87,19 @@ void fd_secret_move2()
 
 // Wait here until time to go back...
 void fd_secret_move3()
-{
+{SELFPARAM();
        if (self.noise3 != "")
                sound(self, CH_TRIGGER_SINGLE, self.noise3, VOL_BASE, ATTEN_NORM);
        if (!(self.spawnflags & SECRET_OPEN_ONCE))
        {
-               self.nextthink = self.ltime + self.wait;
+               self.SUB_NEXTTHINK = self.SUB_LTIME + self.wait;
                self.think = fd_secret_move4;
        }
 }
 
 // Move backward...
 void fd_secret_move4()
-{
+{SELFPARAM();
        if (self.noise2 != "")
                sound(self, CH_TRIGGER_SINGLE, self.noise2, VOL_BASE, ATTEN_NORM);
        SUB_CalcMove(self.dest1, TSPEED_LINEAR, self.speed, fd_secret_move5);
@@ -107,22 +107,22 @@ void fd_secret_move4()
 
 // Wait 1 second...
 void fd_secret_move5()
-{
-       self.nextthink = self.ltime + 1.0;
+{SELFPARAM();
+       self.SUB_NEXTTHINK = self.SUB_LTIME + 1.0;
        self.think = fd_secret_move6;
        if (self.noise3 != "")
                sound(self, CH_TRIGGER_SINGLE, self.noise3, VOL_BASE, ATTEN_NORM);
 }
 
 void fd_secret_move6()
-{
+{SELFPARAM();
        if (self.noise2 != "")
                sound(self, CH_TRIGGER_SINGLE, self.noise2, VOL_BASE, ATTEN_NORM);
        SUB_CalcMove(self.oldorigin, TSPEED_LINEAR, self.speed, fd_secret_done);
 }
 
 void fd_secret_done()
-{
+{SELFPARAM();
        if (self.spawnflags&SECRET_YES_SHOOT)
        {
                self.health = 10000;
@@ -134,7 +134,7 @@ void fd_secret_done()
 }
 
 void secret_blocked()
-{
+{SELFPARAM();
        if (time < self.attack_finished_single)
                return;
        self.attack_finished_single = time + 0.5;
@@ -149,7 +149,7 @@ Prints messages
 ================
 */
 void secret_touch()
-{
+{SELFPARAM();
        if (!other.iscreature)
                return;
        if (self.attack_finished_single > time)
@@ -166,7 +166,7 @@ void secret_touch()
 }
 
 void secret_reset()
-{
+{SELFPARAM();
        if (self.spawnflags&SECRET_YES_SHOOT)
        {
                self.health = 10000;
@@ -174,7 +174,7 @@ void secret_reset()
        }
        setorigin(self, self.oldorigin);
        self.think = func_null;
-       self.nextthink = 0;
+       self.SUB_NEXTTHINK = 0;
 }
 
 /*QUAKED spawnfunc_func_door_secret (0 .5 .8) ? open_once 1st_left 1st_down no_shoot always_shoot
@@ -195,7 +195,7 @@ If a secret door has a targetname, it will only be opened by it's botton or trig
 */
 
 void spawnfunc_func_door_secret()
-{
+{SELFPARAM();
        /*if (!self.deathtype) // map makers can override this
                self.deathtype = " got in the way";*/