// CSQC_Init : Called every time the CSQC code is initialized (essentially at map load)
// Useful for precaching things
-void CSQC_Init()
+void CSQC_Init(float apilevel, string enginename, float engineversion)
{
prvm_language = strzone(cvar_string("prvm_language"));
localcmd("\n-button12\n");
+ strfree(gametype_custom_name);
+
deactivate_minigame();
HUD_MinigameMenu_Close(NULL, NULL, NULL);
{
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);
}
{
make_pure(this);
gametype = ReadRegistered(Gametypes);
+ strcpy(gametype_custom_name, ReadString());
teamplay = _MapInfo_GetTeamPlayBool(gametype);
HUD_ModIcons_SetFunc();
FOREACH(Scores, true, {
set sv_timeout_leadtime 4 "how long the players will be informed that a timeout was called before it starts, in seconds"
set sv_timeout_resumetime 3 "how long the remaining timeout-time will be after a player called the timein command"
-set sv_autopause 1 "Single player or listen server: pause while all clients have the menu, console or chat open. Dedicated server: pause after starting a map if the server is empty and unpause when the first player joins the empty server."
+seta sv_autopause 1 "Single player or listen server: pause while all clients have the menu, console or chat open. Dedicated server: pause after starting a map if the server is empty and unpause when the first player joins the empty server."
set g_telefrags 1 "telefragging, i.e. killing someone who stands in the way of someone who is teleporting"
set g_telefrags_teamplay 1 "never telefrag team mates"
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