]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge branch 'master' into Mario/target_teleporter_v2
authorMario <mario@smbclan.net>
Sun, 27 Aug 2017 14:08:11 +0000 (00:08 +1000)
committerMario <mario@smbclan.net>
Sun, 27 Aug 2017 14:08:11 +0000 (00:08 +1000)
1  2 
qcsrc/common/triggers/teleporters.qc

index 169cdf0615620cd19a2aee6408b5788f69bc929d,8e9936b2ea2980586e44844ccb66b27f92801670..e1cd95058dbb7b597f174614c8b203be1674e05d
@@@ -206,7 -206,7 +206,7 @@@ entity Simple_TeleportPlayer(entity tel
  #ifdef SVQC
        if(!e) { sprint(player, "Teleport destination vanished. Sorry... please complain to the mapper.\n"); }
  #elif defined(CSQC)
-       if(!e) { LOG_INFO("Teleport destination could not be found from CSQC.\n"); }
+       if(!e) { LOG_INFO("Teleport destination could not be found from CSQC."); }
  #endif
  
        makevectors(e.mangle);
  
  void teleport_findtarget(entity this)
  {
 +      bool istrigger = (this.solid == SOLID_TRIGGER);
 +
        int n = 0;
 -      entity e;
 -      for(e = NULL; (e = find(e, targetname, this.target)); )
 +      for(entity e = NULL; (e = find(e, targetname, this.target)); )
        {
                ++n;
  #ifdef SVQC
                if(e.move_movetype == MOVETYPE_NONE)
                        waypoint_spawnforteleporter(this, e.origin, 0);
                if(e.classname != "info_teleport_destination")
-                       LOG_INFO("^3MAPPER ERROR: teleporter does target an invalid teleport destination entity. Angles will not work.\n");
+                       LOG_INFO("^3MAPPER ERROR: teleporter does target an invalid teleport destination entity. Angles will not work.");
  #endif
        }
  
        else if(n == 1)
        {
                // exactly one dest - bots love that
 -              this.enemy = find(e, targetname, this.target);
 +              this.enemy = find(NULL, targetname, this.target);
        }
        else
        {
        }
  
        // now enable touch
 -      settouch(this, Teleport_Touch);
 +      if(istrigger)
 +              settouch(this, Teleport_Touch);
  #ifdef SVQC
 -      trigger_teleport_link(this);
 +      if(istrigger)
 +              trigger_teleport_link(this);
  #endif
  }
  
@@@ -295,7 -292,7 +295,7 @@@ void WarpZone_PostTeleportPlayer_Callba
        #elif defined(CSQC)
                if(!(pl.flags & BIT(15))) // FL_PROJECTILE
        #endif
-                       LOG_INFO("A non-projectile got through a warpzone and its owner cleared. It's a ", pl.classname, ".\n");
+                       LOG_INFO("A non-projectile got through a warpzone and its owner cleared. It's a ", pl.classname, ".");
                pl.owner = NULL;
        }
        if(IS_PLAYER(pl))