Source Code Project Mantis - FSSCP
View Issue Details
0002907FSSCPgameplaypublic2013-08-06 06:212014-06-11 05:36
Reporterniffiwan 
Assigned Toniffiwan 
PrioritynormalSeverityminorReproducibilityalways
StatusresolvedResolutionfixed 
PlatformOSOS Version
Product Version3.7.0 RC2 
Target Version3.7.2Fixed in Version 
Summary0002907: Unexpected behaviour in Red Alert missions when secondary bank is empty
DescriptionIf a pilot finishes the 1st mission with an empty secondary bank, in the next mission the bank will either be refilled or removed entirely from the ship. The result depends on the contents of the +Weaponry Pool in the 2nd mission.

If the secondary exists, all available missiles will be loaded up to the normal capacity of the fighters bank.
If the secondary does not exist, the bank will be removed. i.e. HUD looks like the ship has one less bank than normal.

I'd expect the behaviour to be that bank remains empty but still available in the 2nd mission.
Steps To ReproduceUse BluePlanet Mod
Play Universal Truth/Journey's End (bp-21 & bp-22)
Select secondary weapons NOT in the list below, e.g. Trebuchets

+Weaponry Pool: (
        "Subach HL-7" 8
        "Prometheus R" 8
        "Prometheus S" 20
        "Balor" 16
        "Hornet" 244
        "Tornado" 549
        "Harpoon" 208
)

During Universal Truth empty the Trebs bank
In Journey's End observe that the Trebs bank is now missing
Optionally, add different numbers of Trebs to the +Weaponry Pool and observe how the bank now fills up, partially or fully depending on how many missiles where made available.
Additional InformationThis is probably a good place to start looking for a solution:

missionui/missionweaponchoice.cpp : wl_remove_weps_from_pool()
TagsNo tags attached.
related to 0003056resolved niffiwan Redalert changes cause ships to have unintended loadout in Derelict mission 5 
Attached Filespatch mantis2907-svn.patch (401) 2013-08-29 04:46
http://scp.indiegames.us/mantis/file_download.php?file_id=2258&type=bug

Notes
(0015234)
niffiwan   
2013-08-13 22:29   
(Last edited: 2013-08-15 04:58)
Hmmm. So far unable to reproduce the issue on r9747 in FSPort sm2-05a & sm3-08a.

Ditto for Freespace2 sm3-09. Maybe it's something to do with BP builds or just that mission?

(and ditto for str02)

(and for bp-04. It seems like bp-21/22 is the only mission with this problem!)

(0015242)
niffiwan   
2013-08-21 04:34   
Using the old Blueplanet release I've tested 3.6.18 & it has the same problem.
(0015243)
niffiwan   
2013-08-27 04:46   
(Last edited: 2013-08-28 04:25)
Getting closer to finding the cause, it's something to do with red-alert + the mission flags set in the 2nd mission...

And this seems to be the problematic flag: MISSION_FLAG_NO_BRIEFING

(0015249)
niffiwan   
2013-08-29 04:49   
Attached patch has been tested with a simple red alert mission & bp-21/bp-22. It's a simple fix. In red alert missions that skip the briefing, follow the same logic as if the normal red alert "accept" button had been pressed, not the ship/weapon select "commit" button.

(will commit after 3.7.0 final)
(0015258)
niffiwan   
2013-09-02 03:24   
Fix committed to trunk@9764.

Issue History
2013-08-06 06:21niffiwanNew Issue
2013-08-13 22:29niffiwanNote Added: 0015234
2013-08-13 22:44niffiwanNote Edited: 0015234bug_revision_view_page.php?bugnote_id=15234#r612
2013-08-14 05:35niffiwanNote Edited: 0015234bug_revision_view_page.php?bugnote_id=15234#r613
2013-08-15 04:57niffiwanNote Edited: 0015234bug_revision_view_page.php?bugnote_id=15234#r621
2013-08-15 04:58niffiwanNote Edited: 0015234bug_revision_view_page.php?bugnote_id=15234#r622
2013-08-21 04:34niffiwanNote Added: 0015242
2013-08-27 04:46niffiwanNote Added: 0015243
2013-08-28 04:25niffiwanNote Edited: 0015243bug_revision_view_page.php?bugnote_id=15243#r624
2013-08-29 04:46niffiwanAssigned To => niffiwan
2013-08-29 04:46niffiwanStatusnew => assigned
2013-08-29 04:46niffiwanFile Added: mantis2907-svn.patch
2013-08-29 04:49niffiwanNote Added: 0015249
2013-08-29 04:49niffiwanStatusassigned => code review
2013-09-02 03:24niffiwanChangeset attached => fs2open trunk r9764
2013-09-02 03:24niffiwanNote Added: 0015258
2013-09-02 03:24niffiwanStatuscode review => resolved
2013-09-02 03:24niffiwanResolutionopen => fixed
2014-06-11 05:36niffiwanRelationship addedrelated to 0003056