2018-09-25 23:46 EDT


View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0002155FSSCPtablespublic2012-12-13 00:42
ReporterFUBAR-BDHR 
Assigned ToGenghis 
PrioritynormalSeverityminorReproducibilityalways
StatusresolvedResolutionfixed 
Product Version3.6.12 RC1 
Target VersionFixed in Version3.6.12 
Summary0002155: FS2 not catching table<->model errors that FRED does on subsystems
DescriptionDid a conversion last night and misspelled subsystem susbystem in the $special=subsystem line of 3 subsystems (it was St. Patty's day what do you expect?) Tested the model in the F3 tech lab and it loaded just and the thrusters and glows attached to those subsystems worked as well (they were engines). Went to make a test mission for something else and as soon as FRED hit the ship it produced the warnings about the missing subsystems. Running debug in both FS2 and FRED.
TagsNo tags attached.
Attached Files
  • rar file icon 2155.rar (205,549 bytes) 2010-03-20 01:07
  • diff file icon fix_2155.diff (1,706 bytes) 2010-03-22 22:57 -
    Index: code/lab/lab.cpp
    ===================================================================
    --- code/lab/lab.cpp	(revision 6027)
    +++ code/lab/lab.cpp	(working copy)
    @@ -33,6 +33,7 @@
     #define LAB_FLAG_SHOW_DEBRIS		(1<<2)	// render debris instead of normal LOD
     #define LAB_FLAG_SUBMODEL_ROTATE	(1<<3)	// do rotation for any rotating ship subobjects
     #define LAB_FLAG_LIGHTNING_ARCS		(1<<4)	// show damage lightning
    +#define LAB_FLAG_FULLY_LOAD			(1<<5)	// use create_ship() to test the ships
     
     // modes
     #define LAB_MODE_NONE		0	// not showing anything
    @@ -1607,6 +1608,7 @@
     	// add all of the flags that we want/need...
     
     	// viewer flags
    +	ADD_RENDER_FLAG("Test Load Ships", Lab_viewer_flags, LAB_FLAG_FULLY_LOAD);
     	ADD_RENDER_FLAG("Disable Model Rotation", Lab_viewer_flags, LAB_FLAG_NO_ROTATION);
     	ADD_RENDER_FLAG("Show Insignia", Lab_viewer_flags, LAB_FLAG_SHOW_INSIGNIA);
     	ADD_RENDER_FLAG("Show Damage Lightning", Lab_viewer_flags, LAB_FLAG_LIGHTNING_ARCS);
    @@ -1838,6 +1840,16 @@
     	int ship_index = (int)(caller->GetSelectedItem()->GetParentItem()->GetData());
     	Assert( ship_index >= 0 );
     
    +	// Genghis - Attempt to create and then immediately delete the selected ship type.
    +	// This causes the full error-handling to kick-in, making the Lab viewer a more
    +	// useful tool for checking model errors.
    +	if (Lab_viewer_flags & LAB_FLAG_FULLY_LOAD)
    +	{
    +		The_mission.ai_profile = &Ai_profiles[Default_ai_profile];
    +		int test_idx = ship_create(&vmd_identity_matrix, &vmd_zero_vector, ship_index);
    +		obj_delete(test_idx);
    +	}
    +
     	Lab_last_selected_ship = Lab_selected_index;
     
     	labviewer_change_model(Ship_info[ship_index].pof_file, caller->GetSelectedItem()->GetData(), ship_index);
    
    diff file icon fix_2155.diff (1,706 bytes) 2010-03-22 22:57 +

-Relationships
related to 0002752resolvedGoober5000 Loading a ship in lab then toggling test load on causes invalid invalid subsystem warnings 
+Relationships

-Notes

~0011811

FUBAR-BDHR (developer)

Attached a modified Ganymede Installation. 2 $special=subsystem entries are misspelled in the pof. FRED catches it ship lab doesn't

~0011824

Genghis (developer)

So the problem was that in the Lab it doesn't bother trying to actually load and fully error-check a ship, it just does the minimum necessary to load and view the model and its sub-models, without caring much about what type of sub-objects they are.

The candidate fix in fix_2155.diff adds an option to the Lab's render options menu called "Test Load Ships". When this is checked, each time you change the ship LOD or type it will do a full create/destroy of that ship type, therefore triggering all the error-checking code that was being skipped before.

I've left the option switched-off by default, because it slows-down rapid browsing of the ship list.

~0011923

karajorma (administrator)

How hard would it be to display that test loading mode was on at the bottom of the screen? Something like this could probably use a visual clue that it was on rather than simply relying on the user to open up the rendering options menu or notice the longer load times.

That said I'll commit the fix as it is now since it is a useful feature already.
+Notes

-Issue History
Date Modified Username Field Change
2010-03-19 05:51 FUBAR-BDHR New Issue
2010-03-20 01:07 FUBAR-BDHR File Added: 2155.rar
2010-03-20 01:08 FUBAR-BDHR Note Added: 0011811
2010-03-20 08:51 Genghis Status new => assigned
2010-03-20 08:51 Genghis Assigned To => Genghis
2010-03-22 22:57 Genghis File Added: fix_2155.diff
2010-03-22 23:01 Genghis Note Added: 0011824
2010-05-02 01:50 karajorma Note Added: 0011923
2010-05-02 01:52 karajorma Status assigned => resolved
2010-05-02 01:52 karajorma Fixed in Version => 3.6.12
2010-05-02 01:52 karajorma Resolution open => fixed
2012-12-13 00:42 Goober5000 Relationship added related to 0002572
2012-12-13 00:42 Goober5000 Relationship deleted related to 0002572
2012-12-13 00:42 Goober5000 Relationship added related to 0002752
+Issue History