summaryrefslogtreecommitdiff
path: root/scene/3d/reflection_probe.cpp
diff options
context:
space:
mode:
authorMilan Davidovic <milan.davidovic@protonmail.com>2019-08-19 11:11:14 +0200
committerMilan Davidovic <milan.davidovic@protonmail.com>2019-08-26 15:10:15 +0200
commitc12ce2b4ddaf22cb06b69a8d0c685b54485e8c05 (patch)
treeee5707f9cbff729cda848b78b23747272ff316e1 /scene/3d/reflection_probe.cpp
parentcce148b0242836b5c32a7fa6c39013a2fc1c9eff (diff)
Prevent move_and_slide() to generate an error.
When moving KinematicBody2D from one scene to another and not freeing the old scene, the first call to move_and_slide() in the new scene will generate an error because KinematicBody2D keeps internaly a RID on_floor_body of a body resource in the old scene which no more has a space assigned. To fix this, on_floor_body is set to empty RID in response to NOTIFICATION_ENTER_TREE notification of KinematicBody2D and KinematicBody. Also all other data related to move_and_slide() is reset: floor, ceiling, wall flags, colliders vector, floor_velocity. This fixes #31416.
Diffstat (limited to 'scene/3d/reflection_probe.cpp')
0 files changed, 0 insertions, 0 deletions