From 93ab25508f68481f307ec19f3f7459b2ea54f8b4 Mon Sep 17 00:00:00 2001 From: Paweł Redman Date: Fri, 13 Apr 2018 17:32:04 +0200 Subject: Let rockets destroy decos. --- src/game/game.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'src/game/game.cpp') 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(trace.ent); - damage = pow(1 - trace.frac, 2.0f) * 40.0f; + ent = dynamic_cast(trace.ent); + damage = pow(1 - trace.frac, 2.0f) * 20.0f; ent->damage(damage, nullptr); } } -- cgit