Project

General

Profile

Bug #13177

GetModuleMass is called constantly regardless of value returned by GetModuleMassChangeWhen

Added by rspeed over 7 years ago. Updated about 4 years ago.

Status:
New
Severity:
Normal
Assignee:
-
Category:
Plugins/Add-Ons
Target version:
-
Start date:
11/02/2016
% Done:

0%

Version:
Platform:
OSX
Expansion:
Core Game
Language:
English (US)
Mod Related:
No
Votes:
Arrow u r green
Arrow d r red

Description

Parts that implement the IPartMassModifier interface have a GetModuleMass method which is expected to be called on the schedule specified by GetModuleMassChangeWhen. However, the method is called constantly even when GetModuleMassChangeWhen returns ModifierChangeWhen.FIXED or ModifierChangeWhen.STAGED. Based on the documentation, when using the FIXED schedule, the method should only be called once – when a vehicle is brought to the launch pad or runway. Similarly, on the STAGED schedule it should only be called immediately before and immediately after each staging event.

I have observed this behavior in both 1.2 and 1.2.1.

History

#1 Updated by rspeed about 7 years ago

This behavior is still present in 1.2.2.

#2 Updated by rspeed about 4 years ago

  • Version changed from 1.2.1 to 1.9.1
  • Expansion Core Game added

This is still happening in 1.9.1. Here's the stack trace:

SpeedyRockets.ModuleSpeedyBallast:GetModuleMass(Single, ModifierStagingSituation)
Part:UpdateMass()
Part:FixedUpdate()

Why is FixedUpdate calling UpdateMass? Isn't the entire point of that to not call it?

Also available in: Atom PDF