]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/g_triggers.qc
Merge branch 'master' into tzork/ents-onoff
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / g_triggers.qc
index c31352ed5dec0e3f517d30198211d143db2cdcba..cecca06d2e030fe96375326099fdedb9f3948472 100644 (file)
@@ -462,6 +462,7 @@ void spawnfunc_trigger_hurt()
                self.message = "was in the wrong place";
        if (!self.message2)
                self.message2 = "was thrown into a world of hurt by";
+       // self.message = "someone like %s always gets wrongplaced";
 
        if(!trigger_hurt_first)
                trigger_hurt_first = self;
@@ -818,7 +819,7 @@ void spawnfunc_func_pointparticles()
        if(!self.cnt)
                self.cnt = particleeffectnum(self.mdl);
 
-       Net_LinkEntity(self, FALSE, 0, pointparticles_SendEntity);
+       Net_LinkEntity(self, (self.spawnflags & 4), 0, pointparticles_SendEntity);
 
        IFTARGETED
        {
@@ -1931,3 +1932,46 @@ void spawnfunc_trigger_magicear()
        // target:
        //   what to trigger
 }
+
+void relay_activateors_use()
+{
+       entity trg, os;
+       
+       os = self;
+       
+       for(trg = world; (trg = find(trg, targetname, os.target)); )
+       {
+               self = trg;
+               if (trg.setactive)
+                       trg.setactive(os.cnt);
+               else
+               {
+                       if(os.cnt == ACTIVE_TOGGLE)
+                               if(trg.active)
+                                       trg.active = ACTIVE_NOT;
+                               else    
+                                       trg.active = ACTIVE_ACTIVE;
+                       else
+                               trg.active = os.cnt;
+               }               
+       }
+       self = os;
+}
+
+void spawnfunc_relay_activate()
+{
+       self.cnt = ACTIVE_ACTIVE;
+       self.use = relay_activateors_use;
+}
+
+void spawnfunc_relay_deactivate()
+{
+       self.cnt = ACTIVE_NOT;
+       self.use = relay_activateors_use;       
+}
+
+void spawnfunc_relay_activatetoggle()
+{
+       self.cnt = ACTIVE_TOGGLE;
+       self.use = relay_activateors_use;       
+}