- Timestamp:
- 06/09/11 18:41:55 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
ps/trunk/binaries/data/mods/public/simulation/components/UnitAI.js
r9595 r9601 1089 1089 this.template.NaturalBehaviour == "passive") 1090 1090 { 1091 this.MoveToTargetRangeExplicit(msg.data.attacker, +this.template.FleeDistance, +this.template.FleeDistance); 1092 this.Flee(msg.data.attacker); 1091 this.Flee(msg.data.attacker, false); 1093 1092 } 1094 1093 else if (this.template.NaturalBehaviour == "violent" || … … 1097 1096 { 1098 1097 if (this.CanAttack(msg.data.attacker)) 1099 this. ReplaceOrder("Attack", { "target": msg.data.attacker });1098 this.Attack(msg.data.attacker, false); 1100 1099 } 1101 1100 }, … … 1159 1158 if (msg.data.added.length > 0) 1160 1159 { 1161 this.MoveToTargetRangeExplicit(msg.data.added[0], +this.template.FleeDistance, +this.template.FleeDistance); 1162 this.Flee(msg.data.added[0]); 1160 this.Flee(msg.data.added[0], false); 1163 1161 return; 1164 1162 } … … 1204 1202 if (msg.data.added.length > 0) 1205 1203 { 1206 this.MoveToTargetRangeExplicit(msg.data.added[0], +this.template.FleeDistance, +this.template.FleeDistance); 1207 this.Flee(msg.data.added[0]); 1204 this.Flee(msg.data.added[0], false); 1208 1205 return; 1209 1206 }
Note:
See TracChangeset
for help on using the changeset viewer.
