Ticket #1918: garrisonBug.diff
File garrisonBug.diff, 938 bytes (added by , 11 years ago) |
---|
-
binaries/data/mods/public/gui/session/selection.js
59 59 continue; 60 60 61 61 var templateName = entState.template; 62 // Special handling for garrisoned units 63 if (templateName && templateName.indexOf("&") != -1) 64 var key = templateName; 65 else 66 var key = GetTemplateData(templateName).selectionGroupName || templateName; 62 var template = GetTemplateData(templateName); 63 var key = template.selectionGroupName || templateName; 67 64 65 // Garrisoned units have an extended template 66 var index = templateName.indexOf("&"); 67 if (index != -1 && key.indexOf("&") == -1) 68 key = templateName.slice(0, index+1) + key; 69 68 70 if (this.groups[key]) 69 71 this.groups[key] += 1; 70 72 else