Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Portals - fix gameplay monitor unloading #57033

Merged
merged 1 commit into from
Jan 21, 2022

Conversation

lawnjelly
Copy link
Member

@lawnjelly lawnjelly commented Jan 21, 2022

The gameplay monitor wasn't being unloaded correctly in between levels. This meant that exit signals were not being sent, and entered signals for the new level were being missed.

This PR sends appropriate exit signals on unloading, and clear the data.

Fixes #56494

Notes

  • I completely forgot to unload this data. Probably because RoomManager does get deleted usually between levels, however the actual PortalRenderer acts more like a global, so needs explicit deletion of data between levels.

Testing

Run the MRP in the linked issue.
Output is now correctly:

Room conversion complete. 3 rooms, 0 portals.
Gameplay entered signal
Gameplay exited signal
Room conversion complete. 3 rooms, 0 portals.
Gameplay entered signal
Gameplay exited signal
Room conversion complete. 3 rooms, 0 portals.
Gameplay entered signal
Portal system unloaded ( deleting STATIC or DYNAMIC ).

@lawnjelly lawnjelly requested a review from a team as a code owner January 21, 2022 08:55
@lawnjelly lawnjelly changed the title Portals - fix gameplay monitor unloading [WIP] Portals - fix gameplay monitor unloading Jan 21, 2022
@lawnjelly lawnjelly force-pushed the gameplay_monitor_unload branch from 096d3c0 to 00a36eb Compare January 21, 2022 09:06
@lawnjelly lawnjelly changed the title [WIP] Portals - fix gameplay monitor unloading Portals - fix gameplay monitor unloading Jan 21, 2022
@lawnjelly lawnjelly changed the title Portals - fix gameplay monitor unloading [WIP] Portals - fix gameplay monitor unloading Jan 21, 2022
The gameplay monitor wasn't being unloaded correctly in between levels. This meant that exit signals were not being sent, and entered signals for the new level were being missed.

This PR sends appropriate exit signals on unloading, and clear the data.
@lawnjelly lawnjelly force-pushed the gameplay_monitor_unload branch from 00a36eb to 6c1e243 Compare January 21, 2022 09:39
@lawnjelly lawnjelly changed the title [WIP] Portals - fix gameplay monitor unloading Portals - fix gameplay monitor unloading Jan 21, 2022
@lawnjelly lawnjelly added this to the 3.5 milestone Jan 21, 2022
@akien-mga akien-mga merged commit c6480e2 into godotengine:3.x Jan 21, 2022
@akien-mga
Copy link
Member

Thanks!

@lawnjelly lawnjelly deleted the gameplay_monitor_unload branch January 21, 2022 18:03
@akien-mga
Copy link
Member

Cherry-picked for 3.4.3.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants