From: Rudolf Polzer Date: Sun, 12 Jun 2011 13:40:16 +0000 (+0200) Subject: rename teams_matter to teamplay everywhere X-Git-Tag: xonotic-v0.5.0~211^2~1 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=5c0f2bd0a4c9bf64df16b933740a6be426bf3c99;p=xonotic%2Fxonotic-data.pk3dir.git rename teams_matter to teamplay everywhere this makes the code less confusing --- diff --git a/qcsrc/server/bot/aim.qc b/qcsrc/server/bot/aim.qc index 9ef109e2b..9300ac721 100644 --- a/qcsrc/server/bot/aim.qc +++ b/qcsrc/server/bot/aim.qc @@ -104,7 +104,7 @@ float bot_shouldattack(entity e) { if (e == self) return FALSE; - if (teams_matter) + if (teamplay) if (e.team != 0) return FALSE; } @@ -113,7 +113,7 @@ float bot_shouldattack(entity e) if(e.freezetag_frozen) return FALSE; - if(teams_matter) + if(teamplay) { if(e.team==0) return FALSE; diff --git a/qcsrc/server/bot/bot.qc b/qcsrc/server/bot/bot.qc index 8be71a3cf..951d4adb6 100644 --- a/qcsrc/server/bot/bot.qc +++ b/qcsrc/server/bot/bot.qc @@ -453,7 +453,7 @@ void bot_removenewest() local float besttime; local entity best, head; - if(teams_matter) + if(teamplay) { bot_removefromlargestteam(); return; @@ -567,7 +567,7 @@ void bot_serverframe() // But don't remove bots immediately on level change, as the real players // usually haven't rejoined yet bots_would_leave = FALSE; - if (teams_matter && autocvar_bot_vs_human && (c3==-1 && c4==-1)) + if (teamplay && autocvar_bot_vs_human && (c3==-1 && c4==-1)) bots = min(ceil(fabs(autocvar_bot_vs_human) * activerealplayers), maxclients - realplayers); else if ((realplayers || autocvar_bot_join_empty || (currentbots > 0 && time < 5))) { diff --git a/qcsrc/server/bot/havocbot/role_ctf.qc b/qcsrc/server/bot/havocbot/role_ctf.qc index 0ec0abb3c..201e6982a 100644 --- a/qcsrc/server/bot/havocbot/role_ctf.qc +++ b/qcsrc/server/bot/havocbot/role_ctf.qc @@ -57,7 +57,7 @@ entity havocbot_ctf_find_enemy_flag(entity bot) float havocbot_ctf_teamcount(entity bot, vector org, float radius) { - if not(teams_matter) + if not(teamplay) return 0; float c; diff --git a/qcsrc/server/bot/havocbot/roles.qc b/qcsrc/server/bot/havocbot/roles.qc index 514c364ac..ebd0d4e44 100644 --- a/qcsrc/server/bot/havocbot/roles.qc +++ b/qcsrc/server/bot/havocbot/roles.qc @@ -53,7 +53,7 @@ void havocbot_goalrating_items(float ratingscale, vector org, float sradius) } } - if(teams_matter) + if(teamplay) { discard = FALSE; @@ -148,7 +148,7 @@ void havocbot_goalrating_enemyplayers(float ratingscale, vector org, float sradi { local entity head; local float t, noteam, distance; - noteam = ((self.team == 0) || !teams_matter); // fteqcc sucks + noteam = ((self.team == 0) || !teamplay); // fteqcc sucks if (autocvar_bot_nofire) return; diff --git a/qcsrc/server/cl_client.qc b/qcsrc/server/cl_client.qc index c0771da99..2a22d193a 100644 --- a/qcsrc/server/cl_client.qc +++ b/qcsrc/server/cl_client.qc @@ -112,7 +112,7 @@ void spawnfunc_info_player_deathmatch (void) void spawnpoint_use() { - if(teams_matter) + if(teamplay) if(have_team_spawns > 0) { self.team = activator.team; @@ -748,7 +748,7 @@ void FixPlayermodel() if(autocvar_sv_defaultcharacter == 1) { defaultskin = 0; - if(teams_matter) + if(teamplay) { string s; s = Team_ColorNameLowerCase(self.team); @@ -804,7 +804,7 @@ void FixPlayermodel() if(chmdl || oldskin != self.skinindex) self.species = player_getspecies(); // model or skin has changed - if(!teams_matter) + if(!teamplay) if(strlen(autocvar_sv_defaultplayercolors)) if(self.clientcolors != stof(autocvar_sv_defaultplayercolors)) setcolor(self, stof(autocvar_sv_defaultplayercolors)); @@ -1422,7 +1422,7 @@ void CTS_ClientKill (entity e) // silent version of ClientKill, used when player void DoTeamChange(float destteam) { float t, c0; - if(!teams_matter) + if(!teamplay) { if(destteam >= 0) SetPlayerColors(self, destteam); @@ -1613,7 +1613,7 @@ void ClientConnect (void) else self.team_forced = 0; - if(!teams_matter) + if(!teamplay) if(self.team_forced > 0) self.team_forced = 0; @@ -1622,7 +1622,7 @@ void ClientConnect (void) if((autocvar_sv_spectate == 1 && !g_lms) || autocvar_g_campaign || self.team_forced < 0) { self.classname = "observer"; } else { - if(teams_matter) + if(teamplay) { if(autocvar_g_balance_teams || autocvar_g_balance_teams_force) { @@ -1686,7 +1686,7 @@ void ClientConnect (void) GetCvars(0); // notify about available teams - if(teams_matter) + if(teamplay) { CheckAllowedTeams(self); t = 0; if(c1 >= 0) t |= 1; if(c2 >= 0) t |= 2; if(c3 >= 0) t |= 4; if(c4 >= 0) t |= 8; @@ -1927,7 +1927,7 @@ void UpdateChatBubble() local float c; c = self.clientcolors & 15; // LordHavoc: only bothering to support white, green, red, yellow, blue - if (!teams_matter) self.colormod = '0 0 0'; + if (!teamplay) self.colormod = '0 0 0'; else if (c == 0) self.colormod = '1.00 1.00 1.00'; else if (c == 3) self.colormod = '0.10 1.73 0.10'; else if (c == 4) self.colormod = '1.73 0.10 0.10'; @@ -2432,7 +2432,7 @@ void ShowRespawnCountdown() void LeaveSpectatorMode() { if(nJoinAllowed(1)) { - if(!teams_matter || autocvar_g_campaign || autocvar_g_balance_teams || (self.wasplayer && autocvar_g_changeteam_banned) || self.team_forced > 0) { + if(!teamplay || autocvar_g_campaign || autocvar_g_balance_teams || (self.wasplayer && autocvar_g_changeteam_banned) || self.team_forced > 0) { self.classname = "player"; if(autocvar_g_campaign || autocvar_g_balance_teams || autocvar_g_balance_teams_force) diff --git a/qcsrc/server/cl_impulse.qc b/qcsrc/server/cl_impulse.qc index 39eab3c61..8ce1cec13 100644 --- a/qcsrc/server/cl_impulse.qc +++ b/qcsrc/server/cl_impulse.qc @@ -166,7 +166,7 @@ void ImpulseCommands (void) } break; case 33: - if(self.deadflag == DEAD_NO && teams_matter) + if(self.deadflag == DEAD_NO && teamplay) { wp = WaypointSprite_Attach("helpme", TRUE); if(wp) diff --git a/qcsrc/server/cl_player.qc b/qcsrc/server/cl_player.qc index 04ce7c0d3..3d098458e 100644 --- a/qcsrc/server/cl_player.qc +++ b/qcsrc/server/cl_player.qc @@ -772,7 +772,7 @@ float Say(entity source, float teamsay, entity privatesay, string msgin, float f if(source.classname != "player") colorstr = "^0"; // black for spectators - else if(teams_matter) + else if(teamplay) colorstr = Team_ColorCode(source.team); else teamsay = FALSE; @@ -1261,7 +1261,7 @@ void GlobalSound(string sample, float chan, float voicetype) break; case VOICETYPE_TEAMRADIO: FOR_EACH_REALCLIENT(msg_entity) - if(!teams_matter || msg_entity.team == self.team) + if(!teamplay || msg_entity.team == self.team) { if(msg_entity.cvar_cl_voice_directional == 1) soundto(MSG_ONE, self, chan, sample, VOL_BASEVOICE, ATTN_MIN); diff --git a/qcsrc/server/clientcommands.qc b/qcsrc/server/clientcommands.qc index f61fecf50..ac08cc916 100644 --- a/qcsrc/server/clientcommands.qc +++ b/qcsrc/server/clientcommands.qc @@ -177,7 +177,7 @@ void SV_ParseClientCommand(string s) { ClientKill_TeamChange(-2); // observe } else if(autocvar_g_campaign || autocvar_g_balance_teams || autocvar_g_balance_teams_force) { //JoinBestTeam(self, FALSE, TRUE); - } else if(teams_matter && !autocvar_sv_spectate && !(self.team_forced > 0)) { + } else if(teamplay && !autocvar_sv_spectate && !(self.team_forced > 0)) { self.classname = "observer"; stuffcmd(self,"menu_showteamselect\n"); } @@ -243,7 +243,7 @@ void SV_ParseClientCommand(string s) { } else if( cmd == "selectteam" ) { if not(self.flags & FL_CLIENT) return; - if( !teams_matter ) { + if( !teamplay ) { sprint( self, "selectteam can only be used in teamgames\n"); } else if(autocvar_g_campaign) { //JoinBestTeam(self, 0); @@ -445,7 +445,7 @@ void ReadyRestartForce() readycount = 0; Nagger_ReadyCounted(); // NOTE: this causes a resend of that entity, and will also turn off warmup state on the client - if(autocvar_teamplay_lockonrestart && teams_matter) { + if(autocvar_teamplay_lockonrestart && teamplay) { lockteams = 1; bprint("^1The teams are now locked.\n"); } diff --git a/qcsrc/server/defs.qh b/qcsrc/server/defs.qh index 3827fb433..d6140ea2a 100644 --- a/qcsrc/server/defs.qh +++ b/qcsrc/server/defs.qh @@ -348,7 +348,6 @@ void AnnounceTo(entity e, string snd); .entity jumppadsused[NUM_JUMPPADSUSED]; string gamemode_name; -float teams_matter; float startitem_failed; diff --git a/qcsrc/server/ent_cs.qc b/qcsrc/server/ent_cs.qc index 3ffcb3b38..9c4bf5975 100644 --- a/qcsrc/server/ent_cs.qc +++ b/qcsrc/server/ent_cs.qc @@ -31,7 +31,7 @@ float entcs_customize() if(other == o) return FALSE; if(other.classname == "player") - if(!teams_matter || o.team != other.team) + if(!teamplay || o.team != other.team) if not (radar_showennemies) return FALSE; return TRUE; diff --git a/qcsrc/server/g_damage.qc b/qcsrc/server/g_damage.qc index 29fc297d5..0bd7a8da8 100644 --- a/qcsrc/server/g_damage.qc +++ b/qcsrc/server/g_damage.qc @@ -61,7 +61,7 @@ float damage_headshotbonus; // bonus multiplier for head shots, set to 0 after u float IsDifferentTeam(entity a, entity b) { - if(teams_matter) + if(teamplay) { if(a.team == b.team) return 0; @@ -323,7 +323,7 @@ void Obituary (entity attacker, entity inflictor, entity targ, float deathtype) if (targ.killcount > 2) msg = ftos(targ.killcount); - if(teams_matter && deathtype == DEATH_MIRRORDAMAGE) + if(teamplay && deathtype == DEATH_MIRRORDAMAGE) { if(attacker.team == COLOR_TEAM1) deathtype = KILL_TEAM_RED; @@ -335,7 +335,7 @@ void Obituary (entity attacker, entity inflictor, entity targ, float deathtype) } else if (attacker.classname == "player" || attacker.classname == "gib") { - if(teams_matter && attacker.team == targ.team) + if(teamplay && attacker.team == targ.team) { if(attacker.team == COLOR_TEAM1) type = KILL_TEAM_RED; @@ -564,7 +564,7 @@ void Damage (entity targ, entity inflictor, entity attacker, float damage, float damage = 0; force = '0 0 0'; } - else if(teams_matter && attacker.team == targ.team) + else if(teamplay && attacker.team == targ.team) { if(autocvar_teamplay_mode == 1) damage = 0; diff --git a/qcsrc/server/g_models.qc b/qcsrc/server/g_models.qc index bc996fd32..690fd752d 100644 --- a/qcsrc/server/g_models.qc +++ b/qcsrc/server/g_models.qc @@ -2,7 +2,7 @@ void g_model_setcolormaptoactivator (void) { - if(teams_matter) + if(teamplay) { if(activator.team) self.colormap = (activator.team - 1) * 0x11; diff --git a/qcsrc/server/g_world.qc b/qcsrc/server/g_world.qc index 12a15f4f4..9a3533f4c 100644 --- a/qcsrc/server/g_world.qc +++ b/qcsrc/server/g_world.qc @@ -1490,7 +1490,7 @@ void DumpStats(float final) } } - if(teams_matter) + if(teamplay) { s = strcat(":labels:teamscores:", GetTeamScoreString(0, 0)); if(to_console) @@ -1929,7 +1929,7 @@ float WinningCondition_Scores(float limit, float leadlimit) // TODO make everything use THIS winning condition (except LMS) WinningConditionHelper(); - if(teams_matter) + if(teamplay) { team1_score = TeamScore_GetCompareValue(COLOR_TEAM1); team2_score = TeamScore_GetCompareValue(COLOR_TEAM2); diff --git a/qcsrc/server/gamecommand.qc b/qcsrc/server/gamecommand.qc index e3f9f3d97..a83be998a 100644 --- a/qcsrc/server/gamecommand.qc +++ b/qcsrc/server/gamecommand.qc @@ -840,7 +840,7 @@ void GameCommand(string command) if (argv(0) == "lockteams") { - if(teams_matter) + if(teamplay) { lockteams = 1; bprint("^1The teams are now locked.\n"); @@ -852,7 +852,7 @@ void GameCommand(string command) if (argv(0) == "unlockteams") { - if(teams_matter) + if(teamplay) { lockteams = 0; bprint("^1The teams are now unlocked.\n"); @@ -871,7 +871,7 @@ void GameCommand(string command) // 2 (10) no centerprint, admin message // 3 (11) no centerprint, no admin message - if(!teams_matter) { // death match + if(!teamplay) { // death match print("Currently not playing a team game\n"); return; } diff --git a/qcsrc/server/miscfunctions.qc b/qcsrc/server/miscfunctions.qc index 8d4569714..c16608821 100644 --- a/qcsrc/server/miscfunctions.qc +++ b/qcsrc/server/miscfunctions.qc @@ -762,7 +762,7 @@ void centerprint(entity e, string s) string playername(entity p) { string t; - if (teams_matter && !intermission_running && p.classname == "player") + if (teamplay && !intermission_running && p.classname == "player") { t = Team_ColorCode(p.team); return strcat(t, strdecolorize(p.netname)); diff --git a/qcsrc/server/playerstats.qc b/qcsrc/server/playerstats.qc index 46490a1b6..ea6956f79 100644 --- a/qcsrc/server/playerstats.qc +++ b/qcsrc/server/playerstats.qc @@ -234,7 +234,7 @@ void PlayerStats_Shutdown() nn = db_get(playerstats_db, sprintf("%s:_netname", p)); if(nn != "") bufstr_set(b, i++, sprintf("n %s", nn)); - if(teams_matter) + if(teamplay) { tt = db_get(playerstats_db, sprintf("%s:_team", p)); bufstr_set(b, i++, sprintf("t %s", tt)); @@ -288,7 +288,7 @@ void PlayerStats_AddGlobalInfo(entity p) if(p.cvar_cl_allow_uid2name == 1 || clienttype(p) == CLIENTTYPE_BOT) db_put(playerstats_db, sprintf("%s:_netname", p.playerstats_id), p.netname); - if(teams_matter) + if(teamplay) db_put(playerstats_db, sprintf("%s:_team", p.playerstats_id), ftos(p.team)); if(p.alivetime > 0) diff --git a/qcsrc/server/scores_rules.qc b/qcsrc/server/scores_rules.qc index 2e75fefb9..030a26d9c 100644 --- a/qcsrc/server/scores_rules.qc +++ b/qcsrc/server/scores_rules.qc @@ -34,7 +34,7 @@ void ScoreRules_basics_end() } void ScoreRules_generic() { - if(teams_matter) + if(teamplay) { CheckAllowedTeams(world); ScoreRules_basics(((c4>=0) ? 4 : (c3>=0) ? 3 : 2), SFL_SORT_PRIO_PRIMARY, SFL_SORT_PRIO_PRIMARY, TRUE); diff --git a/qcsrc/server/sv_main.qc b/qcsrc/server/sv_main.qc index 68a86e9c4..8cf78cc79 100644 --- a/qcsrc/server/sv_main.qc +++ b/qcsrc/server/sv_main.qc @@ -236,7 +236,7 @@ float DoesQ3ARemoveThisEntity(); void SV_OnEntityPreSpawnFunction() { if(self.gametypefilter != "") - if not(isGametypeInFilter(game, teams_matter, have_team_spawns, self.gametypefilter)) + if not(isGametypeInFilter(game, teamplay, have_team_spawns, self.gametypefilter)) { remove(self); return; diff --git a/qcsrc/server/t_jumppads.qc b/qcsrc/server/t_jumppads.qc index 1e72b765a..4712d5929 100644 --- a/qcsrc/server/t_jumppads.qc +++ b/qcsrc/server/t_jumppads.qc @@ -10,7 +10,7 @@ float trigger_push_calculatevelocity_flighttime; void trigger_push_use() { - if(teams_matter) + if(teamplay) self.team = activator.team; } diff --git a/qcsrc/server/t_quake3.qc b/qcsrc/server/t_quake3.qc index f2a1138d8..45ab457f2 100644 --- a/qcsrc/server/t_quake3.qc +++ b/qcsrc/server/t_quake3.qc @@ -142,11 +142,11 @@ float DoesQ3ARemoveThisEntity() // Q3 style filters (DO NOT USE, THIS IS COMPAT ONLY) if(self.notq3a) - if(!teams_matter || g_tdm || g_ctf) + if(!teamplay || g_tdm || g_ctf) return 1; if(self.notta) - if not(!teams_matter || g_tdm || g_ctf) + if not(!teamplay || g_tdm || g_ctf) return 1; if(self.notsingle) @@ -154,11 +154,11 @@ float DoesQ3ARemoveThisEntity() return 1; if(self.notteam) - if(teams_matter) + if(teamplay) return 1; if(self.notfree) - if(!teams_matter) + if(!teamplay) return 1; if(self.gametype) @@ -166,7 +166,7 @@ float DoesQ3ARemoveThisEntity() string gametypename; // static char *gametypeNames[] = {"ffa", "tournament", "single", "team", "ctf", "oneflag", "obelisk", "harvester", "teamtournament"}; gametypename = "ffa"; - if(teams_matter) + if(teamplay) gametypename = "team"; if(g_arena) gametypename = "tournament"; diff --git a/qcsrc/server/t_teleporters.qc b/qcsrc/server/t_teleporters.qc index 2e64eadd7..fbb803294 100644 --- a/qcsrc/server/t_teleporters.qc +++ b/qcsrc/server/t_teleporters.qc @@ -1,6 +1,6 @@ void trigger_teleport_use() { - if(teams_matter) + if(teamplay) self.team = activator.team; } @@ -33,7 +33,7 @@ float check_tdeath(entity player, vector org, vector telefragmin, vector telefra { TDEATHLOOP(org) { - if not(teams_matter && autocvar_g_telefrags_teamplay && head.team == player.team) + if not(teamplay && autocvar_g_telefrags_teamplay && head.team == player.team) if(head.classname == "player") if(head.health >= 1) return 1; @@ -48,7 +48,7 @@ void tdeath(entity player, entity teleporter, entity telefragger, vector telefra { if (player.classname == "player" && player.health >= 1) { - if not(teams_matter && autocvar_g_telefrags_teamplay && head.team == player.team) + if not(teamplay && autocvar_g_telefrags_teamplay && head.team == player.team) { if(head.classname == "player") if(head.health >= 1) diff --git a/qcsrc/server/teamplay.qc b/qcsrc/server/teamplay.qc index f9321b8db..ab8eee075 100644 --- a/qcsrc/server/teamplay.qc +++ b/qcsrc/server/teamplay.qc @@ -12,7 +12,7 @@ float IsTeamBalanceForced() { if(intermission_running) return 0; // no rebalancing whatsoever please - if(!teams_matter) + if(!teamplay) return 0; if(autocvar_g_campaign) return 0; @@ -149,7 +149,7 @@ void ReadGameCvars() g_tdm = 1; } - teams_matter = 0; + teamplay = 0; serverflags &~= SERVERFLAG_TEAMPLAY; } @@ -162,7 +162,7 @@ void default_delayedinit() void ActivateTeamplay() { serverflags |= SERVERFLAG_TEAMPLAY; - teams_matter = 1; + teamplay = 1; } void InitGameplayMode() @@ -382,7 +382,7 @@ void InitGameplayMode() MUTATOR_ADD(gamemode_keepaway); } - if(teams_matter) + if(teamplay) entcs_init(); // save it (for the next startup) @@ -586,7 +586,7 @@ void SetPlayerColors(entity pl, float _color) shirt = _color & 0xF0; - if(teams_matter) { + if(teamplay) { setcolor(pl, 16*pants + pants); } else { setcolor(pl, shirt + pants); @@ -903,7 +903,7 @@ float JoinBestTeam(entity pl, float only_return_best, float forcebestteam) float smallest, selectedteam; // don't join a team if we're not playing a team game - if(!teams_matter) + if(!teamplay) return 0; // find out what teams are available @@ -980,7 +980,7 @@ void SV_ChangeTeam(float _color) float scolor, dcolor, steam, dteam, dbotcount, scount, dcount; // in normal deathmatch we can just apply the color and we're done - if(!teams_matter) { + if(!teamplay) { SetPlayerColors(self, _color); return; } diff --git a/qcsrc/server/tturrets/system/system_damage.qc b/qcsrc/server/tturrets/system/system_damage.qc index c7f25a446..a1a2ed88d 100644 --- a/qcsrc/server/tturrets/system/system_damage.qc +++ b/qcsrc/server/tturrets/system/system_damage.qc @@ -269,7 +269,7 @@ void turret_stdproc_damage (entity inflictor, entity attacker, float damage, flo if not (self.tur_active) return; - if (teams_matter) + if (teamplay) if (self.team == attacker.team) { // This does not happen anymore. Re-enable if you fix that. diff --git a/qcsrc/server/tturrets/system/system_main.qc b/qcsrc/server/tturrets/system/system_main.qc index 7d023e99e..9536064df 100644 --- a/qcsrc/server/tturrets/system/system_main.qc +++ b/qcsrc/server/tturrets/system/system_main.qc @@ -609,7 +609,7 @@ void turret_think() self.nextthink = time + self.ticrate; // ONS uses somewhat backwards linking. - if (teams_matter) + if (teamplay) { if not (g_onslaught) if (self.target) @@ -924,7 +924,7 @@ float turret_stdproc_init (string cvar_base_name, float csqc_shared, string base if not (self.team) self.team = 14; // Assume turrets are on the defending side if not explicitly set otehrwize } - else if not (teams_matter) + else if not (teamplay) self.team = MAX_SHOT_DISTANCE; // Group all turrets into the same team, so they dont kill eachother. else if(g_onslaught && self.targetname) { diff --git a/qcsrc/server/vehicles/raptor.qc b/qcsrc/server/vehicles/raptor.qc index 38ebad042..6ed8ca815 100644 --- a/qcsrc/server/vehicles/raptor.qc +++ b/qcsrc/server/vehicles/raptor.qc @@ -295,7 +295,7 @@ void raptor_enter() if (clienttype(other) != CLIENTTYPE_REAL) return; - if(teams_matter) + if(teamplay) if(self.team) if(self.team != other.team) return; diff --git a/qcsrc/server/vehicles/spiderbot.qc b/qcsrc/server/vehicles/spiderbot.qc index 6743f73d2..08b945991 100644 --- a/qcsrc/server/vehicles/spiderbot.qc +++ b/qcsrc/server/vehicles/spiderbot.qc @@ -430,7 +430,7 @@ void spiderbot_enter() self.colormod = self.tur_head.colormod = '0 0 0'; - if(teams_matter) + if(teamplay) if(self.team) if(self.team != other.team) return; @@ -533,7 +533,7 @@ void spiderbot_exit(float eject) self.colormap = 1024; self.tur_head.colormap = 1024; - if not (teams_matter) + if not (teamplay) self.team = 0; else { @@ -697,7 +697,7 @@ void vewhicle_spiderbot_dinit() tracebox(self.origin + '0 0 100', spiderbot_MIN, spiderbot_MAX, self.origin - '0 0 10000', MOVE_WORLDONLY, self); setorigin(self.spiderbot_spawnpnt,trace_endpos); - if(self.team && !teams_matter) + if(self.team && !teamplay) self.team = 0; else self.spiderbot_spawnpnt.team = self.team; diff --git a/qcsrc/server/w_minelayer.qc b/qcsrc/server/w_minelayer.qc index 22d43e1e3..ae8db2fed 100644 --- a/qcsrc/server/w_minelayer.qc +++ b/qcsrc/server/w_minelayer.qc @@ -356,7 +356,7 @@ float w_minelayer(float req) // count potential damage according to type of target if (targ == self) selfdamage = selfdamage + d; - else if (targ.team == self.team && teams_matter) + else if (targ.team == self.team && teamplay) teamdamage = teamdamage + d; else if (bot_shouldattack(targ)) enemydamage = enemydamage + d; @@ -368,7 +368,7 @@ float w_minelayer(float req) desirabledamage = enemydamage; if (time > self.invincible_finished && time > self.spawnshieldtime) desirabledamage = desirabledamage - selfdamage * autocvar_g_balance_selfdamagepercent; - if (teams_matter && self.team) + if (teamplay && self.team) desirabledamage = desirabledamage - teamdamage; mine = find(world, classname, "mine"); diff --git a/qcsrc/server/w_minstanex.qc b/qcsrc/server/w_minstanex.qc index 4481178de..7ea3fe851 100644 --- a/qcsrc/server/w_minstanex.qc +++ b/qcsrc/server/w_minstanex.qc @@ -43,7 +43,7 @@ void W_MinstaNex_Attack (void) // teamcolor / hit beam effect vector v; v = WarpZone_UnTransformOrigin(WarpZone_trace_transform, trace_endpos); - if(teams_matter) + if(teamplay) { switch(self.team) { diff --git a/qcsrc/server/w_rocketlauncher.qc b/qcsrc/server/w_rocketlauncher.qc index 23ebee65d..d65c4bc38 100644 --- a/qcsrc/server/w_rocketlauncher.qc +++ b/qcsrc/server/w_rocketlauncher.qc @@ -341,7 +341,7 @@ float w_rlauncher(float req) // count potential damage according to type of target if (targ == self) selfdamage = selfdamage + d; - else if (targ.team == self.team && teams_matter) + else if (targ.team == self.team && teamplay) teamdamage = teamdamage + d; else if (bot_shouldattack(targ)) enemydamage = enemydamage + d; @@ -353,7 +353,7 @@ float w_rlauncher(float req) desirabledamage = enemydamage; if (time > self.invincible_finished && time > self.spawnshieldtime) desirabledamage = desirabledamage - selfdamage * autocvar_g_balance_selfdamagepercent; - if (teams_matter && self.team) + if (teamplay && self.team) desirabledamage = desirabledamage - teamdamage; missile = find(world, classname, "rocket"); diff --git a/qcsrc/server/w_tuba.qc b/qcsrc/server/w_tuba.qc index 4a7978808..f49f6324b 100644 --- a/qcsrc/server/w_tuba.qc +++ b/qcsrc/server/w_tuba.qc @@ -48,7 +48,7 @@ float Tuba_GetNote(entity pl, float hittype) // kind of tuba currently is player slot number, or team number if in // teamplay // that way, holes in the range of notes are "plugged" - if(teams_matter) + if(teamplay) { if(pl.team == COLOR_TEAM2 || pl.team == COLOR_TEAM4) note += 3; diff --git a/qcsrc/server/waypointsprites.qc b/qcsrc/server/waypointsprites.qc index bda0e77b8..24fdcb336 100644 --- a/qcsrc/server/waypointsprites.qc +++ b/qcsrc/server/waypointsprites.qc @@ -355,7 +355,7 @@ entity WaypointSprite_DeployFixed( ) { float t, maxdistance; - if(teams_matter) + if(teamplay) t = self.team; else t = 0; @@ -385,7 +385,7 @@ entity WaypointSprite_Attach( float t, maxdistance; if(self.waypointsprite_attachedforcarrier) return world; // can't attach to FC - if(teams_matter) + if(teamplay) t = self.team; else t = 0;