X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fg_triggers.qc;h=12c75ae9e57199fb5499b0a910c5ecda94d3ed42;hb=cb6fe34871089613c9f47e173b38fc679cd8e45b;hp=ab12fc326569d45f164c4f7d4e6ca2863e4886a0;hpb=2a779ce18b93a1f57057dcd7921d6c50cb5bea32;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/g_triggers.qc b/qcsrc/server/g_triggers.qc index ab12fc326..12c75ae9e 100644 --- a/qcsrc/server/g_triggers.qc +++ b/qcsrc/server/g_triggers.qc @@ -66,7 +66,7 @@ void SUB_UseTargets() if(clienttype(activator) == CLIENTTYPE_REAL) { centerprint (activator, self.message); - if (!self.noise) + if (self.noise == "") play2(activator, "misc/talk.wav"); } } @@ -192,7 +192,7 @@ void multi_trigger() else { // we can't just remove (self) here, because this is a touch function // called wheil C code is looping through area links... - self.touch = SUB_Null; + self.touch = func_null; } } @@ -254,7 +254,8 @@ void multi_reset() self.takedamage = DAMAGE_YES; self.solid = SOLID_BBOX; } - self.think = SUB_Null; + self.think = func_null; + self.nextthink = 0; self.team = self.team_saved; } @@ -359,7 +360,8 @@ void delay_use() void delay_reset() { - self.think = SUB_Null; + self.think = func_null; + self.nextthink = 0; } void spawnfunc_trigger_delay() @@ -474,17 +476,6 @@ void trigger_hurt_touch() Damage(other, self, self, self.dmg, DEATH_HURTTRIGGER, other.origin, '0 0 0'); } } - else - { - if (!other.owner) - { - if (other.classname == "rune") // reset runes - { - EXACTTRIGGER_TOUCH; - other.nextthink = min(other.nextthink, time + 1); - } - } - } return; } @@ -506,9 +497,9 @@ void spawnfunc_trigger_hurt() self.enemy = world; // I hate you all if (!self.dmg) self.dmg = 1000; - if (!self.message) + if (self.message == "") self.message = "was in the wrong place"; - if (!self.message2) + if (self.message2 == "") self.message2 = "was thrown into a world of hurt by"; // self.message = "someone like %s always gets wrongplaced"; @@ -548,6 +539,7 @@ void trigger_heal_touch() if (other.iscreature) { if (other.takedamage) + if (!other.deadflag) if (other.triggerhealtime < time) { EXACTTRIGGER_TOUCH; @@ -1336,9 +1328,9 @@ void spawnfunc_misc_laser() if(self.colormod == '0 0 0') if(!self.alpha) self.colormod = '1 0 0'; - if(!self.message) + if(self.message == "") self.message = "saw the light"; - if (!self.message2) + if (self.message2 == "") self.message2 = "was pushed into a laser by"; if(!self.scale) self.scale = 1; @@ -1393,6 +1385,8 @@ void trigger_impulse_touch1() return; } + str = min(self.radius, vlen(self.origin - other.origin)); + if(self.falloff == 1) str = (str / self.radius) * self.strength; else if(self.falloff == 2)