X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fmutators%2Fmutator%2Fgamemode_domination.qc;h=0d302d0f6194e3d1352488c1cbe06af48e47ae21;hb=0f1ffe9c0565f1f1a0d6f58240760f227aa3ee99;hp=7c645e4d39e1596d2c21ef22368cfe93e3a5515f;hpb=3018b03b7ad0decee85f2a659783d0b5309fe5a3;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 7c645e4d3..0d302d0f6 100644 --- a/qcsrc/server/mutators/mutator/gamemode_domination.qc +++ b/qcsrc/server/mutators/mutator/gamemode_domination.qc @@ -64,7 +64,7 @@ void dompoint_captured(entity this) Send_Notification(NOTIF_ALL, NULL, MSG_INFO, INFO_DOMINATION_CAPTURE_TIME, head.netname, this.message, points, wait_time); if(this.enemy.playerid == this.enemy_playerid) - PlayerScore_Add(this.enemy, SP_DOM_TAKES, 1); + GameRules_scoring_add(this.enemy, DOM_TAKES, 1); else this.enemy = NULL; @@ -88,7 +88,7 @@ void dompoint_captured(entity this) this.team = old_team; entity msg = WP_DomNeut; - switch(this.team) + switch(real_team) { case NUM_TEAM_1: msg = WP_DomRed; break; case NUM_TEAM_2: msg = WP_DomBlue; break; @@ -176,8 +176,8 @@ void dompointthink(entity this) // give credit to the individual player, if he is still there if (this.enemy.playerid == this.enemy_playerid) { - PlayerScore_Add(this.enemy, SP_SCORE, fragamt); - PlayerScore_Add(this.enemy, SP_DOM_TICKS, fragamt); + GameRules_scoring_add(this.enemy, SCORE, fragamt); + GameRules_scoring_add(this.enemy, DOM_TICKS, fragamt); } else this.enemy = NULL; @@ -402,15 +402,16 @@ void havocbot_role_dom(entity this) if(IS_DEAD(this)) return; - if (this.bot_strategytime < time) + if (navigation_goalrating_timeout(this)) { - 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(this, 1, this.origin, 3000); navigation_goalrating_end(this); + + navigation_goalrating_timeout_set(this); } } @@ -559,10 +560,10 @@ void ScoreRules_dom(int teams) { if(domination_roundbased) { - ScoreRules_basics(teams, SFL_SORT_PRIO_PRIMARY, 0, true); - ScoreInfo_SetLabel_TeamScore (ST_DOM_CAPS, "caps", SFL_SORT_PRIO_PRIMARY); - ScoreInfo_SetLabel_PlayerScore(SP_DOM_TAKES, "takes", 0); - ScoreRules_basics_end(); + GameRules_scoring(teams, SFL_SORT_PRIO_PRIMARY, 0, { + field_team(ST_DOM_CAPS, "caps", SFL_SORT_PRIO_PRIMARY); + field(SP_DOM_TAKES, "takes", 0); + }); } else { @@ -572,11 +573,11 @@ void ScoreRules_dom(int teams) sp_domticks = SFL_SORT_PRIO_PRIMARY; else sp_score = SFL_SORT_PRIO_PRIMARY; - ScoreRules_basics(teams, sp_score, sp_score, true); - ScoreInfo_SetLabel_TeamScore (ST_DOM_TICKS, "ticks", sp_domticks); - ScoreInfo_SetLabel_PlayerScore(SP_DOM_TICKS, "ticks", sp_domticks); - ScoreInfo_SetLabel_PlayerScore(SP_DOM_TAKES, "takes", 0); - ScoreRules_basics_end(); + GameRules_scoring(teams, sp_score, sp_score, { + field_team(ST_DOM_TICKS, "ticks", sp_domticks); + field(SP_DOM_TICKS, "ticks", sp_domticks); + field(SP_DOM_TAKES, "takes", 0); + }); } }