Skip to content

Commit b5c2a9f

Browse files
committed
Fix #401: Fix some RPM bugs
-fix missing vessel icons -support all 4 map types thanks @vulkans22 for providing these fixes!
1 parent 727074b commit b5c2a9f

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

SCANsat/SCAN_UI/SCANsatRPM.cs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ public bool MapRenderer(RenderTexture screen, float cameraAspect)
203203
}
204204
screenWidth = screen.width;
205205
screenHeight = screen.height;
206-
iconMaterial = new Material(Shader.Find("KSP/Alpha/Unlit Transparent"));
206+
iconMaterial = new Material(Shader.Find("KSP/Alpha/Cutoff"));
207207

208208
screenSpace = new Rect(0, 0, screenWidth, screenHeight);
209209

@@ -602,12 +602,10 @@ public void ButtonProcessor(int buttonID)
602602

603603
private void ChangeMapMode(bool up)
604604
{
605+
int mapTypeCount = SCANmapType.mapTypeNames.Length;
605606
mapMode += up ? 1 : -1;
607+
mapMode = (mapMode + mapTypeCount) % mapTypeCount;
606608

607-
if (mapMode > 2)
608-
mapMode = 0;
609-
if (mapMode < 0)
610-
mapMode = 2;
611609
if (satModuleFound)
612610
persist.RPMMode = mapMode;
613611
RedrawMap();

0 commit comments

Comments
 (0)