Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/simulation/components/GuiInterface.js
Show First 20 Lines • Show All 1,110 Lines • ▼ Show 20 Lines | GuiInterface.prototype.DisplayRallyPoint = function(player, cmd) | ||||
} | } | ||||
}; | }; | ||||
GuiInterface.prototype.AddTargetMarker = function(player, cmd) | GuiInterface.prototype.AddTargetMarker = function(player, cmd) | ||||
{ | { | ||||
let ent = Engine.AddLocalEntity(cmd.template); | let ent = Engine.AddLocalEntity(cmd.template); | ||||
if (!ent) | if (!ent) | ||||
return; | return; | ||||
let cmpOwnership = Engine.QueryInterface(ent, IID_Ownership); | |||||
if (cmpOwnership) | |||||
cmpOwnership.SetOwner(cmd.owner); | |||||
let cmpPosition = Engine.QueryInterface(ent, IID_Position); | let cmpPosition = Engine.QueryInterface(ent, IID_Position); | ||||
cmpPosition.JumpTo(cmd.x, cmd.z); | cmpPosition.JumpTo(cmd.x, cmd.z); | ||||
}; | }; | ||||
/** | /** | ||||
* Display the building placement preview. | * Display the building placement preview. | ||||
* cmd.template is the name of the entity template, or "" to disable the preview. | * cmd.template is the name of the entity template, or "" to disable the preview. | ||||
* cmd.x, cmd.z, cmd.angle give the location. | * cmd.x, cmd.z, cmd.angle give the location. | ||||
▲ Show 20 Lines • Show All 1,013 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator