forked from 0ad/0ad
add rally points for the AIs
This was SVN commit r15338.
This commit is contained in:
parent
e3f3051b2a
commit
350d4a6b7e
@ -818,6 +818,17 @@ m.Entity = m.Class({
|
||||
return this;
|
||||
},
|
||||
|
||||
setRallyPoint: function(target, command) {
|
||||
var data = {"command": command, "target": target.id()};
|
||||
Engine.PostCommand(PlayerID, {"type": "set-rallypoint", "entities": [this.id()], "x": target.position()[0], "z": target.position()[1], "data": data});
|
||||
return this;
|
||||
},
|
||||
|
||||
unsetRallyPoint: function() {
|
||||
Engine.PostCommand(PlayerID, {"type": "unset-rallypoint", "entities": [this.id()]});
|
||||
return this;
|
||||
},
|
||||
|
||||
train: function(type, count, metadata)
|
||||
{
|
||||
var trainable = this.trainableEntities();
|
||||
|
Loading…
Reference in New Issue
Block a user