diff --git a/src/enemy.c b/src/enemy.c index 3ca0a7c1..5e273d6f 100644 --- a/src/enemy.c +++ b/src/enemy.c @@ -287,7 +287,11 @@ bool enemy_is_targetable(Enemy *enemy) { } bool enemy_in_viewport(Enemy *enemy) { - double s = 60; // TODO: make this adjustable + // FIXME: Ideally this is supposed to be the size of the visual, as in with projectiles, but + // we don't have access to this information here. + real base = 60; + + real s = base + enemy->max_viewport_dist; return creal(enemy->pos) >= -s && diff --git a/src/enemy.h b/src/enemy.h index dd090e2a..692d5efc 100644 --- a/src/enemy.h +++ b/src/enemy.h @@ -112,6 +112,8 @@ DEFINE_ENTITY_TYPE(Enemy, { float hit_radius; float hurt_radius; + float max_viewport_dist; + bool moving; IF_ENEMY_DEBUG(