summaryrefslogtreecommitdiff
path: root/src/game
diff options
context:
space:
mode:
authorPaweł Redman <pawel.redman@gmail.com>2017-12-15 18:14:40 +0100
committerPaweł Redman <pawel.redman@gmail.com>2017-12-15 18:14:40 +0100
commitade692f3af4c17590c73ad2019a5700c727a9947 (patch)
tree53e36df70bdebdb6cbf86750f1d425c6df6cb63c /src/game
parent6c5bb0dbe21cd173c86ff4264646566da95832bc (diff)
Fix tracers appearing even if there's no LOS.
Diffstat (limited to 'src/game')
-rw-r--r--src/game/units.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/game/units.cpp b/src/game/units.cpp
index d03ce76..236470f 100644
--- a/src/game/units.cpp
+++ b/src/game/units.cpp
@@ -301,12 +301,11 @@ void human_t::think(void)
world::trace_t trace;
fx_tracer_t *tracer;
- tracer = new fx_tracer_t(game, x, target->x);
- game->add_effect(tracer);
- std::cout << tracer->cmodel.bounds << std::endl;
-
trace = world->trace(x, target->x, CF_SOLID);
if (!trace.hit) {
+ tracer = new fx_tracer_t(game, x, target->x);
+ game->add_effect(tracer);
+
last_attack = game->now;
try_attack(target);
}