X-Git-Url: https://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fcommon%2Fgamemodes%2Fgamemode%2Fdomination%2Fdomination.qc;h=b8f08a5a1e09b35f28aa9d3e4ae6b852cd59d196;hp=46067f907303410c923fd7d411a218fa9add65a0;hb=70bba988cd32922d29e40235db6ad1d8149bdc67;hpb=76de60deecae125795551ba1a4576a265d7ae7de diff --git a/qcsrc/common/gamemodes/gamemode/domination/domination.qc b/qcsrc/common/gamemodes/gamemode/domination/domination.qc index 46067f9073..b8f08a5a1e 100644 --- a/qcsrc/common/gamemodes/gamemode/domination/domination.qc +++ b/qcsrc/common/gamemodes/gamemode/domination/domination.qc @@ -188,9 +188,9 @@ void dompointthink(entity this) void dompointtouch(entity this, entity toucher) { - if (!IS_PLAYER(toucher)) + if(!IS_PLAYER(toucher)) return; - if (toucher.health < 1) + if(GetResourceAmount(toucher, RESOURCE_HEALTH) < 1) return; if(round_handler_IsActive() && !round_handler_IsRoundStarted()) @@ -308,6 +308,10 @@ void Domination_count_controlpoints() IL_EACH(g_dompoints, true, { ++total_control_points; + if (!Entity_HasValidTeam(it.goalentity)) + { + continue; + } entity team_ = Entity_GetTeam(it.goalentity); int num_control_points = Team_GetNumberOfControlPoints(team_); ++num_control_points; @@ -397,9 +401,9 @@ void havocbot_goalrating_controlpoints(entity this, float ratingscale, vector or if(it.cnt > -1) // this is just being fought navigation_routerating(this, it, ratingscale, 5000); else if(it.goalentity.cnt == 0) // unclaimed - navigation_routerating(this, it, ratingscale * 0.5, 5000); + navigation_routerating(this, it, ratingscale, 5000); else if(it.goalentity.team != this.team) // other team's point - navigation_routerating(this, it, ratingscale * 0.2, 5000); + navigation_routerating(this, it, ratingscale, 5000); }); } @@ -412,8 +416,8 @@ void havocbot_role_dom(entity this) { 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_items(this, 20000, this.origin, 8000); + //havocbot_goalrating_enemyplayers(this, 1500, this.origin, 2000); havocbot_goalrating_waypoints(this, 1, this.origin, 3000); navigation_goalrating_end(this); @@ -585,10 +589,10 @@ void ScoreRules_dom(int 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, Sound capsound, string capnarration, string capmessage) +void dom_spawnteam(string teamname, float teamcolor, string pointmodel, float pointskin, Sound capsound, string capnarration, string capmessage) { - TC(Sound, capsound); - entity e = new_pure(dom_team); + TC(Sound, capsound); + entity e = new_pure(dom_team); e.netname = strzone(teamname); e.cnt = teamcolor; e.model = pointmodel; @@ -622,7 +626,7 @@ void dom_spawnpoint(vector org) // spawn some default teams if the map is not set up for domination void dom_spawnteams(int teams) { - TC(int, teams); + 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)