Opened 15 months ago
Closed 15 months ago
#6727 closed defect (fixed)
Rally point relics
Reported by: | Langbart | Owned by: | Freagarach |
---|---|---|---|
Priority: | Should Have | Milestone: | Alpha 27 |
Component: | UI & Simulation | Keywords: | |
Cc: | Patch: | Phab:D4933 |
Description
to reproduce
- start a map with some relics
# command line pyrogenesis -autostart-size=128 -autostart="random/mainland" -autostart-victory=capture_the_relic -autostart-reliccount=14
- train a horse in your
CivicCenter
- set the rally point from the
CivicCenter
to a relic - notice the horse will not move to the relic after it has been trained
bisect
Attachments (2)
Change History (6)
by , 15 months ago
by , 15 months ago
Attachment: | broken.gif added |
---|
comment:1 by , 15 months ago
comment:2 by , 15 months ago
possible solution ?
-
binaries/data/mods/public/simulation/components/UnitAI.js
a b UnitAI.prototype.Attack = function(target, allowCapture = this.DEFAULT_CAPTURE, 5502 5502 this.WalkToTarget(target, queued, pushFront); 5503 5503 return; 5504 5504 } 5505 let cmpHealth = Engine.QueryInterface(target, IID_Health); 5506 if(!cmpHealth) 5507 allowCapture = true 5505 5508 let order = { 5506 5509 "target": target, 5507 5510 "force": true,
Alternative via unit_actions.js:set-rally-point
- Phabricator diff/21540/
-
binaries/data/mods/public/gui/session/unit_actions.js
a b var g_UnitActions = 1199 1199 data.target = targetState.id; 1200 1200 cursor = "action-repair"; 1201 1201 } 1202 else if (targetState && !targetState.identity.canDelete) 1203 { 1204 data.target = targetState.id; 1205 data.command = "capture"; 1206 cursor = "action-capture"; 1207 } 1202 1208 else if (targetState && playerCheck(entState, targetState, ["Enemy"])) 1203 1209 { 1204 1210 data.target = targetState.id; -
binaries/data/mods/public/simulation/helpers/Commands.js
a b var g_Commands = { 203 203 }); 204 204 }, 205 205 206 "capture": function(player, cmd, data) 207 { 208 GetFormationUnitAIs(data.entities, player, cmd, data.formation).forEach(cmpUnitAI => { 209 cmpUnitAI.Attack(cmd.target, true, cmd.queued, cmd.pushFront); 210 }); 211 }, 212 206 213 "patrol": function(player, cmd, data) 207 214 { 208 215 GetFormationUnitAIs(data.entities, player, cmd, data.formation).forEach(cmpUnitAI => -
binaries/data/mods/public/simulation/helpers/RallyPointCommands.js
a b function GetRallyPointCommands(cmpRallyPoint, spawnedEnts) 102 102 "queued": true, 103 103 }); 104 104 break; 105 case "capture": 106 ret.push({ 107 "type": "capture", 108 "entities": spawnedEnts, 109 "target": data[i].target, 110 "queued": true, 111 }); 112 break; 105 113 case "trade": 106 114 ret.push({ 107 115 "type": "setup-trade-route",
-
comment:3 by , 15 months ago
Owner: | set to |
---|---|
Patch: | → Phab:D4933 |
Note:
See TracTickets
for help on using tickets.
Hmm, this one is annoying. Previously it was allowed to capture, so it did. Now the default is to not capture. Since the catafalque has no cmpHealth, the entity cannot attack and will therefore not walk towards it.
I'll have to think about a fix (maybe some check in
unit_actions.js:set-rally-point
).