Source Code Project Mantis - FSSCP
View Issue Details
0002385FSSCPtablespublic2011-01-24 00:002011-02-04 12:19
ReporterFUBAR-BDHR 
Assigned ToThe_E 
PrioritynormalSeverityfeatureReproducibilityalways
StatusresolvedResolutionfixed 
PlatformOSOS Version
Product Version3.6.13 
Target VersionFixed in Version3.6.13 
Summary0002385: Animation code should be using subobject names not numbers
DescriptionThis is kind of a feature and a bug so putting it here. The issue with using subobject numbers for the animation code is that they change. Something as simple as opening an older versions of a model in a newer version of pcs2 can result in different subobject numbers. Max constantly rearranges them. Even saving and reopening a model will often result in different subobject numbers on export.

Of course we would need to keep the existing subobject number option for backward compatibility. Adding a +sub_name option would probably be the best. It would also allow for better error checking in the future as a deleted object would no longer be found.
TagsNo tags attached.
Attached Filespatch 2385.patch (2,267) 2011-01-24 12:04
http://scp.indiegames.us/mantis/file_download.php?file_id=1634&type=bug
patch 2385-2.patch (2,377) 2011-01-25 13:11
http://scp.indiegames.us/mantis/file_download.php?file_id=1635&type=bug

Notes
(0012611)
The_E   
2011-01-24 12:05   
Proposed patch is attached. Adds "+sub_name" to the animation code, to be placed after or instead of "+sub_type".
(0012612)
FUBAR-BDHR   
2011-01-25 00:18   
(Last edited: 2011-01-25 01:02)
Doesn't seem to work. I changed 5 turret doors to use +sub_name and while they do trigger to open they never stop rotating and never close. Left the rest on +sub_type and they still work.

Found and fixed one bug. Line 71 in that patch should be

if (!stricmp(sip->subsystems[i].subobj_name, subobj_name))

Even with that it seems that sip->subsystems[i].subobj_num is not defined yet as every single one has a value of 0xcccccccc

(0012613)
The_E   
2011-01-25 13:04   
Yeah, I was sort of afraid of that. Second patch uploaded, this one moves the fixing of animation references into ship_set, during mission load (which is where model data is mated with tbl data. Didn't want to slow down the init process by having to load the model during startup....)
(0012614)
FUBAR-BDHR   
2011-01-25 18:50   
Looks good.
(0012623)
The_E   
2011-02-04 12:19   
Committed to trunk in revision 7000

Issue History
2011-01-24 00:00FUBAR-BDHRNew Issue
2011-01-24 12:04The_EFile Added: 2385.patch
2011-01-24 12:05The_ENote Added: 0012611
2011-01-25 00:18FUBAR-BDHRNote Added: 0012612
2011-01-25 01:02FUBAR-BDHRNote Edited: 0012612
2011-01-25 13:04The_ENote Added: 0012613
2011-01-25 13:11The_EFile Added: 2385-2.patch
2011-01-25 13:11The_EStatusnew => assigned
2011-01-25 13:11The_EAssigned To => The_E
2011-01-25 18:50FUBAR-BDHRNote Added: 0012614
2011-02-04 12:19The_ENote Added: 0012623
2011-02-04 12:19The_EStatusassigned => resolved
2011-02-04 12:19The_EFixed in Version => 3.6.13
2011-02-04 12:19The_EResolutionopen => fixed