cepheid

An Aurora 4X clone
Log | Files | Refs | README

commit cd7dbae273e61c6826f04956a324576833217825
parent 8790dc184246ecace163e03412ddc0e9b1c56d7c
Author: hhvn <dev@hhvn.uk>
Date:   Sun,  4 Sep 2022 17:08:35 +0100

Fix hiding of bodies when radius is smaller than parent

Diffstat:
Msrc/ui/main.c | 4+++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/ui/main.c b/src/ui/main.c @@ -173,7 +173,9 @@ draw_body(Body *body) { else w = min_body_rad[body->type]; - if (body->parent && body->type != BODY_COMET && body->dist / view_main.kmperpx < w) + if (body->parent && body->type != BODY_COMET && + body->dist / view_main.kmperpx < + min_body_rad[body->parent->type]) return; ui_draw_circle(body->pxloc.x, body->pxloc.y, w, col_body[body->type]);