]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Teamplay: Fixed Domination.
authorLyberta <lyberta@lyberta.net>
Tue, 10 Jul 2018 04:41:43 +0000 (07:41 +0300)
committerLyberta <lyberta@lyberta.net>
Tue, 10 Jul 2018 04:41:43 +0000 (07:41 +0300)
qcsrc/common/gamemodes/gamemode/domination/domination.qc
qcsrc/server/teamplay.qh

index c9673da6fedbdd11a3bc49d9385875ea1d92e7fd..0cea02f2f2aef7325b0c7dc64a5bf13c1573cea2 100644 (file)
@@ -308,8 +308,11 @@ void Domination_count_controlpoints()
        IL_EACH(g_dompoints, true,
        {
                ++total_control_points;
+               if (!Entity_HasValidTeam(it.goalentity))
+               {
+                       continue;
+               }
                entity team_ = Entity_GetTeam(it.goalentity);
-               //TODO: team_ seems to be NULL
                int num_control_points = Team_GetNumberOfControlPoints(team_);
                ++num_control_points;
                Team_SetNumberOfControlPoints(team_, num_control_points);
index 91b9bdd8b0637bba031bbf1fb3a4809b1ee69578..664a0eca404a8287629ff006b9f29ca84f6129e6 100644 (file)
@@ -71,7 +71,8 @@ int Entity_GetTeamIndex(entity this);
 
 /// \brief Returns the team entity of the given entity.
 /// \param[in] this Entity to check.
-/// \return Team entity of the given entity.
+/// \return Team entity of the given entity or NULL if the entity doesn't belong
+/// to any team.
 entity Entity_GetTeam(entity this);
 
 void SetPlayerColors(entity player, float _color);