From 4d94823a1523db6dc218bdc0d86689616c13599d Mon Sep 17 00:00:00 2001 From: quou Date: Wed, 2 Oct 2024 18:47:37 +1000 Subject: Gun special --- world.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'world.c') diff --git a/world.c b/world.c index fc137ee..b1f73ec 100644 --- a/world.c +++ b/world.c @@ -8,6 +8,7 @@ void init_world(World* w) { w->frame = 0; w->freeze = 0; init_player(&w->player); + init_laser(&w->laser); } Particle* inst_particle( @@ -55,6 +56,8 @@ Deathzone* inst_deathzone( void update_world(World* w, const App* a) { int i; + if (w->laser.life) + update_laser(&w->laser); if (w->freeze) { w->freeze--; return; @@ -80,5 +83,7 @@ void ren_world(const World* w, struct Renderer* r) { ren_particle(&w->particles[i], r); for (i = 0; i < w->enemy_count; i++) ren_enemy(&w->enemies[i], r); + if (w->laser.life) + ren_laser(&w->laser, r); ren_hud(w, r); } -- cgit v1.2.3-54-g00ecf