Prevent already failed objectives from being marked as completed
The same change was not and must not be done in the reverse case. It should be and is possible to mark an already completed objective as failed. Consider a case where a player is supposed to capture, but not destroy, a building. He captures it, the objective is complete. However, later in the game that building gets destroyed. In this case, the objective should be changed to failed.
This commit is contained in:
@@ -112,7 +112,7 @@ namespace OpenRA.Mods.RA
|
||||
|
||||
public void MarkFailed(Player player, int objectiveID)
|
||||
{
|
||||
if (objectiveID >= objectives.Count || objectives[objectiveID].State == ObjectiveState.Failed)
|
||||
if (objectiveID >= objectives.Count || objectives[objectiveID].State != ObjectiveState.Incomplete)
|
||||
return;
|
||||
|
||||
var inous = player.PlayerActor.TraitsImplementing<INotifyObjectivesUpdated>();
|
||||
|
||||
Reference in New Issue
Block a user