Fix actor being different after foundation has been built.
Reported by: @wowgetoffyourcellphone
Introduced in: 5b3bdf3647
This was SVN commit r25831.
This commit is contained in:
parent
72a20be1df
commit
c6a9e7188e
@ -337,6 +337,12 @@ Foundation.prototype.Build = function(builderEnt, work)
|
||||
|
||||
let building = ChangeEntityTemplate(this.entity, this.finalTemplateName);
|
||||
|
||||
// Make sure the foundation object is the same as the final object.
|
||||
const cmpVisual = Engine.QueryInterface(this.entity, IID_Visual);
|
||||
const cmpBuildingVisual = Engine.QueryInterface(building, IID_Visual);
|
||||
if (cmpVisual && cmpBuildingVisual)
|
||||
cmpBuildingVisual.SetActorSeed(cmpVisual.GetActorSeed());
|
||||
|
||||
if (cmpPlayerStatisticsTracker)
|
||||
cmpPlayerStatisticsTracker.IncreaseConstructedBuildingsCounter(building);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user