Skip to content

Commit

Permalink
fixed forfeit rematch bug
Browse files Browse the repository at this point in the history
  • Loading branch information
uzkbwza committed Dec 1, 2022
1 parent 8e480e3 commit dec9841
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 11 deletions.
1 change: 1 addition & 0 deletions Network.gd
Original file line number Diff line number Diff line change
Expand Up @@ -730,6 +730,7 @@ remotesync func sync_ids(network_ids):
remotesync func send_rematch_request(player_id):
rematch_requested[player_id] = true
if rematch_requested[1] and rematch_requested[2]:
forfeiter = 0
if is_host() or steam:
ReplayManager.init()
if steam:
Expand Down
4 changes: 1 addition & 3 deletions ui/CustomizationScreen/CustomizationScreen.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,6 @@ margin_bottom = 155.0

[node name="CharacterButtonContainer" type="VBoxContainer" parent="ScrollContainer"]
unique_name_in_owner = true
margin_right = 71.0
margin_bottom = 295.0
grow_horizontal = 2
size_flags_horizontal = 3
size_flags_vertical = 3
Expand All @@ -98,7 +96,7 @@ scroll_horizontal_enabled = false

[node name="VBoxContainer" type="VBoxContainer" parent="Panel/ScrollContainer2"]
margin_right = 201.0
margin_bottom = 1463.0
margin_bottom = 1389.0
size_flags_horizontal = 3
size_flags_vertical = 3
custom_constants/separation = 5
Expand Down
4 changes: 2 additions & 2 deletions ui/GameSettingsPanelContainer.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ scroll_horizontal_enabled = false

[node name="GameSettingsContainer" type="VBoxContainer" parent="ScrollContainer"]
unique_name_in_owner = true
margin_right = 158.0
margin_bottom = 174.0
margin_right = 152.0
margin_bottom = 163.0
size_flags_horizontal = 3
size_flags_vertical = 3

Expand Down
2 changes: 1 addition & 1 deletion ui/NagWindow.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,6 @@ margin_bottom = 13.0
mouse_filter = 2
bbcode_enabled = true
bbcode_text = "[color=#ff333d]SAVE A LIFE!!![/color] FOR ALL THAT IS GOOD AND HOLY, BUY THE YOMI HUSTLE SUPPORTER PACK ON THE STEAM STORE FOR $4.99 USD!!! GET YOUR SWAG ALL THE WAY ON WITH EXTRA COSMETIC FEATURES AND DIGITAL STATUS SYMBOLS WITH WHICH TO FLEX ON YOUR PEERS, AND DO IT RIGHT NOW OR ELSE IT'S OVER FOR ME, INDIE GAME'S DEVELOPER IVY SLY!!! MY LIFE WILL BE IN RUIN!!! MY WIFE WILL RUN AWAY!!! MY DOG WILL LEAVE ME!!! ALL THAT I KNOW AND LOVE WILL PERISH!!! WORST OF ALL: AS THE FINAL, STRAINED BREATH IS SQUEEZED FROM MY EMACIATED BODY, THE ENTIRE DEVELOPMENT EFFORT FOR HIT VIDEOGAME STICK FIGURE YOMI HUSTLE WILL CRUMBLE TO DUST!!! WITH NOBODY AT THE WHEEL, YOUR MAIN WILL STAY BOTTOM TIER FOR THE REMAINDER OF ETERNOTY!!! I BEG OF YOU, PURCHASE THE YOMI $4.99 SUPPORTER HUSTLE PACK ON STEAM IMMEDIATELY SO I MAY REPAY MY DEBT TO GOD!!!!!!1"
text = "[color=#ff333d]SAVE A LIFE!!![/color] FOR ALL THAT IS GOOD AND HOLY, BUY THE YOMI HUSTLE SUPPORTER PACK ON THE STEAM STORE FOR $4.99 USD!!! GET YOUR SWAG ALL THE WAY ON WITH EXTRA COSMETIC FEATURES AND DIGITAL STATUS SYMBOLS WITH WHICH TO FLEX ON YOUR PEERS, AND DO IT RIGHT NOW OR ELSE IT'S OVER FOR ME, INDIE GAME'S DEVELOPER IVY SLY!!! MY LIFE WILL BE IN RUIN!!! MY WIFE WILL RUN AWAY!!! MY DOG WILL LEAVE ME!!! ALL THAT I KNOW AND LOVE WILL PERISH!!! WORST OF ALL: AS THE FINAL, STRAINED BREATH IS SQUEEZED FROM MY EMACIATED BODY, THE ENTIRE DEVELOPMENT EFFORT FOR HIT VIDEOGAME STICK FIGURE YOMI HUSTLE WILL CRUMBLE TO DUST!!! WITH NOBODY AT THE WHEEL, YOUR MAIN WILL STAY BOTTOM TIER FOR THE REMAINDER OF ETERNOTY!!! I BEG OF YOU, PURCHASE THE YOMI $4.99 SUPPORTER HUSTLE PACK ON STEAM IMMEDIATELY SO I MAY REPAY MY DEBT TO GOD!!!!!!1"
text = "SAVE A LIFE!!! FOR ALL THAT IS GOOD AND HOLY, BUY THE YOMI HUSTLE SUPPORTER PACK ON THE STEAM STORE FOR $4.99 USD!!! GET YOUR SWAG ALL THE WAY ON WITH EXTRA COSMETIC FEATURES AND DIGITAL STATUS SYMBOLS WITH WHICH TO FLEX ON YOUR PEERS, AND DO IT RIGHT NOW OR ELSE IT'S OVER FOR ME, INDIE GAME'S DEVELOPER IVY SLY!!! MY LIFE WILL BE IN RUIN!!! MY WIFE WILL RUN AWAY!!! MY DOG WILL LEAVE ME!!! ALL THAT I KNOW AND LOVE WILL PERISH!!! WORST OF ALL: AS THE FINAL, STRAINED BREATH IS SQUEEZED FROM MY EMACIATED BODY, THE ENTIRE DEVELOPMENT EFFORT FOR HIT VIDEOGAME STICK FIGURE YOMI HUSTLE WILL CRUMBLE TO DUST!!! WITH NOBODY AT THE WHEEL, YOUR MAIN WILL STAY BOTTOM TIER FOR THE REMAINDER OF ETERNOTY!!! I BEG OF YOU, PURCHASE THE YOMI $4.99 SUPPORTER HUSTLE PACK ON STEAM IMMEDIATELY SO I MAY REPAY MY DEBT TO GOD!!!!!!1"
fit_content_height = true
scroll_active = false
6 changes: 2 additions & 4 deletions ui/SteamLobby/SteamLobby.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,7 @@ margin_bottom = 303.0

[node name="UserList" type="VBoxContainer" parent="MarginContainer/HBoxContainer/PanelContainer/VBoxContainer/HBoxContainer/MarginContainer/VBoxContainer/HBoxContainer/UserListPanel/ScrollContainer"]
unique_name_in_owner = true
margin_right = 129.0
margin_bottom = 302.0
margin_bottom = 30.0
size_flags_horizontal = 3
size_flags_vertical = 3

Expand Down Expand Up @@ -136,8 +135,7 @@ margin_bottom = 303.0

[node name="MatchList" type="VBoxContainer" parent="MarginContainer/HBoxContainer/PanelContainer/VBoxContainer/HBoxContainer/MarginContainer/VBoxContainer/HBoxContainer/MatchListPanel/ScrollContainer"]
unique_name_in_owner = true
margin_right = 219.0
margin_bottom = 302.0
margin_bottom = 204.0
size_flags_horizontal = 3
size_flags_vertical = 3

Expand Down
2 changes: 1 addition & 1 deletion ui/SteamLobby/SteamLobbyList.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ size_flags_vertical = 3

[node name="LobbyList" type="VBoxContainer" parent="NetworkSetupScreen/LobbyListContainer"]
unique_name_in_owner = true
margin_right = 330.0
margin_right = 110.0
margin_bottom = 356.0
size_flags_horizontal = 3
size_flags_vertical = 3
Expand Down
3 changes: 3 additions & 0 deletions ui/UILayer.gd
Original file line number Diff line number Diff line change
Expand Up @@ -155,13 +155,15 @@ func _on_forfeit_button_pressed():
game.get_player(player_id).on_action_selected("Forfeit", null, null)
Network.forfeit()
forfeit_pressed = true
actionable = false
$"%PausePanel".hide()

func _on_opponent_disconnected():
if is_instance_valid(game) and !game.game_finished:
game.get_player((game.my_id % 2) + 1).on_action_selected("Forfeit", null, null)
Network.forfeit(true)
forfeit_pressed = true
actionable = false
$"%PausePanel".hide()

func _on_customize_pressed():
Expand Down Expand Up @@ -239,6 +241,7 @@ func reset_ui():
$"%ChatWindow".hide()
$"%PostGameButtons".hide()
$"%OpponentDisconnectedLabel".hide()
forfeit_pressed = false

func _on_quit_button_pressed():
if will_forfeit():
Expand Down

0 comments on commit dec9841

Please sign in to comment.