void Ent_ReadSpawnPoint(float is_new) // entity for spawnpoint
{
float teamnum = (ReadByte() - 1);
- self.origin_x = ReadShort();
- self.origin_y = ReadShort();
- self.origin_z = ReadShort();
+ vector spn_origin;
+ spn_origin_x = ReadShort();
+ spn_origin_y = ReadShort();
+ spn_origin_z = ReadShort();
if(is_new)
{
+ self.origin = spn_origin;
setsize(self, PL_MIN, PL_MAX);
droptofloor();
}*/
if(autocvar_cl_spawn_point_particles)
{
- switch(teamnum)
+ if(teamplay)
{
- case NUM_TEAM_1: self.cnt = particleeffectnum("spawn_point_red"); break;
- case NUM_TEAM_2: self.cnt = particleeffectnum("spawn_point_blue"); break;
- case NUM_TEAM_3: self.cnt = particleeffectnum("spawn_point_yellow"); break;
- case NUM_TEAM_4: self.cnt = particleeffectnum("spawn_point_pink"); break;
- default: self.cnt = particleeffectnum("spawn_point_neutral"); break;
+ switch(teamnum)
+ {
+ case NUM_TEAM_1: self.cnt = particleeffectnum("spawn_point_red"); break;
+ case NUM_TEAM_2: self.cnt = particleeffectnum("spawn_point_blue"); break;
+ case NUM_TEAM_3: self.cnt = particleeffectnum("spawn_point_yellow"); break;
+ case NUM_TEAM_4: self.cnt = particleeffectnum("spawn_point_pink"); break;
+ default: self.cnt = particleeffectnum("spawn_point_neutral"); break;
+ }
}
+ else { self.cnt = particleeffectnum("spawn_point_neutral"); }
+
self.draw = Spawn_Draw;
}
}
entity spawnevent = spawn();
spawnevent.owner = self;
- Net_LinkEntity(spawnevent, FALSE, 1, SpawnEvent_Send);
+ Net_LinkEntity(spawnevent, FALSE, 0.5, SpawnEvent_Send);
self.model = "";
FixPlayermodel();
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)