diff options
author | Paweł Redman <pawel.redman@gmail.com> | 2018-04-20 17:46:08 +0200 |
---|---|---|
committer | Paweł Redman <pawel.redman@gmail.com> | 2018-04-20 17:46:08 +0200 |
commit | c916f71c619017b88b9f792d7e002fb01588e4d5 (patch) | |
tree | fee97f21d47d5858ff102e92fb3405e122271251 /src/game | |
parent | 99486e14e2b39aecec5dcad784e5557778da5320 (diff) |
Rocket splashes.
Diffstat (limited to 'src/game')
-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; } |