View Issue Details

IDProjectCategoryView StatusLast Update
0002981FSSCPgameplaypublic2014-05-10 05:01
ReporterDahBlount Assigned Toniffiwan  
PriorityimmediateSeverityblockReproducibilitysometimes
Status resolvedResolutionfixed 
Product Version3.7.1 
Target Version3.7.2 
Summary0002981: Exit loop button appears in certain missions and when clicked restarts campaign.
DescriptionOn certain missions after the SOC loop, the Exit Loop button appears in the top right for several missions. When this is clicked on, it restarts the players campaign from the first training mission TSM 103a.

Missions Know to produce problem include:
Pegasus Test mission
Colossus V. Sathanas mission
Possible others.
Steps To ReproduceFinish SOC loop and continue through campaign as normal.
Additional InformationReports from the forums:
http://www.hard-light.net/forums/index.php?topic=86074.0 (pilot file attached)
TagsNo tags attached.

Activities

Lykurgos88

2013-12-21 19:19

reporter   ~0015528

I had this "Exit Loop" button in EVERY single mission after the first SOC loop. I managed to complete the campaign, but clicking this button should be strongly avoided, since it takes you to the first training mission.

Echelon9

2013-12-26 07:09

developer   ~0015533

Can you use nightly builds to see which is the first to report this behaviour?

niffiwan

2013-12-26 10:51

developer   ~0015534

I suspect (but haven't confirmed) that this is from the 3.7.0 pilot code, I have a fairly clear recollection of seeing the "exit loop" button outside the SOC loops (I didn't press it) while testing antipodes 8 ages ago.

Lykurgos88

2013-12-30 12:24

reporter   ~0015548

Sorry I'm a bit late with this, but I just might provide some additional information.

So after a 6-year break, I finally made a new fresh install of FSO, complete with the newly released SCP 3.7.0. I played FS2 campaign for 5 missions before changing to fanmade mods. Then afterwards I upgraded to 10150 build and later to 10222 with MediaVP_2014 enabled. I continued the FS2 campaign all the way to the end. I had this "exit loop" button enabled in every mission after the first 3 SOC missions regardless whether I was using the new or the old mediaVP.

I also gave FSO (complete with 10150 build) in a USB stick to my brother and he reported the same thing. Unfortunately he was a bit careless and actually pressed that exit loop button which caused his campaign to reset.

So yeah, this seems to be a post 3.7.0 problem, linked with the new universal pilot code.

Goober5000

2014-05-08 15:18

administrator   ~0015728

Marking for 3.7.2, and assigning to Niffiwan.

niffiwan

2014-05-09 04:12

developer  

Pilots.rar (16,737 bytes)

niffiwan

2014-05-09 04:19

developer  

mantis2981.7z (21,312 bytes)

niffiwan

2014-05-09 04:21

developer   ~0015731

Last edited: 2014-05-09 04:34

*glee* My JSON pilot dump is useful in the 1st serious test I gave it *glee*

The .1 files are from a FSO run that didn't show the exit loop button.
The .2 files are from a FSO run that *did* show the exit loop button.

Looks like some loop data is being scrambled, possibly read in a different order to being written?

$ diff -u Ranger.FreeSpace2.csj.1 Ranger.FreeSpace2.csj.2
--- Ranger.FreeSpace2.csj.1 2014-05-09 14:29:01.621816490 +1000
+++ Ranger.FreeSpace2.csj.2 2014-05-09 14:29:43.134211180 +1000
@@ -281,8 +281,8 @@
         "last ship flown": 57,
         "Campaign.prev_mission": 31,
         "Campaign.next_mission": 32,
- "Campaign.loop_enabled": 0,
- "Campaign.loop_reentry": 19,
+ "Campaign.loop_enabled": 19,
+ "Campaign.loop_reentry": 0,
         "Campaign.num_missions_completed": 32,
         "ships_allowed* (non-zero)": [
             {

(no difference in the .plr files)

niffiwan

2014-05-09 04:28

developer   ~0015732

Last edited: 2014-05-09 04:34

And that was it, done :)

https://github.com/scp-fs2open/fs2open.github.com/pull/24
https://github.com/niffiwan/fs2open.github.com/commit/867da05dc4708bfc8db3aa647f0d3ed496a1542a

niffiwan

2014-05-09 04:28

developer  

mantis2981-git.patch (677 bytes)   
commit 867da05dc4708bfc8db3aa647f0d3ed496a1542a
Author: niffiwan <niffiwan.scp@gmail.com>
Date:   Fri May 9 14:39:36 2014 +1000

    Fix mantis 2981
    
    Read & write pilot loop data in the same order

diff --git a/code/pilotfile/csg.cpp b/code/pilotfile/csg.cpp
index 4a93e43..eed2e64 100644
--- a/code/pilotfile/csg.cpp
+++ b/code/pilotfile/csg.cpp
@@ -211,8 +211,8 @@ void pilotfile::csg_write_info()
 	cfwrite_int(Campaign.next_mission, cfp);
 
 	// loop state
-	cfwrite_int(Campaign.loop_enabled, cfp);
 	cfwrite_int(Campaign.loop_reentry, cfp);
+	cfwrite_int(Campaign.loop_enabled, cfp);
 
 	// missions completed
 	cfwrite_int(Campaign.num_missions_completed, cfp);
mantis2981-git.patch (677 bytes)   

Echelon9

2014-05-10 00:33

developer   ~0015734

Niffiwan, that is a great endorsement of the JSON export feature

Goober5000

2014-05-10 04:54

administrator   ~0015735

Excellent work. :)

Are you going to also patch the SVN repository, or something?

niffiwan

2014-05-10 05:01

developer   ~0015736

Fix committed to trunk@10665.

Related Changesets

fs2open: trunk r10665

2014-05-10 00:13

niffiwan


Ported: N/A

Details Diff
Fix mantis 2981

Read & write pilot loop data in the same order
Affected Issues
0002981
mod - /trunk/fs2_open/code/pilotfile/csg.cpp Diff File

Issue History

Date Modified Username Field Change
2013-12-17 01:10 DahBlount New Issue
2013-12-21 19:19 Lykurgos88 Note Added: 0015528
2013-12-26 07:09 Echelon9 Note Added: 0015533
2013-12-26 10:51 niffiwan Note Added: 0015534
2013-12-30 12:24 Lykurgos88 Note Added: 0015548
2014-05-08 12:27 The_E Priority normal => immediate
2014-05-08 12:27 The_E Severity minor => block
2014-05-08 15:18 Goober5000 Note Added: 0015728
2014-05-08 15:18 Goober5000 Assigned To => niffiwan
2014-05-08 15:18 Goober5000 Status new => assigned
2014-05-08 15:18 Goober5000 Target Version => 3.7.2
2014-05-09 03:50 niffiwan Status assigned => acknowledged
2014-05-09 04:11 niffiwan Additional Information Updated
2014-05-09 04:12 niffiwan File Added: Pilots.rar
2014-05-09 04:19 niffiwan File Added: mantis2981.7z
2014-05-09 04:21 niffiwan Note Added: 0015731
2014-05-09 04:28 niffiwan Note Added: 0015732
2014-05-09 04:28 niffiwan File Added: mantis2981-git.patch
2014-05-09 04:34 niffiwan Note Edited: 0015732
2014-05-09 04:34 niffiwan Note Edited: 0015731
2014-05-09 04:35 niffiwan Status acknowledged => code review
2014-05-10 00:33 Echelon9 Note Added: 0015734
2014-05-10 04:54 Goober5000 Note Added: 0015735
2014-05-10 05:01 niffiwan Changeset attached => fs2open trunk r10665
2014-05-10 05:01 niffiwan Note Added: 0015736
2014-05-10 05:01 niffiwan Status code review => resolved
2014-05-10 05:01 niffiwan Resolution open => fixed