Hard Light Productions Forums
Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: Black Wolf on September 20, 2014, 07:10:03 pm
-
I asked about this in IRC last night, but nobody was around who could answer.
Last year, VA mentioned that he had accidentally broken look_at for submodels (http://www.hard-light.net/forums/index.php?topic=84897.msg1713468#msg1713468). Since then, it apparently hasn't been fixed, as it still doesn't work in the latest nightly. Any chance we could get it back? It's super cool, and I have ships that I can't release because, at present, they just don't work.
Any movement in this would be greatly appreciated.
-
Most of the coding I do is in Excel VBA (for work), but I've been getting better at reading and interpreting FSO code, and I think I may have a good theory on a fix.
In modelread.cpp, line 1264, part of an if statement, checks to see if the modder has specified a sub-object as one of a series of possible subobjects types for the purpose of rotation. It does not include "$look_at:" in the list. Look_at animations are never enabled. (pm->submodel[n].can_move = true; is the statement I'm looking for) Though, it could be a type that doesn't need to be enabled.
My skill is limited, but it looks like coder oversight since look_at is such a special case model animation, and the coder probably didn't know about it.
Though, if it were added to the list, it would need to be tested in case there are other things wrong with the animation type due to further revision differences. And enabling it could have effects on other things. *mumbles to self* I totally need to learn how to make a custom build. *ends mumbling*
-
Is this in Mantis? Cause this should be in Mantis.
-
Most of the coding I do is in Excel VBA (for work), but I've been getting better at reading and interpreting FSO code, and I think I may have a good theory on a fix.
In modelread.cpp, line 1264, part of an if statement, checks to see if the modder has specified a sub-object as one of a series of possible subobjects types for the purpose of rotation. It does not include "$look_at:" in the list. Look_at animations are never enabled. (pm->submodel[n].can_move = true; is the statement I'm looking for) Though, it could be a type that doesn't need to be enabled.
Yeah, that part is definitely wrong; $look_at submodels should get their can_move set to true. I'm not sure if it really affects anything in this exact case, but the purpose of can_move is to signal whether the submodel can ever change position or orientation so it should get set here.
-
Is this in Mantis? Cause this should be in Mantis.
Ditto.
-
thats an oldie but a goodie. bring it back.
-
Black Wolf has kindly added this to Mantis:
http://scp.indiegames.us/mantis/view.php?id=3115