summaryrefslogtreecommitdiff
path: root/src/game/unit_soldier.cpp
diff options
context:
space:
mode:
authorPaweł Redman <pawel.redman@gmail.com>2018-04-13 12:17:34 +0200
committerPaweł Redman <pawel.redman@gmail.com>2018-04-13 12:17:34 +0200
commit2cada8d93653324cb90fc81d4eb670bab9af089a (patch)
treefd964a42030d95eecf720b710f1a3ae8c81ef876 /src/game/unit_soldier.cpp
parent7159afab99b130e7f3c5560765dded6c861f6c3b (diff)
Better explosion graphics.
Diffstat (limited to 'src/game/unit_soldier.cpp')
-rw-r--r--src/game/unit_soldier.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/game/unit_soldier.cpp b/src/game/unit_soldier.cpp
index f4432bf..c6ed4dd 100644
--- a/src/game/unit_soldier.cpp
+++ b/src/game/unit_soldier.cpp
@@ -85,7 +85,8 @@ void unit_soldier_t::shoot(v2f_t aim)
end = x + (aim - x).norm() * 40;
trace = world->ray_v_all(x, end, CF_SOLID|CF_BODY|CF_BODY_SMALL, this);
- if (trace.hit && trace.ent && trace.ent->type == ET_UNIT) {
+ if (!manual_firing && trace.hit &&
+ trace.ent && trace.ent->type == ET_UNIT) {
unit_t *unit = dynamic_cast<unit_t*>(trace.ent);
// Refuse to shoot friendlies.
@@ -98,7 +99,7 @@ void unit_soldier_t::shoot(v2f_t aim)
tracer = new fx_tracer_t(game, muzzle_point, trace.end);
tracer->place(&game->world);
- flash = new fx_flash_t(game, muzzle_point, 5.0f);
+ flash = new fx_flash_t(game, muzzle_point, 5.0f, sf::Color(255, 170, 50, 80));
flash->place(&game->world);
last_attack = game->now;