From 83ccd72798e672ce4a2de8fa0f52972d83edb6f0 Mon Sep 17 00:00:00 2001 From: Matei Date: Tue, 24 Jan 2006 11:08:53 +0000 Subject: [PATCH] Tiny fix to the "unit AI" in the damage event handler to make ranged units fight back when attacked. This was SVN commit r3423. --- binaries/data/mods/official/entities/template_entity_script.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/binaries/data/mods/official/entities/template_entity_script.js b/binaries/data/mods/official/entities/template_entity_script.js index ad006318e1..355a94f05d 100644 --- a/binaries/data/mods/official/entities/template_entity_script.js +++ b/binaries/data/mods/official/entities/template_entity_script.js @@ -577,7 +577,7 @@ function damage( dmg, inflictor ) // You know, I think this is quite possibly the first AI code the AI divlead has written // for 0 A.D.... if( this.isIdle() ) - this.order( ORDER_GENERIC, inflictor, ACTION_ATTACK ); + this.order( ORDER_GENERIC, inflictor, getAttackAction( this, inflictor ) ); } }