From 1867e71ac2870f904e0856fd3b093abed6e8a58b Mon Sep 17 00:00:00 2001 From: quou Date: Sun, 7 May 2023 12:56:44 +1000 Subject: Fix a crash. --- bullet.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'bullet.c') diff --git a/bullet.c b/bullet.c index b3182ea..a205e4f 100644 --- a/bullet.c +++ b/bullet.c @@ -62,13 +62,10 @@ Entity new_player_bullet( sprid = sprite_player_bullet_down; col->w = 9 << fbits; col->h = 14 << fbits; + } else { + destroy_entity(world, e); + return -1; } -#ifdef DEBUG - else { - platform_log("Player bullets must have velocity\n"); - platform_abort(error_gameplay_error); - } -#endif init_csprite(sprite, sprid); -- cgit v1.2.3-54-g00ecf