https://bugs.kerbalspaceprogram.com/https://bugs.kerbalspaceprogram.com/favicon.ico?15601711372016-06-07T03:31:25ZSquad BugtrackerKerbal Space Program - Bug #9865: Having a const field on a PartModule on the root part causes physics to breakhttps://bugs.kerbalspaceprogram.com/issues/9865?journal_id=445822016-06-07T03:31:25Zblowfish
<ul></ul><p>I guess it's not strictly necessary to use BindingFlags.NonPublic, since private and protected fields won't be copied as it is, but it would probably save a bit of headache in some cases, since you are really trying to duplicate the object.</p> Kerbal Space Program - Bug #9865: Having a const field on a PartModule on the root part causes physics to breakhttps://bugs.kerbalspaceprogram.com/issues/9865?journal_id=481212016-07-17T09:56:59ZTriggerAu
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>Needs Clarification</i></li></ul> Kerbal Space Program - Bug #9865: Having a const field on a PartModule on the root part causes physics to breakhttps://bugs.kerbalspaceprogram.com/issues/9865?journal_id=483042016-07-17T20:45:11Zblowfish
<ul></ul><p>@TriggerAU</p>
<p>Is there any thing specific that needs clarifying? The issue is that having a constant defined on a PartModule, then using that module, causes a physics-breaking exception.</p>
<pre>
public class MyModule : PartModule
{
public const int ConstInt = 5;
// ...
}
</pre>
<p>Using this PartModule would cause the exception.</p> Kerbal Space Program - Bug #9865: Having a const field on a PartModule on the root part causes physics to breakhttps://bugs.kerbalspaceprogram.com/issues/9865?journal_id=483222016-07-17T21:22:10Zblowfish
<ul><li><strong>Status</strong> changed from <i>Needs Clarification</i> to <i>Closed</i></li><li><strong>% Done</strong> changed from <i>0</i> to <i>100</i></li></ul><p>Moving to Modders' Corner tracker and closing</p>