Skip to content

Commit

Permalink
Update loading screen message
Browse files Browse the repository at this point in the history
  • Loading branch information
Lacyway committed Nov 23, 2024
1 parent b06031a commit 1f41a12
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions Fika.Core/Coop/GameMode/CoopGame.cs
Original file line number Diff line number Diff line change
Expand Up @@ -796,13 +796,14 @@ private async Task WaitForOtherPlayers()
#if DEBUG
Logger.LogWarning("Server: Waiting for coopHandler.AmountOfHumans < expected players, expected: " + expectedPlayers);
#endif
FikaServer server = Singleton<FikaServer>.Instance;
server.ReadyClients++;
do
{
await Task.Yield();
SetMatchmakerStatus(LocaleUtils.UI_WAIT_FOR_OTHER_PLAYERS.Localized(), (float)server.ReadyClients / expectedPlayers);
} while (coopHandler.AmountOfHumans < expectedPlayers);

FikaServer server = Singleton<FikaServer>.Instance;
server.ReadyClients++;

InformationPacket packet = new(false)
{
NumberOfPlayers = server.NetServer.ConnectedPeersCount,
Expand Down Expand Up @@ -844,12 +845,14 @@ private async Task WaitForOtherPlayers()
#if DEBUG
Logger.LogWarning("Client: Waiting for coopHandler.AmountOfHumans < expected players, expected: " + expectedPlayers);
#endif
FikaClient client = Singleton<FikaClient>.Instance;
do
{
await Task.Yield();
SetMatchmakerStatus(LocaleUtils.UI_WAIT_FOR_OTHER_PLAYERS.Localized(), (float)client.ReadyClients / expectedPlayers);
} while (coopHandler.AmountOfHumans < expectedPlayers);

FikaClient client = Singleton<FikaClient>.Instance;

InformationPacket packet = new(true)
{
ReadyPlayers = 1
Expand Down Expand Up @@ -1561,15 +1564,15 @@ public override async Task vmethod_1(BotControllerSettings controllerSettings, I
Logger.LogInfo($"Location: {Location_0.Name}");
BackendConfigSettingsClass instance = Singleton<BackendConfigSettingsClass>.Instance;

/*if (instance != null && instance.ArtilleryShelling != null && instance.ArtilleryShelling.ArtilleryMapsConfigs != null &&
if (instance != null && instance.ArtilleryShelling != null && instance.ArtilleryShelling.ArtilleryMapsConfigs != null &&
instance.ArtilleryShelling.ArtilleryMapsConfigs.Keys.Contains(Location_0.Id))
{
if (isServer)
{
Singleton<GameWorld>.Instance.ServerShellingController = new GClass607();
}
Singleton<GameWorld>.Instance.ClientShellingController = new GClass1356(isServer);
}*/
Singleton<GameWorld>.Instance.ClientShellingController = new GClass1381(isServer);
}

if (instance != null && instance.EventSettings.EventActive && !instance.EventSettings.LocationsToIgnore.Contains(Location_0.Id))
{
Expand Down

0 comments on commit 1f41a12

Please sign in to comment.