]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/triggers/func/door_secret.qc
Properly support team field on trigger_multiple
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / triggers / func / door_secret.qc
index efe997c855350d402a9e4a9a0221eb0099e79862..6f2d101ef9a914b61bae21278a6c5fa1c386b6a5 100644 (file)
@@ -20,6 +20,8 @@ void fd_secret_use(entity this, entity actor, entity trigger)
        string message_save;
 
        this.health = 10000;
+       if(!this.bot_attack)
+               IL_PUSH(g_bot_targets, this);
        this.bot_attack = true;
 
        // exit if still moving around...
@@ -37,7 +39,7 @@ void fd_secret_use(entity this, entity actor, entity trigger)
 
        if (this.noise1 != "")
                _sound(this, CH_TRIGGER_SINGLE, this.noise1, VOL_BASE, ATTEN_NORM);
-       this.SUB_NEXTTHINK = this.SUB_LTIME + 0.1;
+       this.nextthink = this.ltime + 0.1;
 
        temp = 1 - (this.spawnflags & SECRET_1ST_LEFT); // 1 or -1
        makevectors(this.mangle);
@@ -72,7 +74,7 @@ void fd_secret_damage(entity this, entity inflictor, entity attacker, float dama
 // Wait after first movement...
 void fd_secret_move1(entity this)
 {
-       this.SUB_NEXTTHINK = this.SUB_LTIME + 1.0;
+       this.nextthink = this.ltime + 1.0;
        setthink(this, fd_secret_move2);
        if (this.noise3 != "")
                _sound(this, CH_TRIGGER_SINGLE, this.noise3, VOL_BASE, ATTEN_NORM);
@@ -93,7 +95,7 @@ void fd_secret_move3(entity this)
                _sound(this, CH_TRIGGER_SINGLE, this.noise3, VOL_BASE, ATTEN_NORM);
        if (!(this.spawnflags & SECRET_OPEN_ONCE))
        {
-               this.SUB_NEXTTHINK = this.SUB_LTIME + this.wait;
+               this.nextthink = this.ltime + this.wait;
                setthink(this, fd_secret_move4);
        }
 }
@@ -109,7 +111,7 @@ void fd_secret_move4(entity this)
 // Wait 1 second...
 void fd_secret_move5(entity this)
 {
-       this.SUB_NEXTTHINK = this.SUB_LTIME + 1.0;
+       this.nextthink = this.ltime + 1.0;
        setthink(this, fd_secret_move6);
        if (this.noise3 != "")
                _sound(this, CH_TRIGGER_SINGLE, this.noise3, VOL_BASE, ATTEN_NORM);
@@ -177,7 +179,7 @@ void secret_reset(entity this)
        }
        setorigin(this, this.oldorigin);
        setthink(this, func_null);
-       this.SUB_NEXTTHINK = 0;
+       this.nextthink = 0;
 }
 
 /*QUAKED spawnfunc_func_door_secret (0 .5 .8) ? open_once 1st_left 1st_down no_shoot always_shoot
@@ -226,6 +228,7 @@ spawnfunc(func_door_secret)
 
        if (this.spawnflags & SECRET_YES_SHOOT)
        {
+               //this.canteamdamage = true; // TODO
                this.health = 10000;
                this.takedamage = DAMAGE_YES;
                this.event_damage = fd_secret_damage;