X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fspawnpoints.qc;h=3f4e72c3b3f584b67c0cc4de06f9f033d568f6db;hb=bb450e879647c09efd145e95637ee17508d1d1cb;hp=7d402ad838578300ac8e47fd2e1f628086615d3a;hpb=291008378675a3fb2bedd0f6383998d1b41aa216;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/spawnpoints.qc b/qcsrc/server/spawnpoints.qc index 7d402ad83..3f4e72c3b 100644 --- a/qcsrc/server/spawnpoints.qc +++ b/qcsrc/server/spawnpoints.qc @@ -13,7 +13,7 @@ float SpawnPoint_Send(entity to, float sf) float SpawnEvent_Send(entity to, float sf) { float send; - + WriteByte(MSG_ENTITY, ENT_CLIENT_SPAWNEVENT); if(autocvar_g_spawn_alloweffects) @@ -100,7 +100,34 @@ void relocate_spawnpoint() e.solid = SOLID_TRIGGER; } - Net_LinkEntity(self, FALSE, 0, SpawnPoint_Send); + // Don't show team spawns in non-team matches, + // and don't show non-team spawns in team matches. + // (Unless useallspawns is activated) + if( + !( + ( // if this passes, there is a DM spawn on a team match + teamplay + && (self.team != NUM_TEAM_1) + && (self.team != NUM_TEAM_2) + && (self.team != NUM_TEAM_3) + && (self.team != NUM_TEAM_4) + ) + || + ( // if this passes, there is a team spawn on a DM match + !teamplay + && + ( + (self.team == NUM_TEAM_1) + || (self.team == NUM_TEAM_2) + || (self.team == NUM_TEAM_3) + || (self.team == NUM_TEAM_4) + ) + ) + ) + || + autocvar_g_spawn_useallspawns + ) + { Net_LinkEntity(self, FALSE, 0, SpawnPoint_Send); } } void spawnfunc_info_player_survivor (void) @@ -291,12 +318,7 @@ entity SelectSpawnPoint (float anypoint) } else { - float mindist; - if(g_arena && arena_roundbased) - mindist = 800; - else - mindist = 100; - firstspot = Spawn_FilterOutBadSpots(firstspot, mindist, teamcheck); + firstspot = Spawn_FilterOutBadSpots(firstspot, 100, teamcheck); // there is 50/50 chance of choosing a random spot or the furthest spot // (this means that roughly every other spawn will be furthest, so you