2019-12-07 04:32 EST


View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0002157FSSCPFREDpublic2010-05-02 01:59
ReporterFUBAR-BDHR 
Assigned ToGenghis 
PrioritynormalSeverityminorReproducibilityalways
StatusresolvedResolutionfixed 
Product Version3.6.12 RC1 
Target VersionFixed 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.
Attached Files
  • diff file icon fix_2157.diff (1,074 bytes) 2010-03-26 22:50 -
    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);
     
    
    diff file icon fix_2157.diff (1,074 bytes) 2010-03-26 22:50 +

-Relationships
+Relationships

-Notes

~0011834

Genghis (developer)

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.
+Notes

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