From c916f71c619017b88b9f792d7e002fb01588e4d5 Mon Sep 17 00:00:00 2001 From: Paweł Redman Date: Fri, 20 Apr 2018 17:46:08 +0200 Subject: Rocket splashes. --- src/game/rocket.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'src/game') diff --git a/src/game/rocket.cpp b/src/game/rocket.cpp index a03b169..5310922 100644 --- a/src/game/rocket.cpp +++ b/src/game/rocket.cpp @@ -54,12 +54,19 @@ void rocket_t::on_think(void) trace = world->ray_v_all(x, end, CF_SOLID|CF_BODY|CF_BODY_SMALL, shooter); } else { end = target; - trace = world->ray_v_all_p3d(x, end, CF_SOLID|CF_BODY|CF_BODY_SMALL, -1, nullptr); - trace.hit = true; + trace = world->ray_v_all_p3d(x, end, CF_SOLID|CF_BODY|CF_BODY_SMALL, -1, this); } if (trace.hit) { - game->explosion(trace.end); + if (trace.tile && trace.tile->type == TILE_WATER) { + fx_bullet_miss_t *bullet_miss; + + bullet_miss = new fx_bullet_miss_t(game, trace.end, true); + bullet_miss->place(world); + } else { + game->explosion(trace.end); + } + delete this; return; } -- cgit