View Issue Details

IDProjectCategoryView StatusLast Update
0002904FSSCPPilot datapublic2013-08-06 10:05
Reporterniffiwan Assigned Toniffiwan  
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
Product Version3.7.0 RC2 
Target Version3.7.0 
Summary0002904: dead wingmen are not removed from the "next" red alert mission
DescriptionSee this thread:
http://www.hard-light.net/forums/index.php?topic=84731.msg1695810#msg1695810

Example error is:
Red Alert: asked to delete ship (Alpha 4) with invalid ship state (0)

Steps To ReproduceOccurs when wingmen are destroyed in the "1st" mission and those wingmen don't have the "red-alert-carry" flag (e.g. FSPort Tenderizer)
TagsNo tags attached.

Relationships

child of 0001326 resolvedniffiwan Departed wingmen are displayed as destroyed after red alert 

Activities

niffiwan

2013-07-23 05:57

developer  

mantis2904-svn.patch (698 bytes)   
Index: code/missionui/redalert.cpp
===================================================================
--- code/missionui/redalert.cpp	(revision 9720)
+++ code/missionui/redalert.cpp	(working copy)
@@ -714,7 +714,7 @@
 		}
 
 		int found_match = 0;
-		int ship_state = 0;
+		int ship_state = RED_ALERT_DESTROYED_SHIP_CLASS;
 
 		for ( i = 0; i < (int)Red_alert_wingman_status.size(); i++ ) {
 			ras = &Red_alert_wingman_status[i];
@@ -742,7 +742,6 @@
 
 			} else if ( !stricmp(ras->name.c_str(), shipp->ship_name) && ( (ras->ship_class == RED_ALERT_DESTROYED_SHIP_CLASS) || (ras->ship_class == RED_ALERT_PLAYER_DEL_SHIP_CLASS) ) ) {
 				ship_state = ras->ship_class;
-				continue;
 			}
 		}
 
mantis2904-svn.patch (698 bytes)   

niffiwan

2013-07-23 06:02

developer   ~0015202

Last edited: 2013-07-23 06:04

Simple patch uploaded, wingmen without redalert data stored in the pilot file are now destroyed by default, rather than them causing an error.

Tested OK with Tenderizer (FSPort sm2-05a, reached via skipmemymissionyo)

(and I removed a useless "continue")

niffiwan

2013-08-04 07:48

developer   ~0015206

Tested by two people:

http://www.hard-light.net/forums/index.php?topic=84731.msg1702896#msg1702896
http://www.hard-light.net/forums/index.php?topic=85192.msg1703438#msg1703438

Just need to confirm that the BP UT/JE loadout thing is not related to this issue & I believe this can be committed.

niffiwan

2013-08-06 10:04

developer   ~0015209

http://www.hard-light.net/forums/index.php?topic=84731.msg1704231#msg1704231

I've confirmed that the Universal Truth/Journey's End loadout issue is due to the weapon pool values in Journey's End, missing Maxim/Trebuchets. Add them to bp-22.fs2 and the loadout is as expected. Except that I've found another bug where you get odd behaviour when one of your missile banks was empty. The empty bank either gets refilled (if the weapon is in the weapon pool) or removed entirely (if not) :rolleyes: New mantis time, but target it for 3.7.2 I think, not 3.7.0 :)

niffiwan

2013-08-06 10:05

developer   ~0015210

Fix committed to trunk@9740.

Related Changesets

fs2open: trunk r9740

2013-08-06 07:15

niffiwan


Ported: N/A

Details Diff
Fix for mantis 2904: redalert wingmen without RA data are treated as destroyed Affected Issues
0002904
mod - /trunk/fs2_open/code/missionui/redalert.cpp Diff File

Issue History

Date Modified Username Field Change
2013-07-22 07:52 niffiwan New Issue
2013-07-22 07:52 niffiwan Status new => assigned
2013-07-22 07:52 niffiwan Assigned To => niffiwan
2013-07-22 07:53 niffiwan Relationship added child of 0001326
2013-07-23 05:57 niffiwan File Added: mantis2904-svn.patch
2013-07-23 06:02 niffiwan Note Added: 0015202
2013-07-23 06:02 niffiwan Status assigned => code review
2013-07-23 06:04 niffiwan Note Edited: 0015202
2013-08-04 07:48 niffiwan Note Added: 0015206
2013-08-06 10:04 niffiwan Note Added: 0015209
2013-08-06 10:05 niffiwan Changeset attached => fs2open trunk r9740
2013-08-06 10:05 niffiwan Note Added: 0015210
2013-08-06 10:05 niffiwan Status code review => resolved
2013-08-06 10:05 niffiwan Resolution open => fixed