Masts unfortunately seem to no longer have their sinking effect when the boat they are on is destroyed.
function Mast:OnRemoveEntity() local mast_sinking if self.boat ~= nil and self.sink_fx ~= nil then mast_sinking = SpawnPrefab(self.sink_fx) else mast_sinking = SpawnPrefab("collapse_small") end if mast_sinking ~= nil then local x_pos, y_pos, z_pos = self.inst.Transform:GetWorldPosition() mast_sinking.Transform:SetPosition(x_pos, y_pos, z_pos) end if self ~= nil then self:SetBoat(nil) end end
This is likely because self.boat becomes nil when the boat is destroyed, and so, the collapse_small prefab spawns.
self.OnBoatRemoved = function() self.boat = nil end
Steps to Reproduce
1. Destroy a boat with masts on it
2. Notice there are no sink effects from the masts.
- 2
- 1
- 1
There are no comments to display.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now