diff options
| author | Paweł Redman <pawel.redman@gmail.com> | 2018-04-19 18:50:39 +0200 | 
|---|---|---|
| committer | Paweł Redman <pawel.redman@gmail.com> | 2018-04-19 18:50:39 +0200 | 
| commit | fade55e67e1a6944461c16c1495dea9546243756 (patch) | |
| tree | 6fd02d2f6ba1b28b98ac62e4fe51064c4bfede28 /src/game/unit_spider.cpp | |
| parent | aea9498a593321a3cb34fa93d3d4734ebd8370c1 (diff) | |
Improve the hivemind.
Diffstat (limited to 'src/game/unit_spider.cpp')
| -rw-r--r-- | src/game/unit_spider.cpp | 12 | 
1 files changed, 7 insertions, 5 deletions
diff --git a/src/game/unit_spider.cpp b/src/game/unit_spider.cpp index 5d6253d..7d4d0a1 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, target->x); +		hivemind_attack(this, true, target->x);  	have_target = true;  	wake_time = game->time; @@ -103,14 +103,16 @@ void unit_spider_t::on_damage(unit_t *attacker)  {  	assets::spider.sounds.play_3d(x); -	if (!attacker) -		return; - -	hivemind_attack(this, attacker->x); +	if (attacker) +		hivemind_attack(this, true, attacker->x); +	else +		hivemind_attack(this, false, v2f_t(0, 0));  }  void unit_spider_t::on_death(void)  { +	hivemind_attack(this, false, v2f_t(0, 0)); +  	if (health < -5) {  		assets::soldier.gib_sound.play_3d(x);  		game->deletion_list.insert(this);  | 
