forked from 0ad/0ad
Revert UnitAI changes of 79fb493da3
(besides the patrol comment) and use an exotic template instead.
The originally intended approach to support move-orders independent of the Identity classes can be discussed in an independent proposal. Reviewed By: fatherbushido Differential Revision: https://code.wildfiregames.com/D176 This was SVN commit r19323.
This commit is contained in:
parent
19f9fa17fa
commit
cd6c31e76e
@ -1,6 +1,6 @@
|
|||||||
const debugLog = false;
|
const debugLog = false;
|
||||||
|
|
||||||
var attackerTemplate = "gaia/fauna_wolf_snow";
|
var attackerTemplate = "trigger/fauna_wolf_snow_domestic";
|
||||||
|
|
||||||
var minWaveSize = 1;
|
var minWaveSize = 1;
|
||||||
var maxWaveSize = 3;
|
var maxWaveSize = 3;
|
||||||
|
@ -182,7 +182,8 @@ UnitAI.prototype.UnitFsmSpec = {
|
|||||||
|
|
||||||
// Called when being told to walk as part of a formation
|
// Called when being told to walk as part of a formation
|
||||||
"Order.FormationWalk": function(msg) {
|
"Order.FormationWalk": function(msg) {
|
||||||
if (this.IsTurret())
|
// Let players move captured domestic animals around
|
||||||
|
if (this.IsAnimal() && !this.IsDomestic() || this.IsTurret())
|
||||||
{
|
{
|
||||||
this.FinishOrder();
|
this.FinishOrder();
|
||||||
return;
|
return;
|
||||||
@ -254,7 +255,8 @@ UnitAI.prototype.UnitFsmSpec = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
"Order.Walk": function(msg) {
|
"Order.Walk": function(msg) {
|
||||||
if (this.IsTurret())
|
// Let players move captured domestic animals around
|
||||||
|
if (this.IsAnimal() && !this.IsDomestic() || this.IsTurret())
|
||||||
{
|
{
|
||||||
this.FinishOrder();
|
this.FinishOrder();
|
||||||
return;
|
return;
|
||||||
@ -282,7 +284,8 @@ UnitAI.prototype.UnitFsmSpec = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
"Order.WalkAndFight": function(msg) {
|
"Order.WalkAndFight": function(msg) {
|
||||||
if (this.IsTurret())
|
// Let players move captured domestic animals around
|
||||||
|
if (this.IsAnimal() && !this.IsDomestic() || this.IsTurret())
|
||||||
{
|
{
|
||||||
this.FinishOrder();
|
this.FinishOrder();
|
||||||
return;
|
return;
|
||||||
@ -308,7 +311,8 @@ UnitAI.prototype.UnitFsmSpec = {
|
|||||||
|
|
||||||
|
|
||||||
"Order.WalkToTarget": function(msg) {
|
"Order.WalkToTarget": function(msg) {
|
||||||
if (this.IsTurret())
|
// Let players move captured domestic animals around
|
||||||
|
if (this.IsAnimal() && !this.IsDomestic() || this.IsTurret())
|
||||||
{
|
{
|
||||||
this.FinishOrder();
|
this.FinishOrder();
|
||||||
return;
|
return;
|
||||||
@ -511,7 +515,7 @@ UnitAI.prototype.UnitFsmSpec = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
"Order.Patrol": function(msg) {
|
"Order.Patrol": function(msg) {
|
||||||
if (this.IsTurret())
|
if (this.IsAnimal() || this.IsTurret())
|
||||||
{
|
{
|
||||||
this.FinishOrder();
|
this.FinishOrder();
|
||||||
return;
|
return;
|
||||||
|
@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Entity parent="gaia/fauna_wolf_snow">
|
||||||
|
<Identity>
|
||||||
|
<Classes datatype="tokens">Domestic</Classes>
|
||||||
|
</Identity>
|
||||||
|
</Entity>
|
Loading…
Reference in New Issue
Block a user