X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Ftriggers%2Ffunc%2Fdoor_secret.qc;h=55582696476e8b543ea80cb6b94a59bdaebae27b;hb=b465997efce43e701dc89d56d82b5ae510505056;hp=600949fe5c0528f598c0c7692108cae2578058f9;hpb=05ee5b1212a6537e5c5acb76dbc1ef9df40f85c6;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/triggers/func/door_secret.qc b/qcsrc/common/triggers/func/door_secret.qc index 600949fe5..555826964 100644 --- a/qcsrc/common/triggers/func/door_secret.qc +++ b/qcsrc/common/triggers/func/door_secret.qc @@ -1,3 +1,4 @@ +#include "door_secret.qh" #ifdef SVQC void fd_secret_move1(entity this); void fd_secret_move2(entity this); @@ -19,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... @@ -36,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); @@ -63,7 +66,7 @@ void fd_secret_use(entity this, entity actor, entity trigger) _sound(this, CH_TRIGGER_SINGLE, this.noise2, VOL_BASE, ATTEN_NORM); } -void fd_secret_damage(entity this, entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force) +void fd_secret_damage(entity this, entity inflictor, entity attacker, float damage, int deathtype, .entity weaponentity, vector hitloc, vector force) { fd_secret_use(this, NULL, NULL); } @@ -71,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); @@ -92,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); } } @@ -108,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); @@ -176,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 @@ -225,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;