Skip to content

Commit

Permalink
Portals - Fix RoomManager PVS enum
Browse files Browse the repository at this point in the history
The PVS mode enum had been declared using scope operator, which does not seem to work correctly from GDScript with the BIND_ENUM_CONSTANT macro.

This PR removes the scope operator in the declaration.
  • Loading branch information
lawnjelly committed Aug 28, 2021
1 parent 17e61fa commit 7ea35da
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions doc/classes/RoomManager.xml
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,13 @@
</member>
</members>
<constants>
<constant name="RoomManager::PVS_MODE_DISABLED" value="0" enum="PVSMode">
<constant name="PVS_MODE_DISABLED" value="0" enum="PVSMode">
Use only [Portal]s at runtime to determine visibility. PVS will not be generated at [Room]s conversion, and gameplay notifications cannot be used.
</constant>
<constant name="RoomManager::PVS_MODE_PARTIAL" value="1" enum="PVSMode">
<constant name="PVS_MODE_PARTIAL" value="1" enum="PVSMode">
Use a combination of PVS and [Portal]s to determine visibility (this is usually fastest and most accurate).
</constant>
<constant name="RoomManager::PVS_MODE_FULL" value="2" enum="PVSMode">
<constant name="PVS_MODE_FULL" value="2" enum="PVSMode">
Use only the PVS (potentially visible set) of [Room]s to determine visibility.
</constant>
</constants>
Expand Down
6 changes: 3 additions & 3 deletions scene/3d/room_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -256,9 +256,9 @@ void RoomManager::_notification(int p_what) {
}

void RoomManager::_bind_methods() {
BIND_ENUM_CONSTANT(RoomManager::PVS_MODE_DISABLED);
BIND_ENUM_CONSTANT(RoomManager::PVS_MODE_PARTIAL);
BIND_ENUM_CONSTANT(RoomManager::PVS_MODE_FULL);
BIND_ENUM_CONSTANT(PVS_MODE_DISABLED);
BIND_ENUM_CONSTANT(PVS_MODE_PARTIAL);
BIND_ENUM_CONSTANT(PVS_MODE_FULL);

// main functions
ClassDB::bind_method(D_METHOD("rooms_convert"), &RoomManager::rooms_convert);
Expand Down

0 comments on commit 7ea35da

Please sign in to comment.