mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2025-01-03 01:19:38 +01:00
Fix potential crash in VisualServer.
This commit is contained in:
parent
2aa3fa0468
commit
39fa5450c2
@ -990,7 +990,7 @@ void VisualServerScene::instance_set_visible(RID p_instance, bool p_visible) {
|
|||||||
instance->visible = p_visible;
|
instance->visible = p_visible;
|
||||||
|
|
||||||
// Special case for physics interpolation, we want to ensure the interpolated data is up to date
|
// Special case for physics interpolation, we want to ensure the interpolated data is up to date
|
||||||
if (instance->scenario->_interpolation_data.interpolation_enabled && p_visible && instance->interpolated && instance->scenario && !instance->on_interpolate_list) {
|
if (instance->scenario && instance->scenario->_interpolation_data.interpolation_enabled && p_visible && instance->interpolated && !instance->on_interpolate_list) {
|
||||||
// Do all the extra work we normally do on instance_set_transform(), because this is optimized out for hidden instances.
|
// Do all the extra work we normally do on instance_set_transform(), because this is optimized out for hidden instances.
|
||||||
// This prevents a glitch of stale interpolation transform data when unhiding before the next physics tick.
|
// This prevents a glitch of stale interpolation transform data when unhiding before the next physics tick.
|
||||||
instance->interpolation_method = TransformInterpolator::find_method(instance->transform_prev.basis, instance->transform_curr.basis);
|
instance->interpolation_method = TransformInterpolator::find_method(instance->transform_prev.basis, instance->transform_curr.basis);
|
||||||
|
Loading…
Reference in New Issue
Block a user