// common team values
set g_tdm 0 "Team Deathmatch: the team who kills their opponents most often wins"
-seta teamplay_default 4 "default teamplay setting in team games. 1 = no friendly fire, self damage. 2 = friendly fire and self damage enabled. 3 = no friendly fire, but self damage enabled. 4 = obey the following four cvars"
+seta teamplay_mode 4 "default teamplay setting in team games. 1 = no friendly fire, self damage. 2 = friendly fire and self damage enabled. 3 = no friendly fire, but self damage enabled. 4 = obey the following four cvars"
seta g_mirrordamage 0.300000 "for teamplay 4: mirror damage factor"
seta g_friendlyfire 0.100000 "for teamplay 4: fiendly fire factor"
seta g_teamdamage_threshold 50 "for teamplay 4: threshold over which to apply mirror damage"
ColorTranslateMode = cvar("cl_stripcolorcodes");
activeweapon = getstati(STAT_SWITCHWEAPON);
- f = cvar("teamplay");
+ f = (serverflags & SERVERFLAG_TEAMPLAY);
if(f != teamplay)
{
teamplay = f;
float HUD_MENU_ENABLE = 0;
#define SERVERFLAG_ALLOW_FULLBRIGHT 1
+#define SERVERFLAG_TEAMPLAY 2
float autocvar_sv_cheats;
float autocvar_g_bastet;
-float autocvar_teamplay;
+float autocvar_teamplay_mode;
var float autocvar_g_movement_highspeed = 1;
// get other cvars from player
GetCvars(0);
- // set cvar for team scoreboard
- stuffcmd(self, strcat("set teamplay ", ftos(autocvar_teamplay), "\n"));
-
// notify about available teams
if(teams_matter)
{
return;
}
- //if(!cvar("teamplay"))
- // cvar_set("teamplay", "3");
-
// link flag into ctf_worldflaglist
self.ctf_worldflagnext = ctf_worldflaglist;
ctf_worldflaglist = self;
remove(self);
return;
}
- //if(!cvar("teamplay"))
- // cvar_set("teamplay", "3");
// link flag into ctf_worldflaglist
self.ctf_worldflagnext = ctf_worldflaglist;
precache_model("models/domination/dom_unclaimed.md3");
precache_sound("domination/claim.wav");
InitializeEntity(world, dom_delayedinit, INITPRIO_GAMETYPE);
-
- // teamplay is always on in domination, defaults to hurt self but not teammates
- //if(!teams_matter)
- // cvar_set("teamplay", "3");
};
damage = 0;
force = '0 0 0';
}
- else if(attacker.team == targ.team)
+ else if(teams_matter && attacker.team == targ.team)
{
- if(autocvar_teamplay == 1)
+ if(autocvar_teamplay_mode == 1)
damage = 0;
else if(attacker != targ)
{
- if(autocvar_teamplay == 3)
+ if(autocvar_teamplay_mode == 3)
damage = 0;
- else if(autocvar_teamplay == 4)
+ else if(autocvar_teamplay_mode == 4)
{
if(targ.classname == "player" && targ.deadflag == DEAD_NO)
{
if(cvar("g_vampire"))
MUTATOR_ADD(mutator_vampire);
- serverflags = 0;
if(cvar("sv_allow_fullbright"))
serverflags |= SERVERFLAG_ALLOW_FULLBRIGHT;
void(string m) setdm =
{
- dmmessage = m;
- if (cvar("deathmatch") != stof(m))
- cvar_set("deathmatch", m);
+ error("THIS MUST NOT BE CALLED IN XONOTIC");
}
void(string m) setteamplay =
{
- dmmessage = m;
- if (cvar("teamplay") != stof(m))
- cvar_set("teamplay", m);
+ error("THIS MUST NOT BE CALLED IN XONOTIC");
}
void() mode_updatecvars =
{
- local float dm, tp;
- dm = cvar("deathmatch");
- tp = cvar("teamplay");
- // now set deathmatch cvar
- if (dm == 0) setdm("0?Dark Places - Coop");
- else if (dm == 1) setdm("1?Dark Places - Deathmatch");
- else if (dm == 2) setdm("2?Dark Places - Deathmatch 2 (can only pickup gun once)");
- else if (dm == 3) setdm("3?Dark Places - Deathmatch 3 (quick ammo respawn)");
- else if (dm == 5) setdm("5?Dark Places - Frag Fest (spawn with full pack)");
-// else if (dm == 6) setdm("6?Dark Places - Random Weapons (spawn with 2 random weapons)"); // removed
- else if (dm == 7) setdm("7?Dark Places - Monsters");
-// else if (dm == 8) setdm("8?Dark Places - Elimination");
-// else if (dm == 9) setdm("9?Dark Places - Kill The Leader Mode");
- else if (dm == 10) setdm("10?Dark Places - Capture The Flag - 2 Team");
- else if (dm == 11) setdm("11?Dark Places - Capture The Flag - 3 Team");
- else if (dm == 12) setdm("12?Dark Places - Domination");
- else if (dm == 13) setdm("13?Dark Places - Monster Capture The Flag - 2 Team");
- else if (dm == 14) setdm("14?Dark Places - Super Domination");
- else if (dm == 30) setdm("30?Dark Places - Role Playing Game");
- else setdm("1?Dark Places - Deathmatch");
-
- // now set teamplay cvar
- if (dm == 0) setteamplay("4?Dark Places - Coop (Can't hurt other players)");
- //else if (dm == 8) setteamplay("3?Dark Places - Elimination");
- //else if (dm == 9) setteamplay("3?Dark Places - Kill The Leader");
- else if (dm == 10) setteamplay("3?Dark Places - Capture The Flag - 2 Team");
- else if (dm == 11) setteamplay("3?Dark Places - Capture The Flag - 3 Team");
- else if (dm == 12) setteamplay("3?Dark Places - Domination");
- else if (dm == 13) setteamplay("3?Dark Places - Monster Capture The Flag - 2 Team");
- else
- {
- if (tp == 0) setteamplay("0?Dark Places - No Teamplay");
- else if (tp == 1) setteamplay("1?Dark Places - No team damage");
- else if (tp == 2) setteamplay("2?Dark Places - Can hurt anyone");
- else if (tp == 3) setteamplay("3?Dark Places - No team damage, but can hurt self");
- else setteamplay("0?Dark Places - No Teamplay");
- }
+ error("THIS MUST NOT BE CALLED IN XONOTIC");
};
float nextcvarupdate;
if (timeoutStatus == 1) // just before the timeout (when timeoutStatus will be 2)
orig_slowmo = cvar("slowmo"); // slowmo will be restored after the timeout
- if(teams_matter && !autocvar_teamplay)
- cvar_set("teamplay", "3"); // this also updates the autocvar
- if(!teams_matter && autocvar_teamplay)
- cvar_set("teamplay", "0"); // this also updates the autocvar
-
skill = cvar("skill");
Spawnqueue_Check();
{
float teamplay_default;
- teamplay_default = cvar_or("teamplay_default", 3);
- cvar_set("teamplay", teamplay_default);
-
+ serverflags |= SERVERFLAG_TEAMPLAY;
teams_matter = 1;
}
VoteReset();
teams_matter = 0;
- cvar_set("teamplay", "0");
// make sure only ONE type is selected
ReadGameCvars();
if not (self.tur_active)
return;
- if (autocvar_teamplay != 0)
+ if (teams_matter)
if (self.team == attacker.team)
{
// This does not happen anymore. Re-enable if you fix that.
}
float desirabledamage;
desirabledamage = enemydamage;
- if (autocvar_teamplay != 1 && time > self.invincible_finished && time > self.spawnshieldtime)
+ if (time > self.invincible_finished && time > self.spawnshieldtime)
desirabledamage = desirabledamage - selfdamage * cvar("g_balance_selfdamagepercent");
- if (self.team && autocvar_teamplay != 1)
+ if (teams_matter && self.team)
desirabledamage = desirabledamage - teamdamage;
mine = find(world, classname, "mine");
}
local float desirabledamage;
desirabledamage = enemydamage;
- if (autocvar_teamplay != 1 && time > self.invincible_finished && time > self.spawnshieldtime)
+ if (time > self.invincible_finished && time > self.spawnshieldtime)
desirabledamage = desirabledamage - selfdamage * cvar("g_balance_selfdamagepercent");
- if (self.team && autocvar_teamplay != 1)
+ if (teams_matter && self.team)
desirabledamage = desirabledamage - teamdamage;
missile = find(world, classname, "rocket");