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;