I couldnt find out why the hive created the cybran decal on seraphim structures, It was too complicated. So I stopped the glitch by preventing the decals for seraphim buildings from appearing before completion. Also, now any faction engineers can assist seraphim construction just like normal seraphim engineers; the proper decal appears after the building is done.
I edited /lua/sim/Unit.lua
Original=======================
OnStartBuild = function(self, unitBeingBuilt, order)
if order == 'Repair' then
if unitBeingBuilt.WorkItem ~= self.WorkItem then
self:InheritWork(unitBeingBuilt)
end
self:SetUnitState('Repairing', true)
end
local bp = self:GetBlueprint()
if order ~= 'Upgrade' or bp.Display.ShowBuildEffectsDuringUpgrade then
self:StartBuildingEffects(unitBeingBuilt, order)
end
self:SetActiveConsumptionActive()
self:DoOnStartBuildCallbacks(unitBeingBuilt)
self:PlayUnitSound('Construct')
self:PlayUnitAmbientSound('ConstructLoop')
if bp.General.UpgradesTo and unitBeingBuilt:GetUnitId() == bp.General.UpgradesTo and order == 'Upgrade' then
unitBeingBuilt.DisallowCollisions = true
unitBeingBuilt:SetCanTakeDamage(false)
end
if unitBeingBuilt:GetBlueprint().Physics.FlattenSkirt and not unitBeingBuilt:HasTarmac() then
if self.TarmacBag and self:HasTarmac() then
unitBeingBuilt:CreateTarmac(true, true, true, self.TarmacBag.Orientation, self.TarmacBag.CurrentBP )
else
unitBeingBuilt:CreateTarmac(true, true, true, false, false)
end
end
end,
EDITED=================================
I edited the CreateTarmac conditions to
OnStartBuild = function(self, unitBeingBuilt, order)
if order == 'Repair' then
if unitBeingBuilt.WorkItem ~= self.WorkItem then
self:InheritWork(unitBeingBuilt)
end
self:SetUnitState('Repairing', true)
end
local bp = self:GetBlueprint()
if order ~= 'Upgrade' or bp.Display.ShowBuildEffectsDuringUpgrade then
self:StartBuildingEffects(unitBeingBuilt, order)
end
self:SetActiveConsumptionActive()
self:DoOnStartBuildCallbacks(unitBeingBuilt)
self:PlayUnitSound('Construct')
self:PlayUnitAmbientSound('ConstructLoop')
if bp.General.UpgradesTo and unitBeingBuilt:GetUnitId() == bp.General.UpgradesTo and order == 'Upgrade' then
unitBeingBuilt.DisallowCollisions = true
unitBeingBuilt:SetCanTakeDamage(false)
end
local bpp = unitBeingBuilt:GetBlueprint()
local FactionName = bpp.General.FactionName
if FactionName == 'Seraphim' and order ~= 'Upgrade' then
else
if unitBeingBuilt:GetBlueprint().Physics.FlattenSkirt and not unitBeingBuilt:HasTarmac() then
if self.TarmacBag and self:HasTarmac() then
unitBeingBuilt:CreateTarmac(true, true, true, self.TarmacBag.Orientation, self.TarmacBag.CurrentBP )
else
unitBeingBuilt:CreateTarmac(true, true, true, false, false)
end
end
end
end,
=======================
So that seraphim buildings initial placement do not create the decal. It is called elsewhere upon completion.
During upgrading the decal is deleted and respawned using this function so i had to exclude it.
See if this is of any help.Statistics: Posted by bamboofats — 11 Jun 2015, 20:59
]]>