Jump to content

Charcoal is spawned in interior limbo instead when players is out of interior.


KXWl1
  • DLC VERSION - IMPORTANT!: Hamlet Fixed

Charcoal is spawned in interior limbo instead from a extinguished max-fuel campfire/fire pit when players is out of interior.

The following code I used can fix the bug:

For Campfire:

				    if inst.queued_charcoal then
						if inst.interior then
						    local charcoal = SpawnPrefab("charcoal")
                            charcoal.Transform:SetPosition(inst.Transform:GetWorldPosition())
						    charcoal.Physics:SetVel(math.random()*math.cos(math.random()*2*PI), GetRandomWithVariance(12, 3), math.random()*math.sin(math.random()*2*PI))
							GetInteriorSpawner():AddPrefabToInterior(charcoal, inst.interior)
						else
						    SpawnPrefab("charcoal").Transform:SetPosition(inst.Transform:GetWorldPosition())
						end
			            inst.queued_charcoal = nil                        
					else
					    SpawnPrefab("ash").Transform:SetPosition(inst.Transform:GetWorldPosition())
					end

For Fire Pit of any kind:

				    if inst.queued_charcoal then
						if inst.interior then
						    local charcoal = SpawnPrefab("charcoal")
						    charcoal.Transform:SetPosition(inst.Transform:GetWorldPosition())
							charcoal.Physics:SetVel(math.random()*math.cos(math.random()*2*PI), GetRandomWithVariance(12, 3), math.random()*math.sin(math.random()*2*PI))
					        GetInteriorSpawner():AddPrefabToInterior(charcoal, inst.interior)
						else
						    inst.components.lootdropper:SpawnLootPrefab("charcoal")
				      end
						inst.queued_charcoal = nil
					end

(For Obsidian Fire pit, needing:

for i=1,2 do
...
end

)

 


Steps to Reproduce

1. Build campfire / fire pit of any kind in a interior.

2. Fuel the fire to max level.

3. Player leave the interior.

4. Wait for the fire extinguished.

5. Enter the interior, no Charcoal appears (it spawns in the void instead)




User Feedback


A developer has marked this issue as fixed. This means that the issue has been addressed in the current development build and will likely be in the next update.


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...