Ticket #3142: ticket3142.diff
File ticket3142.diff, 1.0 KB (added by , 9 years ago) |
---|
-
binaries/data/mods/public/simulation/components/ProductionQueue.js
542 542 var ent = Engine.AddEntity(templateName); 543 543 this.entityCache.push(ent); 544 544 545 var cmpNewOwnership = Engine.QueryInterface(ent, IID_Ownership); 546 cmpNewOwnership.SetOwner(cmpOwnership.GetOwner()); 547 545 548 // Decrement entity count in the EntityLimits component 546 549 // since it will be increased by EntityLimits.OnGlobalOwnershipChanged function, 547 550 // i.e. we replace a 'trained' entity to an 'alive' one … … 566 569 for (var i = 0; i < count; ++i) 567 570 { 568 571 var ent = this.entityCache[0]; 569 var cmpNewOwnership = Engine.QueryInterface(ent, IID_Ownership);570 cmpNewOwnership.SetOwner(cmpOwnership.GetOwner());571 572 572 573 if (cmpAutoGarrison && cmpAutoGarrison.PerformGarrison(ent)) 573 574 {