Fix missing collision for charger, spawner, and laser turret

All three new entity types were absent from the hardcoded enemy-type
checks in is_enemy() (contact damage + projectile hits), homing
projectile targeting, and drone targeting. Also adds proper death
particle colors for charger (orange) and spawner (purple).
This commit is contained in:
Thomas
2026-03-02 20:50:44 +00:00
parent 5f899f61c6
commit 196b4f35b9
3 changed files with 12 additions and 4 deletions

View File

@@ -251,7 +251,9 @@ static void projectile_update(Entity *self, float dt, const Tilemap *map) {
/* Player bullets target enemies, enemy bullets target player */
if (is_player_proj) {
if (e->type != ENT_ENEMY_GRUNT && e->type != ENT_ENEMY_FLYER) continue;
if (e->type != ENT_ENEMY_GRUNT && e->type != ENT_ENEMY_FLYER &&
e->type != ENT_TURRET && e->type != ENT_ENEMY_CHARGER &&
e->type != ENT_SPAWNER && e->type != ENT_LASER_TURRET) continue;
} else {
if (e->type != ENT_PLAYER) continue;
}