not enough rc for rematch

This commit is contained in:
2026-05-19 01:17:02 +05:30
parent 87301a228f
commit f3e01462c1
4 changed files with 114 additions and 34 deletions
+71 -24
View File
@@ -1,25 +1,72 @@
Logger initiated at 5/17/2026 7:06:49 PM Logger initiated at 5/19/2026 1:11:43 AM
[5/17/2026 7:06:49 PM] Cupid settings updated [5/19/2026 1:11:43 AM] Cupid settings updated
[5/17/2026 7:06:49 PM] Cupid settings updated [5/19/2026 1:11:43 AM] Cupid settings updated
[5/17/2026 7:06:50 PM] Starting matchmake as warlock [5/19/2026 1:11:46 AM] Starting matchmake as warlock
[5/17/2026 7:06:53 PM] Got into a room [5/19/2026 1:11:51 AM] Still waiting: {"ok":true,"entry_fee":21,"rc_prize":34,"for_red":{"Players":[{"Name":"warlock","LastSeen":1779133311048,"UserId":2,"l10_wins":3,"l10_losses":1}],"GameName":"soccar","Port":26486,"InitTime":1779133311048,"entry_fee":21,"match_id":60,"rc_prize":34,"your_team":"red"},"for_blue":null}
[5/17/2026 7:06:53 PM] {"ok":true,"entry_fee":21,"rc_prize":34,"for_red":{"Players":[{"Name":"warlock3","LastSeen":1779025012273,"UserId":6,"l10_wins":1,"l10_losses":3},{"Name":"warlock","LastSeen":1779025012906,"UserId":2,"l10_wins":4,"l10_losses":1}],"GameName":"soccar","Port":26923,"InitTime":1779025012273,"entry_fee":21,"match_id":52,"instance_started":true,"rc_prize":34,"your_team":"red"},"for_blue":{"Players":[{"Name":"warlock3","LastSeen":1779025012273,"UserId":6,"l10_wins":1,"l10_losses":3},{"Name":"warlock","LastSeen":1779025012906,"UserId":2,"l10_wins":4,"l10_losses":1}],"GameName":"soccar","Port":26923,"InitTime":1779025012273,"entry_fee":21,"match_id":52,"instance_started":true,"rc_prize":34,"your_team":"blue"}} [5/19/2026 1:11:52 AM] Got into a room
[5/17/2026 7:06:53 PM] Configured dedicated match reporting for match id 52 with secret 38516e39d3406225b7c3015a66e5d25c54e9b2024c0755212122bdcea3e3a328 and internal api base https://kickkingsapi.playpoolstudios.com [5/19/2026 1:11:52 AM] {"ok":true,"entry_fee":21,"rc_prize":34,"for_red":{"Players":[{"Name":"warlock","LastSeen":1779133312496,"UserId":2,"l10_wins":3,"l10_losses":1},{"Name":"warlock3","LastSeen":1779133311431,"UserId":6,"l10_wins":1,"l10_losses":5}],"GameName":"soccar","Port":26486,"InitTime":1779133311048,"entry_fee":21,"match_id":60,"instance_started":true,"rc_prize":34,"your_team":"red"},"for_blue":{"Players":[{"Name":"warlock","LastSeen":1779133312496,"UserId":2,"l10_wins":3,"l10_losses":1},{"Name":"warlock3","LastSeen":1779133311431,"UserId":6,"l10_wins":1,"l10_losses":5}],"GameName":"soccar","Port":26486,"InitTime":1779133311048,"entry_fee":21,"match_id":60,"instance_started":true,"rc_prize":34,"your_team":"blue"}}
[5/17/2026 7:06:53 PM] Setting cupid to load game scene [5/19/2026 1:11:52 AM] Configured dedicated match reporting for match id 60 with secret 38516e39d3406225b7c3015a66e5d25c54e9b2024c0755212122bdcea3e3a328 and internal api base https://kickkingsapi.playpoolstudios.com
[5/17/2026 7:06:53 PM] Loading game scene [5/19/2026 1:11:52 AM] Setting cupid to load game scene
[5/17/2026 7:06:57 PM] Starting client at $kickkingsapi.playpoolstudios.com:26923 [5/19/2026 1:11:52 AM] Loading game scene
[5/17/2026 7:06:58 PM] Client connected [5/19/2026 1:11:58 AM] Starting client at $kickkingsapi.playpoolstudios.com:26486
[5/17/2026 7:07:03 PM] Selected team changed from Red to Blue [5/19/2026 1:11:58 AM] Client connected
[5/17/2026 7:07:05 PM] Score changed from 0 to 1 [5/19/2026 1:12:04 AM] Selected team changed from Red to Blue
[5/17/2026 7:07:08 PM] Selected team changed from Blue to Red [5/19/2026 1:12:05 AM] Score changed from 0 to 1
[5/17/2026 7:07:13 PM] Selected team changed from Red to Blue [5/19/2026 1:12:08 AM] Selected team changed from Blue to Red
[5/17/2026 7:07:15 PM] Score changed from 1 to 2 [5/19/2026 1:12:13 AM] Selected team changed from Red to Blue
[5/17/2026 7:07:18 PM] Selected team changed from Blue to Red [5/19/2026 1:12:17 AM] Selected team changed from Blue to Red
[5/17/2026 7:07:34 PM] Selected team changed from Red to Blue [5/19/2026 1:12:21 AM] Selected team changed from Red to Blue
[5/17/2026 7:07:37 PM] Score changed from 2 to 3 [5/19/2026 1:12:25 AM] Selected team changed from Blue to Red
[5/17/2026 7:08:15 PM] Configured dedicated match reporting for match id 53 with secret 38516e39d3406225b7c3015a66e5d25c54e9b2024c0755212122bdcea3e3a328 and internal api base https://kickkingsapi.playpoolstudios.com [5/19/2026 1:12:31 AM] Selected team changed from Red to Blue
[5/17/2026 7:08:15 PM] Client disconnected [5/19/2026 1:12:36 AM] Selected team changed from Blue to Red
[5/17/2026 7:08:19 PM] Starting client at $kickkingsapi.playpoolstudios.com:26571 [5/19/2026 1:12:40 AM] Selected team changed from Red to Blue
[5/17/2026 7:08:20 PM] Client connected [5/19/2026 1:12:45 AM] Selected team changed from Blue to Red
[5/17/2026 7:08:26 PM] Client disconnected [5/19/2026 1:12:49 AM] Selected team changed from Red to Blue
[5/19/2026 1:12:52 AM] Selected team changed from Blue to Red
[5/19/2026 1:12:53 AM] Selected team changed from Red to Blue
[5/19/2026 1:12:53 AM] Score changed from 1 to 2
[5/19/2026 1:12:56 AM] Selected team changed from Blue to Red
[5/19/2026 1:13:03 AM] Selected team changed from Red to Blue
[5/19/2026 1:13:05 AM] Score changed from 2 to 3
[5/19/2026 1:13:35 AM] Client disconnected
[5/19/2026 1:13:41 AM] Cupid settings updated
[5/19/2026 1:13:41 AM] Cupid settings updated
[5/19/2026 1:13:51 AM] Starting matchmake as warlock
[5/19/2026 1:14:03 AM] Still waiting: {"ok":true,"entry_fee":21,"rc_prize":34,"for_red":{"Players":[{"Name":"warlock","LastSeen":1779133443158,"UserId":2,"l10_wins":3,"l10_losses":2}],"GameName":"soccar","Port":26999,"InitTime":1779133443158,"entry_fee":21,"match_id":61,"rc_prize":34,"your_team":"red"},"for_blue":null}
[5/19/2026 1:14:04 AM] Got into a room
[5/19/2026 1:14:04 AM] {"ok":true,"entry_fee":21,"rc_prize":34,"for_red":{"Players":[{"Name":"warlock","LastSeen":1779133444601,"UserId":2,"l10_wins":3,"l10_losses":2},{"Name":"warlock3","LastSeen":1779133443864,"UserId":6,"l10_wins":2,"l10_losses":5}],"GameName":"soccar","Port":26999,"InitTime":1779133443158,"entry_fee":21,"match_id":61,"instance_started":true,"rc_prize":34,"your_team":"red"},"for_blue":{"Players":[{"Name":"warlock","LastSeen":1779133444601,"UserId":2,"l10_wins":3,"l10_losses":2},{"Name":"warlock3","LastSeen":1779133443864,"UserId":6,"l10_wins":2,"l10_losses":5}],"GameName":"soccar","Port":26999,"InitTime":1779133443158,"entry_fee":21,"match_id":61,"instance_started":true,"rc_prize":34,"your_team":"blue"}}
[5/19/2026 1:14:04 AM] Configured dedicated match reporting for match id 61 with secret 38516e39d3406225b7c3015a66e5d25c54e9b2024c0755212122bdcea3e3a328 and internal api base https://kickkingsapi.playpoolstudios.com
[5/19/2026 1:14:04 AM] Setting cupid to load game scene
[5/19/2026 1:14:04 AM] Loading game scene
[5/19/2026 1:14:08 AM] Starting client at $kickkingsapi.playpoolstudios.com:26999
[5/19/2026 1:14:09 AM] Client connected
[5/19/2026 1:14:24 AM] Selected team changed from Red to Blue
[5/19/2026 1:14:29 AM] Selected team changed from Blue to Red
[5/19/2026 1:14:31 AM] Score changed from 0 to 1
[5/19/2026 1:14:34 AM] Selected team changed from Red to Blue
[5/19/2026 1:14:38 AM] Selected team changed from Blue to Red
[5/19/2026 1:14:39 AM] Score changed from 1 to 2
[5/19/2026 1:14:42 AM] Selected team changed from Red to Blue
[5/19/2026 1:14:46 AM] Selected team changed from Blue to Red
[5/19/2026 1:14:47 AM] Score changed from 2 to 3
[5/19/2026 1:14:57 AM] Configured dedicated match reporting for match id 62 with secret 38516e39d3406225b7c3015a66e5d25c54e9b2024c0755212122bdcea3e3a328 and internal api base https://kickkingsapi.playpoolstudios.com
[5/19/2026 1:14:57 AM] Client disconnected
[5/19/2026 1:15:02 AM] Starting client at $kickkingsapi.playpoolstudios.com:26340
[5/19/2026 1:15:02 AM] Client connected
[5/19/2026 1:15:07 AM] Selected team changed from Red to Blue
[5/19/2026 1:15:08 AM] Score changed from 0 to 1
[5/19/2026 1:15:11 AM] Selected team changed from Blue to Red
[5/19/2026 1:15:15 AM] Selected team changed from Red to Blue
[5/19/2026 1:15:17 AM] Score changed from 1 to 2
[5/19/2026 1:15:20 AM] Selected team changed from Blue to Red
[5/19/2026 1:15:35 AM] Selected team changed from Red to Blue
[5/19/2026 1:15:42 AM] Selected team changed from Blue to Red
[5/19/2026 1:15:45 AM] Score changed from 0 to 1
[5/19/2026 1:15:48 AM] Selected team changed from Red to Blue
[5/19/2026 1:16:03 AM] Selected team changed from Blue to Red
[5/19/2026 1:16:11 AM] Selected team changed from Red to Blue
[5/19/2026 1:16:14 AM] Score changed from 2 to 3
[5/19/2026 1:16:29 AM] Client disconnected
[5/19/2026 1:16:31 AM] Cupid settings updated
[5/19/2026 1:16:31 AM] Cupid settings updated
+2 -2
View File
@@ -3911,7 +3911,7 @@ MonoBehaviour:
m_OnCullStateChanged: m_OnCullStateChanged:
m_PersistentCalls: m_PersistentCalls:
m_Calls: [] m_Calls: []
m_Sprite: {fileID: 21300000, guid: eec1d4b89d2c3594b97d24a876c194f3, type: 3} m_Sprite: {fileID: 21300000, guid: 7ee9296fab8d38a4886647c5cc7afb16, type: 3}
m_Type: 0 m_Type: 0
m_PreserveAspect: 0 m_PreserveAspect: 0
m_FillCenter: 1 m_FillCenter: 1
@@ -4126,7 +4126,7 @@ MonoBehaviour:
preview: 0 preview: 0
isPlaying: 1 isPlaying: 1
loop: 1 loop: 1
currentFrame: 126 currentFrame: 34
--- !u!1 &239916595 --- !u!1 &239916595
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
+40 -7
View File
@@ -42,6 +42,8 @@ public class GameOverCanvas : MonoBehaviour
public float returnToMenuCountdown = 15f; public float returnToMenuCountdown = 15f;
/// <summary>Each player needs at least 2.0 RC (20 coin units) to rematch.</summary>
const int MinimumRematchRcCoins = 20;
[Header("Rematch panel")] [Header("Rematch panel")]
public CanvasGroup rematchPanel; public CanvasGroup rematchPanel;
@@ -102,7 +104,8 @@ public class GameOverCanvas : MonoBehaviour
} }
void OnBtnRematchClicked(){ void OnBtnRematchClicked(){
// LevelLoadManager.LoadLevel("Game"); if (!BothPlayersHaveMinimumRematchRc())
return;
NetPlayer.localPlayer.RequestRematch(); NetPlayer.localPlayer.RequestRematch();
SetRematchPendingState(true); SetRematchPendingState(true);
} }
@@ -250,12 +253,7 @@ public class GameOverCanvas : MonoBehaviour
rcPrize = CoinHelper.Format(GameManager.MatchRcPrizeCoins); rcPrize = CoinHelper.Format(GameManager.MatchRcPrizeCoins);
} }
btnRematch.interactable = winningTeam != myTeam; UpdateRematchAvailability();
if(winningTeam == myTeam){
rematchWarningLoser.text = "Only the loser can request a rematch";
}else{
rematchWarningLoser.text = "";
}
StartCoroutine(CoroutineShow()); StartCoroutine(CoroutineShow());
@@ -406,6 +404,41 @@ public class GameOverCanvas : MonoBehaviour
txtMyRCBalance.text = myText; txtMyRCBalance.text = myText;
if (txtOpponentRCBalance != null) if (txtOpponentRCBalance != null)
txtOpponentRCBalance.text = oppText; txtOpponentRCBalance.text = oppText;
if (loadingPlaceholder == null)
UpdateRematchAvailability();
}
static int GetRcCoins(MatchmadePlayer player) =>
player == null ? 0 : Mathf.Max(0, Mathf.FloorToInt(player.rc));
bool BothPlayersHaveMinimumRematchRc()
{
return GetRcCoins(LevelLoadManager.myPlayer) >= MinimumRematchRcCoins
&& GetRcCoins(LevelLoadManager.opponentPlayer) >= MinimumRematchRcCoins;
}
void UpdateRematchAvailability()
{
if (winningTeam == myTeam)
{
btnRematch.interactable = false;
if (rematchWarningLoser != null)
rematchWarningLoser.text = "Only the loser can request a rematch";
return;
}
if (!BothPlayersHaveMinimumRematchRc())
{
btnRematch.interactable = false;
if (rematchWarningLoser != null)
rematchWarningLoser.text = "Not enough RC";
return;
}
btnRematch.interactable = true;
if (rematchWarningLoser != null)
rematchWarningLoser.text = "";
} }
IEnumerator FetchPlayerRcAndApply(string baseUrl, MatchmadePlayer player) IEnumerator FetchPlayerRcAndApply(string baseUrl, MatchmadePlayer player)
+1 -1
View File
@@ -141,7 +141,7 @@ PlayerSettings:
loadStoreDebugModeEnabled: 0 loadStoreDebugModeEnabled: 0
visionOSBundleVersion: 1.0 visionOSBundleVersion: 1.0
tvOSBundleVersion: 1.0 tvOSBundleVersion: 1.0
bundleVersion: 1.15 bundleVersion: 1.16
preloadedAssets: preloadedAssets:
- {fileID: -944628639613478452, guid: 2bcd2660ca9b64942af0de543d8d7100, type: 3} - {fileID: -944628639613478452, guid: 2bcd2660ca9b64942af0de543d8d7100, type: 3}
metroInputSource: 0 metroInputSource: 0