diff options
author | Star Rauchenberger <fefferburbia@gmail.com> | 2024-02-11 00:14:49 -0500 |
---|---|---|
committer | Star Rauchenberger <fefferburbia@gmail.com> | 2024-02-11 00:14:49 -0500 |
commit | 58c91d39a052606091b0f22d75cc22db7142572b (patch) | |
tree | 13ebe78a5fcbab3a80b9db020bd606f6e7a85301 /racing | |
parent | 9832dfed97fed0dc773de6d6d642b6f175a6b3a8 (diff) | |
download | lingo-race-58c91d39a052606091b0f22d75cc22db7142572b.tar.gz lingo-race-58c91d39a052606091b0f22d75cc22db7142572b.tar.bz2 lingo-race-58c91d39a052606091b0f22d75cc22db7142572b.zip |
hopefully prevent joining closed lobbies
Diffstat (limited to 'racing')
-rw-r--r-- | racing/lobby.gd | 4 | ||||
-rw-r--r-- | racing/multiplayer.gd | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/racing/lobby.gd b/racing/lobby.gd index d759046..36a90b6 100644 --- a/racing/lobby.gd +++ b/racing/lobby.gd | |||
@@ -118,6 +118,7 @@ func _request_lobby_list(): | |||
118 | Steam.addRequestLobbyListStringFilter( | 118 | Steam.addRequestLobbyListStringFilter( |
119 | "save_file", global.save_file.to_lower(), Steam.LOBBY_COMPARISON_EQUAL | 119 | "save_file", global.save_file.to_lower(), Steam.LOBBY_COMPARISON_EQUAL |
120 | ) | 120 | ) |
121 | Steam.addRequestLobbyListStringFilter("closed", "false", Steam.LOBBY_COMPARISON_EQUAL) | ||
121 | Steam.requestLobbyList() | 122 | Steam.requestLobbyList() |
122 | 123 | ||
123 | 124 | ||
@@ -152,6 +153,7 @@ func _on_lobby_created(result: int, lobby_id: int) -> void: | |||
152 | _ignore = Steam.setLobbyData(lobby_id, "protocol_version", str(PROTOCOL_VERSION)) | 153 | _ignore = Steam.setLobbyData(lobby_id, "protocol_version", str(PROTOCOL_VERSION)) |
153 | _ignore = Steam.setLobbyData(lobby_id, "save_file", global.save_file.to_lower()) | 154 | _ignore = Steam.setLobbyData(lobby_id, "save_file", global.save_file.to_lower()) |
154 | _ignore = Steam.setLobbyData(lobby_id, "racing_vip", str(player_steam_id)) | 155 | _ignore = Steam.setLobbyData(lobby_id, "racing_vip", str(player_steam_id)) |
156 | _ignore = Steam.setLobbyData(lobby_id, "closed", "false") | ||
155 | is_vip = true | 157 | is_vip = true |
156 | _request_lobby_list() | 158 | _request_lobby_list() |
157 | 159 | ||
@@ -304,6 +306,8 @@ func _main_button_pressed(): | |||
304 | if everyone_ready and is_vip: | 306 | if everyone_ready and is_vip: |
305 | get_node("Panel/main_button").disabled = true | 307 | get_node("Panel/main_button").disabled = true |
306 | 308 | ||
309 | var _ignore = Steam.setLobbyData(active_lobby_id, "closed", "true") | ||
310 | |||
307 | var route = router.choose_route() | 311 | var route = router.choose_route() |
308 | var start_pos = route[1] | 312 | var start_pos = route[1] |
309 | var end_pos = route[2] | 313 | var end_pos = route[2] |
diff --git a/racing/multiplayer.gd b/racing/multiplayer.gd index 0dfebf2..7757a45 100644 --- a/racing/multiplayer.gd +++ b/racing/multiplayer.gd | |||
@@ -97,6 +97,7 @@ func _request_lobby_list(): | |||
97 | Steam.addRequestLobbyListStringFilter( | 97 | Steam.addRequestLobbyListStringFilter( |
98 | "save_file", global.save_file.to_lower(), Steam.LOBBY_COMPARISON_EQUAL | 98 | "save_file", global.save_file.to_lower(), Steam.LOBBY_COMPARISON_EQUAL |
99 | ) | 99 | ) |
100 | Steam.addRequestLobbyListStringFilter("closed", "true", Steam.LOBBY_COMPARISON_EQUAL) | ||
100 | Steam.requestLobbyList() | 101 | Steam.requestLobbyList() |
101 | 102 | ||
102 | 103 | ||