Jump to content

NRAP undo and loading from file has wrong offset


Recommended Posts

NRAP has the bottom node offset from the center, and recalculates it when the height of the part is changed.  This works fine in the editor, and when launching from the editor.

However, the following problem exists, when doing an undo, when loading from a saved craft, and when going to an existing vessel in flight:

If the height is changed, the part is misplaced.  If the height is less than the default, the part will be recessed into the part it is attached to.  If the height is greater than the default, the part will be in the air above the part it is attached to.

The height is checked in the OnStart(), but I'm guessing that it's too late at that point.  I tried doing something in the OnLoad(), but the part doesn't exist at that time, so it's height can't be adjusted.

Any ideas?

Thanks in advance

 

Edit:  More investigation, appears that in the save file, the "pos" is being saved with a wrong value.   When I set the value to the original value, it loads correctly in the editor, yet when I load the same vessel on the launchpad, it's now floating in the air.  If I build a ship, go to the launchpad and then save the game and reload, it's still positioned correctly.

so the problem is only in the editor for some reason when it loads from a save file

Problem fixed, I had accidently disabled a check for initialization from the original mod

Edited by linuxgurugamer
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...