fix broken objectives fine-tuning

This commit is contained in:
abcdefg30
2014-09-29 16:14:42 +02:00
parent 3f7f7e1164
commit 7d72f81c5d

View File

@@ -87,7 +87,7 @@ namespace OpenRA.Mods.RA
public void MarkCompleted(Player player, int objectiveID) public void MarkCompleted(Player player, int objectiveID)
{ {
if (objectiveID >= objectives.Count || objectives[objectiveID].State == ObjectiveState.Completed) if (objectiveID >= objectives.Count || objectives[objectiveID].State != ObjectiveState.Incomplete)
return; return;
var inous = player.PlayerActor.TraitsImplementing<INotifyObjectivesUpdated>(); var inous = player.PlayerActor.TraitsImplementing<INotifyObjectivesUpdated>();
@@ -112,7 +112,7 @@ namespace OpenRA.Mods.RA
public void MarkFailed(Player player, int objectiveID) public void MarkFailed(Player player, int objectiveID)
{ {
if (objectiveID >= objectives.Count || objectives[objectiveID].State != ObjectiveState.Incomplete) if (objectiveID >= objectives.Count || objectives[objectiveID].State == ObjectiveState.Failed)
return; return;
var inous = player.PlayerActor.TraitsImplementing<INotifyObjectivesUpdated>(); var inous = player.PlayerActor.TraitsImplementing<INotifyObjectivesUpdated>();