Skip to content

Commit 66bc2c4

Browse files
committed
Update ModuleAutoCutDrogue.cs
- Moved if statement for checking if drogue cutting has already happened this frame, would prevent setting triggered to true previously.
1 parent ab4f024 commit 66bc2c4

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

Source/Modules/ModuleAutoCutDrogue.cs

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,17 @@ public void OnDestroy()
5151

5252
private void OnParachuteDeployed(ModuleParachute pChute)
5353
{
54-
if (pChute == chute && !triggered && lastFrame != Time.frameCount)
54+
if (pChute == chute && !triggered)
5555
{
56-
var drogues = vessel.FindPartModulesImplementing<ModuleAutoCutDrogue>().Where(d => d.isDrogueChute && d.chute != null);
57-
foreach (ModuleAutoCutDrogue d in drogues)
56+
if (lastFrame != Time.frameCount)
5857
{
59-
if (IsChuteDeployed(d.chute)) d.chute.CutParachute();
58+
var drogues = vessel.FindPartModulesImplementing<ModuleAutoCutDrogue>().Where(d => d.isDrogueChute && d.chute != null);
59+
foreach (ModuleAutoCutDrogue d in drogues)
60+
{
61+
if (IsChuteDeployed(d.chute)) d.chute.CutParachute();
62+
}
63+
lastFrame = Time.frameCount;
6064
}
61-
lastFrame = Time.frameCount;
6265
triggered = true;
6366
}
6467
}

0 commit comments

Comments
 (0)