Closed BrettRyland closed 2 years ago
Thanks. Animations will now be disabled for parts without valid control surface models, no repeated calls to part.FindModelTransform
but animations will not be reenabled if a valid transform is added which should be never/very rarely.
Hey @dkavolis, Some BDArmory users have been occasionally having issues where, after running KSP for a while, planes suddenly have no lift (the aerodynamic forces overlay shows nothing) and can't take off. I found a bunch of the following in their log:
This appears to be caused by
part.FindModelTransform(transformName);
returningnull
for some part (I suspect an EVA kerbal or the parachute in their inventory, the particular plane above uses an EVA kerbal in a command seat instead of a cockpit). Adding in anull
check fixes the issue, but means thatpart.FindModelTransform(transformName);
is being called everyfixedUpdate
, so you may want to add a flag so that the check is only performed once and maybe give a warning in the log about the missing transform (in case the part is just badly configured and is fixable).