X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fmutators%2Fmutator%2Fgamemode_domination.qc;h=ba6a48f354decfe842607c6a127fe43c41fd8045;hb=77d6a05629e33da863fccb3cdd03b3c63af890dd;hp=1259364f093f3ba715f52933ea9061330c21d38b;hpb=724a41faf2cbfd86d41f3ab59ff8326a831a8326;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/mutators/mutator/gamemode_domination.qc b/qcsrc/server/mutators/mutator/gamemode_domination.qc index 1259364f0..ba6a48f35 100644 --- a/qcsrc/server/mutators/mutator/gamemode_domination.qc +++ b/qcsrc/server/mutators/mutator/gamemode_domination.qc @@ -1,3 +1,4 @@ +#include "gamemode_domination.qh" #ifndef GAMEMODE_DOMINATION_H #define GAMEMODE_DOMINATION_H @@ -424,8 +425,8 @@ float Domination_CheckWinner() if(winner_team > 0) { - Send_Notification(NOTIF_ALL, world, MSG_CENTER, APP_TEAM_NUM_4(winner_team, CENTER_ROUND_TEAM_WIN_)); - Send_Notification(NOTIF_ALL, world, MSG_INFO, APP_TEAM_NUM_4(winner_team, INFO_ROUND_TEAM_WIN_)); + Send_Notification(NOTIF_ALL, world, MSG_CENTER, APP_TEAM_NUM(winner_team, CENTER_ROUND_TEAM_WIN)); + Send_Notification(NOTIF_ALL, world, MSG_INFO, APP_TEAM_NUM(winner_team, INFO_ROUND_TEAM_WIN)); TeamScore_AddToTeam(winner_team, ST_DOM_CAPS, +1); } else if(winner_team == -1) @@ -450,20 +451,20 @@ void Domination_RoundStart() } //go to best items, or control points you don't own -void havocbot_role_dom() -{SELFPARAM(); - if(IS_DEAD(self)) +void havocbot_role_dom(entity this) +{ + if(IS_DEAD(this)) return; - if (self.bot_strategytime < time) + if (this.bot_strategytime < time) { - self.bot_strategytime = time + autocvar_bot_ai_strategyinterval; - navigation_goalrating_start(); - havocbot_goalrating_controlpoints(10000, self.origin, 15000); - havocbot_goalrating_items(8000, self.origin, 8000); - //havocbot_goalrating_enemyplayers(3000, self.origin, 2000); - //havocbot_goalrating_waypoints(1, self.origin, 1000); - navigation_goalrating_end(); + this.bot_strategytime = time + autocvar_bot_ai_strategyinterval; + navigation_goalrating_start(this); + havocbot_goalrating_controlpoints(this, 10000, this.origin, 15000); + havocbot_goalrating_items(this, 8000, this.origin, 8000); + //havocbot_goalrating_enemyplayers(this, 3000, this.origin, 2000); + //havocbot_goalrating_waypoints(1, this.origin, 1000); + navigation_goalrating_end(this); } } @@ -629,15 +630,16 @@ void ScoreRules_dom(float teams) } // code from here on is just to support maps that don't have control point and team entities -void dom_spawnteam (string teamname, float teamcolor, string pointmodel, float pointskin, string capsound, string capnarration, string capmessage) +void dom_spawnteam (string teamname, float teamcolor, string pointmodel, float pointskin, Sound capsound, string capnarration, string capmessage) {SELFPARAM(); + TC(Sound, capsound); setself(spawn()); self.classname = "dom_team"; self.netname = strzone(teamname); self.cnt = teamcolor; self.model = pointmodel; self.skin = pointskin; - self.noise = strzone(capsound); + self.noise = strzone(Sound_fixpath(capsound)); self.noise1 = strzone(capnarration); self.message = strzone(capmessage); @@ -667,15 +669,16 @@ void dom_spawnpoint(vector org) } // spawn some default teams if the map is not set up for domination -void dom_spawnteams(float teams) +void dom_spawnteams(int teams) { - dom_spawnteam(Team_ColoredFullName(NUM_TEAM_1), NUM_TEAM_1-1, "models/domination/dom_red.md3", 0, SND(DOM_CLAIM), "", "Red team has captured a control point"); - dom_spawnteam(Team_ColoredFullName(NUM_TEAM_2), NUM_TEAM_2-1, "models/domination/dom_blue.md3", 0, SND(DOM_CLAIM), "", "Blue team has captured a control point"); + TC(int, teams); + dom_spawnteam(Team_ColoredFullName(NUM_TEAM_1), NUM_TEAM_1-1, "models/domination/dom_red.md3", 0, SND_DOM_CLAIM, "", "Red team has captured a control point"); + dom_spawnteam(Team_ColoredFullName(NUM_TEAM_2), NUM_TEAM_2-1, "models/domination/dom_blue.md3", 0, SND_DOM_CLAIM, "", "Blue team has captured a control point"); if(teams >= 3) - dom_spawnteam(Team_ColoredFullName(NUM_TEAM_3), NUM_TEAM_3-1, "models/domination/dom_yellow.md3", 0, SND(DOM_CLAIM), "", "Yellow team has captured a control point"); + dom_spawnteam(Team_ColoredFullName(NUM_TEAM_3), NUM_TEAM_3-1, "models/domination/dom_yellow.md3", 0, SND_DOM_CLAIM, "", "Yellow team has captured a control point"); if(teams >= 4) - dom_spawnteam(Team_ColoredFullName(NUM_TEAM_4), NUM_TEAM_4-1, "models/domination/dom_pink.md3", 0, SND(DOM_CLAIM), "", "Pink team has captured a control point"); - dom_spawnteam("", 0, "models/domination/dom_unclaimed.md3", 0, "", "", ""); + dom_spawnteam(Team_ColoredFullName(NUM_TEAM_4), NUM_TEAM_4-1, "models/domination/dom_pink.md3", 0, SND_DOM_CLAIM, "", "Pink team has captured a control point"); + dom_spawnteam("", 0, "models/domination/dom_unclaimed.md3", 0, SND_Null, "", ""); } void dom_DelayedInit() // Do this check with a delay so we can wait for teams to be set up.