From 89b775fc650e3e521a8e7c6d8af47f766f77dfa1 Mon Sep 17 00:00:00 2001 From: kadaverjack Date: Mon, 12 Dec 2005 00:50:37 +0000 Subject: [PATCH] fixed various bugs with team selection and created pink dom-point git-svn-id: svn://svn.icculus.org/nexuiz/trunk@653 f962a42d-fe04-0410-a3ab-8c8b0445ebaa --- data/default.cfg | 2 +- data/maps/nexctf02.ent | 24 ++++++++--------- data/maps/nexdm02.ent | 8 +++--- data/maps/nexdm09.ent | 8 +++--- data/maps/nexdm10.ent | 8 +++--- data/maps/nexdm15.ent | 8 +++--- data/maps/nexdm16.ent | 8 +++--- data/maps/nexdm17.ent | 8 +++--- data/models/domination/dom_bomb.tga | Bin 196626 -> 2092 bytes .../{dom_green.md3 => dom_pink.md3} | Bin data/qcsrc/gamec/cl_client.c | 2 +- data/qcsrc/gamec/clientcommands.c | 4 +-- data/qcsrc/gamec/domination.c | 4 +-- data/qcsrc/gamec/teamplay.c | 25 +++++++++++++++++- data/qcsrc/progs.src | 5 ++-- 15 files changed, 68 insertions(+), 46 deletions(-) rename data/models/domination/{dom_green.md3 => dom_pink.md3} (100%) diff --git a/data/default.cfg b/data/default.cfg index 13d4e96cb..f73f71e64 100755 --- a/data/default.cfg +++ b/data/default.cfg @@ -10,7 +10,7 @@ set g_nexuizversion_major 130 // team aliases alias team_red "color 4" alias team_blue "color 13" -alias team_green "color 3" +alias team_pink "color 9" alias team_yellow "color 12" // other aliases diff --git a/data/maps/nexctf02.ent b/data/maps/nexctf02.ent index 8b5139389..92ac88634 100644 --- a/data/maps/nexctf02.ent +++ b/data/maps/nexctf02.ent @@ -791,7 +791,7 @@ { "wait" "5" "frags" "1" -"message" "^3has captured the blue Main Area" +"message" "^3 has captured the blue Main Area" "origin" "768 -256 224" "classname" "dom_controlpoint" } @@ -800,20 +800,20 @@ "frags" "1" "classname" "dom_controlpoint" "origin" "784 816 320" -"message" "^3has captured the blue Mortar Niche" +"message" "^3 has captured the blue Mortar Niche" } { "wait" "5" "frags" "1" "classname" "dom_controlpoint" "origin" "-1056 -208 208" -"message" "^3has captured the blue Rocket Launcher/Teleporter" +"message" "^3 has captured the blue Rocket Launcher/Teleporter" } { "wait" "5" "scale" "1.15" "frags" "2" -"message" "^3has captured the blue Nex-Tunnel" +"message" "^3 has captured the blue Nex-Tunnel" "origin" "256 -176 -384" "classname" "dom_controlpoint" } @@ -822,7 +822,7 @@ "frags" "1" "classname" "dom_controlpoint" "origin" "352 -656 -224" -"message" "^3has captured the blue lower Floor" +"message" "^3 has captured the blue lower Floor" } { "origin" "768 -240 224" @@ -863,19 +863,19 @@ { "classname" "dom_controlpoint" "origin" "-1920 2432 240" -"message" "^3has captured red Main Area" +"message" "^3 has captured red Main Area" "frags" "1" "wait" "5" } { -"message" "^3has captured the red Flag Niche" +"message" "^3 has captured the red Flag Niche" "origin" "-848 2448 304" "classname" "dom_controlpoint" "frags" "1" "wait" "5" } { -"message" "^3has captured the red Rocket Launcher/Teleporter" +"message" "^3 has captured the red Rocket Launcher/Teleporter" "origin" "-1872 608 208" "classname" "dom_controlpoint" "frags" "1" @@ -884,13 +884,13 @@ { "classname" "dom_controlpoint" "origin" "-1840 1920 -384" -"message" "^3has captured the red Nex-Tunnel" +"message" "^3 has captured the red Nex-Tunnel" "frags" "2" "scale" "1.15" "wait" "5" } { -"message" "^3has captured the red lower Floor" +"message" "^3 has captured the red lower Floor" "origin" "-2320 2016 -224" "classname" "dom_controlpoint" "frags" "1" @@ -949,7 +949,7 @@ "frags" "2" "classname" "dom_controlpoint" "origin" "-1904 -240 96" -"message" "^3has captured the Speed Corner" +"message" "^3 has captured the Speed Corner" } { "classname" "func_bobbing" @@ -1034,7 +1034,7 @@ "model" "*22" } { -"message" "^3has captured the Strength Corner" +"message" "^3 has captured the Strength Corner" "origin" "-480 1184 -224" "classname" "dom_controlpoint" "frags" "1" diff --git a/data/maps/nexdm02.ent b/data/maps/nexdm02.ent index 75c8a14e1..a6dadf52a 100644 --- a/data/maps/nexdm02.ent +++ b/data/maps/nexdm02.ent @@ -1939,12 +1939,12 @@ } { "classname" "dom_team" -"netname" "^2Green Team^3" -"cnt" "3" +"netname" "^6Pink Team^3" +"cnt" "9" "noise" "domination/claim.wav" "noise1" "domination/claim.wav" -"message" "Green team has captured a control point" -"model" "models/domination/dom_green.md3" +"message" "Pink team has captured a control point" +"model" "models/domination/dom_pink.md3" } { "classname" "dom_team" diff --git a/data/maps/nexdm09.ent b/data/maps/nexdm09.ent index 51efdbcaa..64096c091 100644 --- a/data/maps/nexdm09.ent +++ b/data/maps/nexdm09.ent @@ -725,12 +725,12 @@ } { "classname" "dom_team" -"netname" "^2Green Team^3" -"cnt" "3" +"netname" "^6Pink Team^3" +"cnt" "9" "noise" "domination/claim.wav" "noise1" "domination/claim.wav" -"message" "Green team has captured a control point" -"model" "models/domination/dom_green.md3" +"message" "Pink team has captured a control point" +"model" "models/domination/dom_pink.md3" } { "classname" "dom_controlpoint" diff --git a/data/maps/nexdm10.ent b/data/maps/nexdm10.ent index 7ed89335d..ad3948588 100644 --- a/data/maps/nexdm10.ent +++ b/data/maps/nexdm10.ent @@ -397,12 +397,12 @@ } { "classname" "dom_team" -"netname" "^2Green Team^3" -"cnt" "3" +"netname" "^6Pink Team^3" +"cnt" "9" "noise" "domination/claim.wav" "noise1" "domination/claim.wav" -"message" "Green team has captured a control point" -"model" "models/domination/dom_green.md3" +"message" "Pink team has captured a control point" +"model" "models/domination/dom_pink.md3" } { "classname" "dom_controlpoint" diff --git a/data/maps/nexdm15.ent b/data/maps/nexdm15.ent index c0d29f8b2..ee5068a18 100644 --- a/data/maps/nexdm15.ent +++ b/data/maps/nexdm15.ent @@ -675,12 +675,12 @@ } { "classname" "dom_team" -"netname" "^2Green Team^3" -"cnt" "3" +"netname" "^6Pink Team^3" +"cnt" "9" "noise" "domination/claim.wav" "noise1" "domination/claim.wav" -"message" "Green team has captured a control point" -"model" "models/domination/dom_green.md3" +"message" "Pink team has captured a control point" +"model" "models/domination/dom_pink.md3" } { "classname" "dom_controlpoint" diff --git a/data/maps/nexdm16.ent b/data/maps/nexdm16.ent index fc493ffdb..2bddfac9d 100644 --- a/data/maps/nexdm16.ent +++ b/data/maps/nexdm16.ent @@ -434,12 +434,12 @@ } { "classname" "dom_team" -"netname" "^2Green Team^3" -"cnt" "3" +"netname" "^6Pink Team^3" +"cnt" "9" "noise" "domination/claim.wav" "noise1" "domination/claim.wav" -"message" "Green team has captured a control point" -"model" "models/domination/dom_green.md3" +"message" "Pink team has captured a control point" +"model" "models/domination/dom_pink.md3" } { "classname" "dom_team" diff --git a/data/maps/nexdm17.ent b/data/maps/nexdm17.ent index a3f419475..b946cd16c 100644 --- a/data/maps/nexdm17.ent +++ b/data/maps/nexdm17.ent @@ -1349,12 +1349,12 @@ } { "classname" "dom_team" -"netname" "^2Green Team^3" -"cnt" "3" +"netname" "^6Pink Team^3" +"cnt" "9" "noise" "domination/claim.wav" "noise1" "domination/claim.wav" -"message" "Green team has captured a control point" -"model" "models/domination/dom_green.md3" +"message" "Pink team has captured a control point" +"model" "models/domination/dom_pink.md3" } { "classname" "dom_controlpoint" diff --git a/data/models/domination/dom_bomb.tga b/data/models/domination/dom_bomb.tga index ff7272309dc21af76c45b861d768bd892db93348..ce2338ac67cdcb4c4e64f9b4ea9824d400ab498e 100644 GIT binary patch literal 2092 zcmZQz;9`ISMg~R+hX4P8XcUiz!Dt#7O#`E8U^ESkrhyTa24Jm$kf2c4FwbC5e?Q#_ KH%}i|Jq7?T_y1b} literal 196626 zcmeIuK@9*P3 2) - dom_spawnteam("Green", 3, "models/domination/dom_green.md3", 0, "domination/claim.wav", "", "Green team has captured a control point"); + dom_spawnteam("Pink", 9, "models/domination/dom_pink.md3", 0, "domination/claim.wav", "", "Pink team has captured a control point"); if(numteams > 3) dom_spawnteam("Yellow", 12, "models/domination/dom_yellow.md3", 0, "domination/claim.wav", "", "Yellow team has captured a control point"); dom_spawnteam("", 0, "models/domination/dom_unclaimed.md3", 0, "", "", ""); @@ -547,7 +547,7 @@ void() dom_init = // so we don't even know yet if this map is set up for domination... precache_model("models/domination/dom_red.md3"); precache_model("models/domination/dom_blue.md3"); - precache_model("models/domination/dom_green.md3"); + precache_model("models/domination/dom_pink.md3"); precache_model("models/domination/dom_yellow.md3"); precache_model("models/domination/dom_unclaimed.md3"); precache_sound("domination/claim.wav"); diff --git a/data/qcsrc/gamec/teamplay.c b/data/qcsrc/gamec/teamplay.c index ec673aa47..3bf020594 100644 --- a/data/qcsrc/gamec/teamplay.c +++ b/data/qcsrc/gamec/teamplay.c @@ -180,6 +180,7 @@ void InitGameplayMode() fraglimit_override = cvar("fraglimit_override"); gamemode_name = "Last Man Standing"; teams_matter = 0; + cvar_set("teamplay", "0"); lms_lowest_lives = 999; } else @@ -312,6 +313,25 @@ void SetPlayerColors(entity pl, float color) void SetPlayerTeam(entity pl, float t, float s, float noprint) { float color; + + // remap invalid teams in dom & ctf + if(cvar("g_ctf") && t == 3) + t = 2; + else if(cvar("g_ctf") && t == 4) + t = 1; + else if(cvar("g_domination") && cvar("g_domination_default_teams") < 3) + { + if(t == 3) + t = 2; + else if(t == 4) + t = 1; + } + else if(cvar("g_domination") && cvar("g_domination_default_teams") < 4) + { + if(t == 4) + t = 1; + } + if(t == 4) color = COLOR_TEAM4 - 1; else if(t == 3) @@ -324,12 +344,15 @@ void SetPlayerTeam(entity pl, float t, float s, float noprint) SetPlayerColors(pl,color); - if(!noprint && t != s) { //bprint(strcat(pl.netname, " has changed to ", TeamNoName(t), "\n")); bprint(strcat(pl.netname, "^7 has changed from ", TeamNoName(s), " to ", TeamNoName(t), "\n")); } + + // kill player when changing teams + if(teams_matter && self.classname == "player" && self.deadflag == DEAD_NO) + Damage(self, self, self, 100000, DEATH_KILL, self.origin, '0 0 0'); } diff --git a/data/qcsrc/progs.src b/data/qcsrc/progs.src index a8c8604d9..f1a698a02 100644 --- a/data/qcsrc/progs.src +++ b/data/qcsrc/progs.src @@ -17,6 +17,8 @@ gamec/runematch.c gamec/cl_physics.c +gamec/g_violence.c +gamec/g_damage.c gamec/teamplay.c @@ -30,9 +32,6 @@ gamec/t_teleporters.c gamec/sv_main.c gamec/sv_stats.c -gamec/g_violence.c -gamec/g_damage.c - gamec/g_triggers.c gamec/cl_weaponsystem.c -- 2.39.2