thanks for the info re:POF constructor, but it seems more confusing to me than the source code!
I think I'm doing really good as is now, but still can't get past a ship_render crash; the problem seems to be with submodel[6] of fighter2t-02.pof, which is "thruster06a"...I can tell that it's bsp_data is still not swapped, but I can't find out why it isn't and the other thruster's seem to be...here's some relevent output from my debug log:
General: Loading model 'fighter2t-02.pof'
MALLOC: src/model/modelread.cpp:2063 5424 bytes
General: Processing chunk , len = 96
General: Processing chunk , len = 492
MALLOC: src/model/modelread.cpp:1309 14148 bytes
MALLOC: src/model/modelread.cpp:1401 440 bytes
General: Processing chunk , len = 99296
General: Subobj 0, offs = 0.0, 0.0, 0.0
MALLOC: src/model/modelread.cpp:1515 99200 bytes
General: Submodel 0, name 'herca', parent = -1
General: Processing chunk , len = 3244
General: Subobj 1, offs = -1.9, 4.4, -1.2
MALLOC: src/model/modelread.cpp:1515 3144 bytes
General: Submodel 1, name 'thruster01a', parent = 0
General: Processing chunk , len = 3928
General: Subobj 2, offs = -2.2, 1.2, -6.8
MALLOC: src/model/modelread.cpp:1515 3828 bytes
General: Submodel 2, name 'thruster02a', parent = 0
General: Processing chunk , len = 3244
General: Subobj 3, offs = 1.9, 4.4, -1.2
MALLOC: src/model/modelread.cpp:1515 3144 bytes
General: Submodel 3, name 'thruster03a', parent = 0
General: Processing chunk , len = 3708
General: Subobj 4, offs = 2.1, 1.2, -6.8
MALLOC: src/model/modelread.cpp:1515 3608 bytes
General: Submodel 4, name 'thruster04a', parent = 0
General: Processing chunk , len = 3244
General: Subobj 5, offs = -2.6, -1.0, -0.8
MALLOC: src/model/modelread.cpp:1515 3144 bytes
General: Submodel 5, name 'thruster05a', parent = 0
General: Processing chunk , len = 3092
General: Subobj 6, offs = 2.5, -1.0, -0.8
MALLOC: src/model/modelread.cpp:1515 2992 bytes
General: Submodel 6, name 'thruster06a', parent = 0
General: Processing chunk , len = 68432
General: Subobj 7, offs = 0.0, 0.0, 0.0
MALLOC: src/model/modelread.cpp:1515 68336 bytes
General: Submodel 7, name 'hercb', parent = -1
General: Processing chunk , len = 3244
General: Subobj 8, offs = -1.9, 4.4, -1.2
MALLOC: src/model/modelread.cpp:1515 3144 bytes
...as you can see, submodel 7 is much larger (68336 bytes) than the other thruster submodels (which are around 3100 bytes): do these numbers look correct?
Again, my strategy has been to do a swap in the first call to model_octant_create(), to which I've added several "swap_*" functions that are only called the first go through...they also have incorporated loops from model_interp parsing, plus some stuff I've thought necessary...
fr'instance, model_octant_find_faces() only loads pm->detail[0] submodels, which usually seems to be zero: I put in a for loop to go through pm->submodel[n_models].bsp_data the first time...
unfortunately, I'm officially stuck! Any help would be greatly appreciated! This particular crash has been my endpoint since I started fooling with the model_load swapping, so something still isn't there, and I'm not seeing it...
;-P