Jump to content

Masts sinking effects do not appear.


Hornete
  • Pending

1913383396_GIF11-29-20216-04-39PM.gif.e7adf7691c134dcd13648f542e20875a.gif

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.

  • Like 2
  • Sad Dupe 1
  • Potato Cup 1



User Feedback


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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
  • Create New...