server side option for both (old) or individually silent or particleless (re)spawning
See merge request xonotic/xonotic-data.pk3dir!1218
{
this.origin = ReadVector();
+ int particlesAndOrSound = ReadByte();
+
if(is_new)
{
float teamnum = entcs_GetTeam(entnum - 1);
- if(autocvar_cl_spawn_event_particles)
+ if(autocvar_cl_spawn_event_particles && (particlesAndOrSound & BIT(0)))
{
switch(teamnum)
{
default: pointparticles(EFFECT_SPAWN_NEUTRAL, this.origin, '0 0 0', 1); break;
}
}
- if(autocvar_cl_spawn_event_sound)
+
+ if(autocvar_cl_spawn_event_sound && (particlesAndOrSound & BIT(1)))
{
sound(this, CH_TRIGGER, SND_SPAWN, VOL_BASE, ATTEN_NORM);
}
{
WriteByte(MSG_ENTITY, etof(this.owner));
WriteVector(MSG_ENTITY, this.owner.origin);
+ WriteByte(MSG_ENTITY, autocvar_g_spawn_alloweffects);
send = true;
}
else if((to == this.owner) || (IS_SPEC(to) && (to.enemy == this.owner)) )
#pragma once
-bool autocvar_g_spawn_alloweffects;
+int autocvar_g_spawn_alloweffects;
float autocvar_g_spawn_furthest;
bool autocvar_g_spawn_useallspawns;
bool autocvar_g_spawnpoints_auto_move_out_of_solid;
seta cl_weapon_switch_reload 1 "When trying to switch to the currently held weapon, reload it"
seta cl_weapon_switch_fallback_to_impulse 1 "When trying to switch to a weapon that is not available, switch to an alternative from the same impulse"
-seta cl_spawn_event_particles 1 "pointparticles effect whenever a player spawns"
-seta cl_spawn_event_sound 1 "sound effect whenever a player spawns"
+seta cl_spawn_event_particles 1 "pointparticles effect whenever a player spawns (if allowed by the server)"
+seta cl_spawn_event_sound 1 "sound effect whenever a player spawns (if allowed by the server)"
//seta cl_spawn_point_model 0 "place a model at all spawn points" // still needs a model
seta cl_spawn_point_particles 1 "pointparticles effect at all spawn points" // managed by effects-.cfg files
seta cl_spawn_point_dist_max 1200 "maximum distance from which spawnpoint particles will be visible"
set g_playerclip_collisions 1 "0 = disable collision testing against playerclips, might be useful on some defrag maps"
set g_botclip_collisions 1 "0 = disable collision testing against botclips, might be useful on some defrag maps"
-set g_spawn_alloweffects 1 "allow clients to enable spawn point and event effects such as particles and sounds, see cl_spawn_ cvars for more info"
+set g_spawn_alloweffects 3 "allow clients to enable spawn point and event effects such as particles and sounds (1 for particles only, 2 for sound only, 3 for both), see cl_spawn_ cvars for more info"
+
set g_spawn_furthest 0.5 "this amount of the spawns shall be far away from any players"
set g_spawn_useallspawns 0 "use all spawns, e.g. also team spawns in non-teamplay, and all spawns, even enemy spawns, in teamplay"
// respawn delay