diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/game/rocket.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
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; } |