Jump to content

perishable component doesn't force-use world temperature when entity is inside a pocket dimension


hoxi
  • Fixed

This is happening in the Update function.

It should probably be doing something like this, from the temperature component:

local inside_pocket_container = owner ~= nil and owner:HasTag("pocketdimension_container")

local ambient_temperature = inside_pocket_container and TheWorld.state.temperature or GetTemperatureAtXZ(x, z)

There might be other cases where this needs to apply as well.

Also, by defining the temperature once with a local, you will prevent GetTemperatureAtXZ(pos.x, pos.z) from being called 3 times in that same block of code, as it's currently doing so. This might've been a decent source of performance tanking prior to the optimizations for the temperatureoverrider component in the last patch, and would obviously be a good improvement to add.


Steps to Reproduce

Given that the temperature component has pocket dimension check, I assume this can be reproduced, and it's pretty straightforward just from the explanation.




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.

Nice, thank you! I'll make a new report if I find other cases with this issue or similar, and try to get them all in a single one.

Share this comment


Link to comment
Share on other sites



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