]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge remote branch 'origin/master' into samual/flyingspectators
authorSamual <samual@xonotic.org>
Sun, 14 Aug 2011 22:28:31 +0000 (18:28 -0400)
committerSamual <samual@xonotic.org>
Sun, 14 Aug 2011 22:28:31 +0000 (18:28 -0400)
Conflicts:
qcsrc/server/t_teleporters.qc
qcsrc/warpzonelib/server.qc

1  2 
defaultXonotic.cfg
qcsrc/server/cl_client.qc
qcsrc/server/cl_physics.qc
qcsrc/server/defs.qh
qcsrc/server/miscfunctions.qc
qcsrc/server/t_teleporters.qc
qcsrc/warpzonelib/server.qc

Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index 87475df39ebb3383a8e0c2121110a0c2efeca5fe,0adbd5196af1731fecf51774167e77816d161c1b..e069aec9f3d7e18c1d2f9af5cfecc21aa745cd80
@@@ -87,19 -87,16 +87,19 @@@ void TeleportPlayer(entity teleporter, 
  
        makevectors (to_angles);
  
 -      if(self.pushltime < time) // only show one teleport effect per teleporter per 0.2 seconds, for better fps
 +      if(player.classname == "player") // don't play sounds or show particles for anything that isn't a player, maybe change later to block only observers
        {
 -              if(tflags & TELEPORT_FLAG_SOUND)
 -                      sound (player, CH_TRIGGER, "misc/teleport.wav", VOL_BASE, ATTN_NORM);
 -              if(tflags & TELEPORT_FLAG_PARTICLES)
 +              if(self.pushltime < time) // only show one teleport effect per teleporter per 0.2 seconds, for better fps
                {
 -                      pointparticles(particleeffectnum("teleport"), player.origin, '0 0 0', 1);
 -                      pointparticles(particleeffectnum("teleport"), to + v_forward * 32, '0 0 0', 1);
 +                      if(tflags & TELEPORT_FLAG_SOUND)
-                               sound (player, CHAN_TRIGGER, "misc/teleport.wav", VOL_BASE, ATTN_NORM);
++                              sound (player, CH_TRIGGER, "misc/teleport.wav", VOL_BASE, ATTN_NORM);
 +                      if(tflags & TELEPORT_FLAG_PARTICLES)
 +                      {
 +                              pointparticles(particleeffectnum("teleport"), player.origin, '0 0 0', 1);
 +                              pointparticles(particleeffectnum("teleport"), to + v_forward * 32, '0 0 0', 1);
 +                      }
 +                      self.pushltime = time + 0.2;
                }
 -              self.pushltime = time + 0.2;
        }
  
        // Relocate the player
@@@ -189,9 -148,14 +189,15 @@@ void Teleport_Touch (void
        if (self.active != ACTIVE_ACTIVE)
                return;
        
+       if not(other.iscreature)
 +      if (other.deadflag != DEAD_NO)
                return;
-       if not(other.flags & FL_CLIENT) // FIXME: Make missiles firable through the teleport too
+       // for gameplay: vehicles can't teleport
+       if (other.vehicle_flags & VHF_ISVEHICLE)
+               return;
+       if (other.deadflag != DEAD_NO)
                return;
  
        if(self.team)
index f6354a84e3910b199c0235f776e333e7da40e189,4d44fe84e73327d4ff9a7762dcf35daa56ae72ad..fd23bb854efaecbd7fe20481db03b90f45e1d222
@@@ -631,48 -770,44 +770,50 @@@ void WarpZone_StartFrame(
                        WarpZone_InitStep_UpdateTransform();
                self = e;
                WarpZones_Reconnect();
+               WarpZone_PostInitialize_Callback();
        }
  
 -      if(warpzone_warpzones_exist)
 +      entity oldself, oldother;
 +      oldself = self;
 +      oldother = other;
 +      for(e = world; (e = nextent(e)); )
        {
 -              entity oldself, oldother;
 -              oldself = self;
 -              oldother = other;
 -              for(e = world; (e = nextent(e)); )
 +              if(warpzone_warpzones_exist) { WarpZone_StoreProjectileData(e); }
 +              
 +              float f = clienttype(e);
 +              if(f == CLIENTTYPE_REAL)
                {
 -                      WarpZone_StoreProjectileData(e);
 -                      float f;
 -                      f = clienttype(e);
 -                      if(f == CLIENTTYPE_REAL)
 +                      if(e.solid == SOLID_NOT) // not spectating?
 +                      if(e.movetype == MOVETYPE_NOCLIP || e.movetype == MOVETYPE_FLY) // not spectating? (this is to catch observers)
                        {
 -                              if(e.solid != SOLID_NOT) // not spectating?
 -                                      continue;
 -                              if(e.movetype != MOVETYPE_NOCLIP && e.movetype != MOVETYPE_FLY) // not spectating? (this is to catch observers)
 -                                      continue;
 -                              self = WarpZone_Find(e.origin + e.mins, e.origin + e.maxs);
 -                              if(!self)
 -                                      continue;
 -                              other = e;
 -                              if(WarpZoneLib_ExactTrigger_Touch())
 -                                      continue;
 -                              if(WarpZone_PlaneDist(self, e.origin + e.view_ofs) <= 0)
 -                                      WarpZone_Teleport(self, e, -1, 0); // NOT triggering targets by this!
 +                              other = e; // player
 +                      
 +                              // warpzones
 +                              if(warpzone_warpzones_exist) { 
 +                              self = WarpZone_Find(e.origin + e.mins, e.origin + e.maxs); 
 +                              if(self)
 +                              if(!WarpZoneLib_ExactTrigger_Touch())
-                                       WarpZone_Teleport(e); } // NOT triggering targets by this!
++                                      if(WarpZone_PlaneDist(self, e.origin + e.view_ofs) <= 0)
++                                              WarpZone_Teleport(self, e, -1, 0); } // NOT triggering targets by this!
 +                      
 +                              // teleporters
 +                              self = Teleport_Find(e.origin + e.mins, e.origin + e.maxs);
 +                              if(self)
 +                              if(!WarpZoneLib_ExactTrigger_Touch())
 +                                      Simple_TeleportPlayer(self, other); // NOT triggering targets by this!
                        }
 -                      if(f == CLIENTTYPE_NOTACLIENT)
 -                      {
 +              }
 +              
 +              if(f == CLIENTTYPE_NOTACLIENT)
 +              {
 +                      if(warpzone_warpzones_exist)
                                for(; (e = nextent(e)); )
                                        WarpZone_StoreProjectileData(e);
 -                              break;
 -                      }
 +                      break;
                }
 -              self = oldself;
 -              other = oldother;
        }
 +      self = oldself;
 +      other = oldother;
  }
  
  .float warpzone_reconnecting;