aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorquou <quou@disroot.org>2023-05-07 12:56:44 +1000
committerquou <quou@disroot.org>2023-05-07 12:56:50 +1000
commit1867e71ac2870f904e0856fd3b093abed6e8a58b (patch)
treece5458702674aaa0cdb1830dabe58615039af4bb
parent5f341eacdf0d75a4b334969a2d8a4701d61e4d9e (diff)
Fix a crash.
-rw-r--r--bullet.c9
1 files changed, 3 insertions, 6 deletions
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);