Skip to content

Commit

Permalink
tgp dlz scale distance adjustment
Browse files Browse the repository at this point in the history
  • Loading branch information
BahamutoD committed Aug 31, 2015
1 parent 1ec9ccf commit c7ab7b2
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions BahaTurret/ModuleTargetingCamera.cs
Original file line number Diff line number Diff line change
Expand Up @@ -792,8 +792,8 @@ void CamWindow(int windowID)
float dlzWidth = 12 * (imageRect.width/360);
float lineWidth = 2;
Rect dlzRect = new Rect(imageRect.x + imageRect.width - (3*dlzWidth) - lineWidth, imageRect.y + (imageRect.height / 4), dlzWidth, imageRect.height / 2);
float scaleDistance = Mathf.Max(8000f, currMissile.maxStaticLaunchRange*2);
float rangeToPixels = (1f / 8000f) * dlzRect.height;
float scaleDistance = Mathf.Max(Mathf.Max(8000f, currMissile.maxStaticLaunchRange*2), targetRange);
float rangeToPixels = (1f / scaleDistance) * dlzRect.height;


GUI.BeginGroup(dlzRect);
Expand Down
Binary file modified BahaTurret/bin/Debug/BahaTurret.dll
Binary file not shown.
Binary file modified BahaTurret/obj/x86/Debug/BahaTurret.dll
Binary file not shown.

0 comments on commit c7ab7b2

Please sign in to comment.