summaryrefslogtreecommitdiff
path: root/src/game/unit_spider.cpp
diff options
context:
space:
mode:
authorPaweł Redman <pawel.redman@gmail.com>2018-04-20 14:18:16 +0200
committerPaweł Redman <pawel.redman@gmail.com>2018-04-20 14:18:16 +0200
commit84766a7d49d3c1e233e13191c86d4ada2bbe2ddc (patch)
tree57f733939a9fd9c0cb1c3157da37e90b2c08b547 /src/game/unit_spider.cpp
parent0bc4eaebc6cb4410c5dbf3d89ae02634cfe72e27 (diff)
Refactor and improve the hivemind + better AI debugging.
Diffstat (limited to 'src/game/unit_spider.cpp')
-rw-r--r--src/game/unit_spider.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/game/unit_spider.cpp b/src/game/unit_spider.cpp
index 7d4d0a1..2838a8b 100644
--- a/src/game/unit_spider.cpp
+++ b/src/game/unit_spider.cpp
@@ -53,7 +53,7 @@ void unit_spider_t::target_and_attack(void)
// Tell everyone about a new target.
if (!have_target)
- hivemind_attack(this, true, target->x);
+ game->hivemind_alert(x, 12.0f, true, target->x);
have_target = true;
wake_time = game->time;
@@ -104,14 +104,14 @@ void unit_spider_t::on_damage(unit_t *attacker)
assets::spider.sounds.play_3d(x);
if (attacker)
- hivemind_attack(this, true, attacker->x);
+ game->hivemind_alert(x, 12.0f, true, attacker->x);
else
- hivemind_attack(this, false, v2f_t(0, 0));
+ game->hivemind_alert(x, 12.0f, false, v2f_t(0, 0));
}
void unit_spider_t::on_death(void)
{
- hivemind_attack(this, false, v2f_t(0, 0));
+ game->hivemind_alert(x, 16.0f, false, v2f_t(0, 0));
if (health < -5) {
assets::soldier.gib_sound.play_3d(x);