1 | 1702,1709d1701
|
---|
2 | < if (this.IsAnimal())
|
---|
3 | < {
|
---|
4 | < // come on, no animal approaches intruders in a
|
---|
5 | < // walking pace
|
---|
6 | < var speed = this.GetRunSpeed();
|
---|
7 | < this.SetMoveSpeed(speed);
|
---|
8 | < }
|
---|
9 | <
|
---|
10 | 1713,1720d1704
|
---|
11 | < "HealthChanged": function() {
|
---|
12 | < if (this.IsAnimal())
|
---|
13 | < {
|
---|
14 | < var speed = this.GetRunSpeed();
|
---|
15 | < this.SetMoveSpeed(speed);
|
---|
16 | < }
|
---|
17 | < },
|
---|
18 | <
|
---|
19 | 1725,1728d1708
|
---|
20 | < // so animals will reset their speed
|
---|
21 | < var speed = this.GetWalkSpeed();
|
---|
22 | < this.SetMoveSpeed(speed);
|
---|
23 | <
|
---|
24 | 2008c1988
|
---|
25 | < if ((cmpUnitAI && cmpUnitAI.IsFleeing()) || this.IsAnimal())
|
---|
26 | ---
|
---|
27 | > if (cmpUnitAI && cmpUnitAI.IsFleeing())
|
---|