Ticket #1046: 1046.3.patch
File 1046.3.patch, 1.9 KB (added by , 9 years ago) |
---|
-
binaries/data/mods/public/gui/session/unit_actions.js
560 560 data.target = targetState.id; 561 561 cursor = "action-repair"; 562 562 } 563 else if (playerCheck(entState, targetState, ["Enemy"])) 564 { 565 data.allowCapture = false; 566 data.target = targetState.id; 567 data.command = "attack"; 568 569 if (hasClass(targetState, "Unit")) 570 { 571 cursor = "action-attack"; 572 } 573 else if (hasClass(targetState, "Structure")) 574 { 575 if (targetState.foundation) 576 { 577 cursor = "action-attack"; 578 } 579 else 580 { 581 cursor = "action-capture"; 582 data.allowCapture = true; 583 } 584 } 585 } 563 586 564 587 // Don't allow the rally point to be set on any of the currently selected entities (used for unset) 565 588 // except if the autorallypoint hotkey is pressed and the target can produce entities -
binaries/data/mods/public/simulation/helpers/RallyPointCommands.js
70 70 "queued": true 71 71 }); 72 72 break; 73 case "attack": 74 { 75 var cmpUnitAI = Engine.QueryInterface(data[i].target, IID_UnitAI); 76 if (cmpUnitAI.CheckTargetVisible(data[i].target) && cmpUnitAI.TargetIsAlive(data[i].target)) 77 ret.push( { 78 "type": "attack", 79 "entities": spawnedEnts, 80 "target": data[i].target, 81 "allowCapture": data[i].allowCapture, 82 "queued": true, 83 }); 84 break; 85 } 73 86 case "trade": 74 87 ret.push( { 75 88 "type": "setup-trade-route",