Skip to content

Commit

Permalink
Merge pull request #71 from BobPalmer/DEVELOP
Browse files Browse the repository at this point in the history
0.8.2
  • Loading branch information
BobPalmer authored Oct 16, 2016
2 parents 04a8e3f + 380abda commit 4b7c155
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 2 deletions.
4 changes: 4 additions & 0 deletions FOR_RELEASE/GameData/000_USITools/CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
0.8.2 - 2016.10.16
------------------
Made the nuclear pulse engine atmospheric nerf optional

0.8.1 - 2016.10.15
------------------
Fixed an issue that was causing swappable converters to shut down
Expand Down
Binary file modified FOR_RELEASE/GameData/000_USITools/USITools.dll
Binary file not shown.
Binary file modified FOR_RELEASE/GameData/000_USITools/USITools.dll.mdb
Binary file not shown.
Binary file modified FOR_RELEASE/GameData/000_USITools/USITools.pdb
Binary file not shown.
2 changes: 1 addition & 1 deletion FOR_RELEASE/GameData/000_USITools/USITools.version
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"VERSION":{
"MAJOR":0,
"MINOR":8,
"PATCH":1,
"PATCH":2,
"BUILD":0
},
"KSP_VERSION":{
Expand Down
7 changes: 6 additions & 1 deletion USITools/USITools/EnginesAndTanks/USI_PulseDrive.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ public class USI_PulseDrive : PartModule
[KSPField]
public float animationSpeed;

[KSPField]
public bool atmosphereNerf = false;

[KSPField(guiActive = true)]
public string Fuel = "none";

Expand Down Expand Up @@ -183,7 +186,9 @@ public override void OnFixedUpdate()
if(Planetarium.GetUniversalTime() - lastCheck < minPulseTime)
{
var curveTime = (float) (Planetarium.GetUniversalTime() - lastCheck)/(float) minPulseTime;
float atmoModifier = (float)Math.Max(0,1d - vessel.atmDensity);
var atmoModifier = 0f;
if(atmosphereNerf)
atmoModifier = (float)Math.Max(0, 1d - vessel.atmDensity);
var thrustAmount = (float) (currentThrust*pulseCurve.Evaluate(curveTime)) * atmoModifier;

part.GetComponent<Rigidbody>().AddForceAtPosition(-t.forward * thrustAmount, t.position, ForceMode.Force);
Expand Down

0 comments on commit 4b7c155

Please sign in to comment.