From: Samual Date: Sun, 14 Aug 2011 22:28:31 +0000 (-0400) Subject: Merge remote branch 'origin/master' into samual/flyingspectators X-Git-Tag: xonotic-v0.5.0~109^2~7 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=6d6a01255c7a5c146bbeb3daae6f527dd40f98d4;p=xonotic%2Fxonotic-data.pk3dir.git Merge remote branch 'origin/master' into samual/flyingspectators Conflicts: qcsrc/server/t_teleporters.qc qcsrc/warpzonelib/server.qc --- 6d6a01255c7a5c146bbeb3daae6f527dd40f98d4 diff --cc qcsrc/server/t_teleporters.qc index 87475df39,0adbd5196..e069aec9f --- a/qcsrc/server/t_teleporters.qc +++ b/qcsrc/server/t_teleporters.qc @@@ -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) diff --cc qcsrc/warpzonelib/server.qc index f6354a84e,4d44fe84e..fd23bb854 --- a/qcsrc/warpzonelib/server.qc +++ b/qcsrc/warpzonelib/server.qc @@@ -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;