View Issue Details

IDProjectCategoryView StatusLast Update
0002157FSSCPFREDpublic2010-05-02 05:59
ReporterFUBAR-BDHR Assigned ToGenghis  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version3.6.12 RC1 
Fixed in Version3.6.12 
Summary0002157: Existing subsystems in mission that are no longer valid not detected by FRED
DescriptionDid some reworking of engines on some ships. Previously there was just one special point named engine. Now there are multiple ones named engine1a 2a etc. FRED will load and save missions containing subsystem engine set to initial strength 0 in the ship editor initial status widow without detecting any problem.

+Subsystem: engine
$Damage: 100

No problem detected by FRED on that in debug.


TagsNo tags attached.

Activities

2010-03-27 02:50

 

fix_2157.diff (1,074 bytes)   
Index: code/mission/missionparse.cpp
===================================================================
--- code/mission/missionparse.cpp	(revision 6028)
+++ code/mission/missionparse.cpp	(working copy)
@@ -3162,6 +3162,9 @@
 {
 	int i;
 
+	// Genghis: used later for subsystem checking
+	ship_info* sip = &Ship_info[objp->ship_class];
+
 	// set some defaults..
 	objp->initial_velocity = 0;
 	objp->initial_hull = 100;
@@ -3185,6 +3188,17 @@
 		objp->subsys_count++;
 		stuff_string(Subsys_status[i].name, F_NAME, NAME_LENGTH);
 		
+		// Genghis: check that the subsystem name makes sense for this ship type
+		if (stricmp("Pilot", Subsys_status[i].name))
+		{
+			int j;
+			for (j=0; j < sip->n_subsystems; ++j)
+				if (!stricmp(sip->subsystems[j].subobj_name, Subsys_status[i].name))
+					break;
+			if (j == sip->n_subsystems)
+				Warning(LOCATION, "Ship \"%s\", class \"%s\"\nUnknown subsystem \"%s\" found in mission!", objp->name, sip->name, Subsys_status[i].name);
+		}
+
 		if (optional_string("$Damage:"))
 			stuff_float(&Subsys_status[i].percent);
 
fix_2157.diff (1,074 bytes)   

Genghis

2010-03-27 02:52

developer   ~0011834

Candidate fix added.

Error-checking added to subsystem names, to ensure they belong to the specified ship class. A warning will be printed if an unknown subsystem is detected.

Issue History

Date Modified Username Field Change
2010-03-20 03:36 FUBAR-BDHR New Issue
2010-03-23 16:42 Genghis Assigned To => Genghis
2010-03-23 16:42 Genghis Status new => acknowledged
2010-03-26 05:00 Genghis Status acknowledged => assigned
2010-03-27 02:50 Genghis File Added: fix_2157.diff
2010-03-27 02:52 Genghis Note Added: 0011834
2010-05-02 05:59 karajorma Status assigned => resolved
2010-05-02 05:59 karajorma Fixed in Version => 3.6.12
2010-05-02 05:59 karajorma Resolution open => fixed