Project

General

Profile

Bug #13109

ModuleDeployablePart not picking correct animation

Added by Fwiffo over 7 years ago.

Status:
New
Severity:
Normal
Assignee:
-
Category:
Parts
Target version:
-
Start date:
10/25/2016
% Done:

0%

Version:
Platform:
Linux, OSX, PS4, Windows, XBoxOne
Expansion:
Language:
English (US)
Mod Related:
No
Votes:
Arrow u r green
Arrow d r red

Description

If a part has multiple models with animations, the ModuleDeployablePart module picks the first one instead of respecting the animationName field.

Apparently this is due to a typo in the code; a line that reads "GetComponentInChildren" should read "GetComponentsInChildren" (note the S). Further developer details are in this forum post:

http://forum.kerbalspaceprogram.com/index.php?/topic/150602-part-upgrade-to-moduledeployableantenna/&do=findComment&comment=2819077

To reproduce, put the attached two parts in your GameData directory and place them in the Editor. You'll see only one works; the Extend button is missing in the broken one and the animation actually starts as soon as you pick it up from the toolbox.

Examining the CFG's, you'll note the only substantive difference between them is the ordering of the meshes. There are two meshes with animations: the spotlight, and the antenna. In the working CFG, the antenna mesh precedes the spotlight one; in the broken CFG, the spotlight mesh comes first.

The broken one fails because the typo is preventing ModuleDeployablePart from grabbing the correct animation.

Correct behavior would be for the animations to work in both, regardless of the ordering of the meshes.

AntTest1-works.cfg (2.24 KB) AntTest1-works.cfg [email protected] Fwiffo, 10/25/2016 11:31 AM
AntTest2-broken.cfg (2.25 KB) AntTest2-broken.cfg [email protected] Fwiffo, 10/25/2016 11:31 AM

Also available in: Atom PDF