diff options
author | Paweł Redman <pawel.redman@gmail.com> | 2018-04-13 17:32:04 +0200 |
---|---|---|
committer | Paweł Redman <pawel.redman@gmail.com> | 2018-04-13 17:32:04 +0200 |
commit | 93ab25508f68481f307ec19f3f7459b2ea54f8b4 (patch) | |
tree | a9c0382f3c8cb527bfb968291a845d37c1edf231 /src/game/game.cpp | |
parent | a055c2aa0aba2a3b80a37c49f3f89cc64d86abd6 (diff) |
Let rockets destroy decos.
Diffstat (limited to 'src/game/game.cpp')
-rw-r--r-- | src/game/game.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/game/game.cpp b/src/game/game.cpp index 03033fb..547d890 100644 --- a/src/game/game.cpp +++ b/src/game/game.cpp @@ -416,25 +416,22 @@ void state_t::explosion(v2f_t x) explosion = new fx_explosion_t(this, x); explosion->place(&world); - for (size_t i = 0; i < 30; i++) { + for (size_t i = 0; i < 60; i++) { v2f_t end; world::trace_t trace; entity_t *ent; int damage; end = x + prng.unit_vec2() * 6.0f; - trace = world.ray_v_all(x, end, CF_SOLID|CF_BODY|CF_BODY_SMALL, NULL); + trace = world.ray_v_all(x, end, CF_SOLID|CF_BODY|CF_BODY_SMALL|CF_DECOS, nullptr); if (!trace.hit) continue; if (!trace.ent) continue; - if (trace.ent->type != ET_UNIT) - continue; - - ent = dynamic_cast<unit_t*>(trace.ent); - damage = pow(1 - trace.frac, 2.0f) * 40.0f; + ent = dynamic_cast<entity_t*>(trace.ent); + damage = pow(1 - trace.frac, 2.0f) * 20.0f; ent->damage(damage, nullptr); } } |