From 0ce82e23bdea8f8399c8a5f51d554e586be9369b Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Tue, 7 Nov 2017 13:09:57 +0100 Subject: [PATCH] fixed the Compass in Gans/ortho projection --- shmup.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shmup.cpp b/shmup.cpp index 8adcdce1..b79279a4 100644 --- a/shmup.cpp +++ b/shmup.cpp @@ -12,7 +12,7 @@ namespace shmupballs { int xmove, xfire, yb, rad; void calc() { - rad = vid.radius * (vid.mobilecompasssize ? vid.mobilecompasssize : 14) / 100; + rad = min(vid.radius, min(vid.xres, vid.yres) / 2) * (vid.mobilecompasssize ? vid.mobilecompasssize : 14) / 100; xmove = max(vid.xcenter - vid.radius - rad, rad); xfire = min(vid.xcenter + vid.radius + rad, vid.xres - rad); yb = vid.ycenter + vid.radius - rad;