View Issue Details

IDProjectCategoryView StatusLast Update
0002868FSSCPPilot datapublic2013-05-22 09:30
ReporterFUBAR-BDHR Assigned Toniffiwan  
PriorityhighSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version3.6.19 
Target Version3.7.0 
Summary0002868: Unlocking missions in one campaign unlocks missions in all campaigns in the mission simulator
DescriptionWhen you play/skip missions in a campaign then switch to another campaign you will have unlocked missions you haven't played yet.
Steps To ReproduceYou will need another selectable campaign available.

Create new pilot. Go to to mission simulator note only freespace.fc2 is listed under campaign missions.
Switch campaigns. Go back to missions simulator not only the .fc2 file is listed for the other campaign
Switch back to the main freespace campaign
Go to campaing and skip training missions
Go back to mission simulator note the training missions are now available
Switch campaigns again
Go back to simulator and you will see unlocked missions.
Additional Informationr9673.

I haven't confirmed if the number unlocked is directly related to the number played/skipped or not but it seems logical.
TagsNo tags attached.

Relationships

related to 0002859 resolvedniffiwan Game crashes if mod is changed with the same pilot in use. 

Activities

Echelon9

2013-05-11 23:55

developer   ~0015053

I swear there was another recent Mantis report that was this same issue, but can't find it now.

That other report from memory had a patch and was committed. Your report build looks fairly recent though...

Echelon9

2013-05-13 03:14

developer   ~0015055

Ah yes, this was Mantis 2859. The fix was in 9673, so can you reconfirm this occurs in later builds?

FUBAR-BDHR

2013-05-13 06:07

developer   ~0015056

Yes it's still there in current trunk and as the original report said I was running r9673 when I found this.

niffiwan

2013-05-21 08:42

developer   ~0015080

note: also able to reproduce the bug by skipping a couple of training missions in fsport & restarting the campaign. Both skipped missions were still available in the tech room.

niffiwan

2013-05-21 10:00

developer  

mantis2868-svn.patch (725 bytes)   
Index: code/mission/missioncampaign.cpp
===================================================================
--- code/mission/missioncampaign.cpp	(revision 9677)
+++ code/mission/missioncampaign.cpp	(working copy)
@@ -1249,6 +1249,7 @@
 
 /**
  * Called when the game closes -- to get rid of memory errors for Bounds checker
+ * also called at campaign init and campaign load
  */
 void mission_campaign_clear()
 {
@@ -1308,6 +1309,7 @@
 			sexp_unmark_persistent(Campaign.missions[i].formula);		// free any sexpression nodes used by campaign.
 		}
 
+		Campaign.missions[i].completed = 0;
 		Campaign.missions[i].num_goals = 0;
 		Campaign.missions[i].num_events = 0;
 		Campaign.missions[i].num_variables = 0;	// Goober5000
mantis2868-svn.patch (725 bytes)   

niffiwan

2013-05-21 10:02

developer   ~0015081

OK - try this patch, it should fix the two cases mentioned in this bug.

FUBAR-BDHR

2013-05-22 03:44

developer   ~0015083

Looks like it's working.

niffiwan

2013-05-22 09:30

developer   ~0015084

Fix committed to trunk@9679.

Related Changesets

fs2open: trunk r9679

2013-05-22 06:27

niffiwan


Ported: N/A

Details Diff
Fix for mantis 2868: clear all mission completed flags when changing campaigns Affected Issues
0002868
mod - /trunk/fs2_open/code/mission/missioncampaign.cpp Diff File

Issue History

Date Modified Username Field Change
2013-05-09 06:28 FUBAR-BDHR New Issue
2013-05-11 23:55 Echelon9 Note Added: 0015053
2013-05-11 23:55 Echelon9 Status new => feedback
2013-05-13 03:14 Echelon9 Note Added: 0015055
2013-05-13 03:14 Echelon9 Relationship added related to 0002859
2013-05-13 06:07 FUBAR-BDHR Note Added: 0015056
2013-05-13 06:07 FUBAR-BDHR Status feedback => new
2013-05-13 14:47 Echelon9 Assigned To => niffiwan
2013-05-13 14:47 Echelon9 Status new => assigned
2013-05-21 08:42 niffiwan Note Added: 0015080
2013-05-21 10:00 niffiwan File Added: mantis2868-svn.patch
2013-05-21 10:02 niffiwan Note Added: 0015081
2013-05-21 10:02 niffiwan Status assigned => feedback
2013-05-21 10:02 niffiwan Summary Unlocking missions in one campaing unlocks in all in the mission simulator => Unlocking missions in one campaign unlocks in all campaigns in the mission simulator
2013-05-21 10:04 niffiwan Summary Unlocking missions in one campaign unlocks in all campaigns in the mission simulator => Unlocking missions in one campaign unlocks missions in all campaigns in the mission simulator
2013-05-22 03:44 FUBAR-BDHR Note Added: 0015083
2013-05-22 03:44 FUBAR-BDHR Status feedback => assigned
2013-05-22 09:30 niffiwan Changeset attached => fs2open trunk r9679
2013-05-22 09:30 niffiwan Note Added: 0015084
2013-05-22 09:30 niffiwan Status assigned => resolved
2013-05-22 09:30 niffiwan Resolution open => fixed