Skip to content

Commit

Permalink
30626
Browse files Browse the repository at this point in the history
  • Loading branch information
hel0t committed Jul 4, 2024
1 parent 8e6b91d commit 5bea97c
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 16 deletions.
22 changes: 11 additions & 11 deletions Fika.Core/Coop/GameMode/CoopGame.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public sealed class CoopGame : BaseLocalGame<EftGamePlayerOwner>, IBotGame, IFik
private Coroutine extractRoutine;
private SpawnPointManagerClass spawnPoints = null;
private ISpawnPoint spawnPoint = null;
private BossSpawnWaveManagerClass BossSpawnWaveManagerClass;
private BossSpawnWaveManagerClass bossSpawnWaveManager;
private WavesSpawnScenario wavesSpawnScenario_0;
private NonWavesSpawnScenario nonWavesSpawnScenario_0;
private Func<Player, EftGamePlayerOwner> func_1;
Expand Down Expand Up @@ -152,7 +152,7 @@ internal static CoopGame Create(IInputTree inputTree, Profile profile, GameDateT
coopGame.wavesSpawnScenario_0 = WavesSpawnScenario.smethod_0(coopGame.gameObject, waves, new Action<BotWaveDataClass>(coopGame.botsController_0.ActivateBotsByWave), location);

BossLocationSpawn[] bossSpawns = LocalGame.smethod_8(wavesSettings, location.BossLocationSpawn);
coopGame.BossSpawnWaveManagerClass = BossSpawnWaveManagerClass.smethod_0(bossSpawns, new Action<BossLocationSpawn>(coopGame.botsController_0.ActivateBotsByWave));
coopGame.bossSpawnWaveManager = BossSpawnWaveManagerClass.smethod_0(bossSpawns, new Action<BossLocationSpawn>(coopGame.botsController_0.ActivateBotsByWave));

if (useCustomWeather && coopGame.isServer)
{
Expand Down Expand Up @@ -1261,7 +1261,7 @@ public override IEnumerator vmethod_4(BotControllerSettings controllerSettings,
if (isServer)
{
BotsPresets profileCreator = new(BackEndSession, wavesSpawnScenario_0.SpawnWaves,
BossSpawnWaveManagerClass.BossSpawnWaves, nonWavesSpawnScenario_0.GClass1478_0, false);
bossSpawnWaveManager.BossSpawnWaves, nonWavesSpawnScenario_0.GClass1478_0, false);

GClass814 botCreator = new(this, profileCreator, CreateBot);
BotZone[] botZones = LocationScene.GetAllObjects<BotZone>(false).ToArray();
Expand All @@ -1270,7 +1270,7 @@ public override IEnumerator vmethod_4(BotControllerSettings controllerSettings,

botsController_0.Init(this, botCreator, botZones, spawnSystem, wavesSpawnScenario_0.BotLocationModifier,
controllerSettings.IsEnabled, controllerSettings.IsScavWars, enableWaves, false,
BossSpawnWaveManagerClass.HaveSectants, Singleton<GameWorld>.Instance, Location_0.OpenZones);
bossSpawnWaveManager.HaveSectants, Singleton<GameWorld>.Instance, Location_0.OpenZones);

Logger.LogInfo($"Location: {Location_0.Name}");

Expand Down Expand Up @@ -1389,7 +1389,7 @@ public override IEnumerator vmethod_4(BotControllerSettings controllerSettings,
}
}

BossSpawnWaveManagerClass.Run(EBotsSpawnMode.Anyway);
bossSpawnWaveManager.Run(EBotsSpawnMode.Anyway);

FikaPlugin.DynamicAI.SettingChanged += DynamicAI_SettingChanged;
FikaPlugin.DynamicAIRate.SettingChanged += DynamicAIRate_SettingChanged;
Expand All @@ -1404,9 +1404,9 @@ public override IEnumerator vmethod_4(BotControllerSettings controllerSettings,
{
nonWavesSpawnScenario_0.Stop();
}
if (BossSpawnWaveManagerClass != null)
if (bossSpawnWaveManager != null)
{
BossSpawnWaveManagerClass.Stop();
bossSpawnWaveManager.Stop();
}
}

Expand Down Expand Up @@ -1868,9 +1868,9 @@ public override void Stop(string profileId, ExitStatus exitStatus, string exitNa
botsController_0.DestroyInfo(gparam_0.Player);
}

if (BossSpawnWaveManagerClass != null)
if (bossSpawnWaveManager != null)
{
BossSpawnWaveManagerClass.Stop();
bossSpawnWaveManager.Stop();
}
if (nonWavesSpawnScenario_0 != null)
{
Expand Down Expand Up @@ -2044,9 +2044,9 @@ private void StopFromCancel(string profileId, ExitStatus exitStatus)
Destroy(CoopHandler.CoopHandlerParent);
}

if (BossSpawnWaveManagerClass != null)
if (bossSpawnWaveManager != null)
{
BossSpawnWaveManagerClass.Stop();
bossSpawnWaveManager.Stop();
}
if (nonWavesSpawnScenario_0 != null)
{
Expand Down
4 changes: 2 additions & 2 deletions Fika.Core/Coop/Patches/MatchmakerPlayerController_Patch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public class MatchmakerPlayerController_Patch : ModulePatch
protected override MethodBase GetTargetMethod() => typeof(MatchmakerPlayerControllerClass).GetMethod("NotificationReceivedHandler");

[PatchPrefix]
private static bool PatchPrefix(MatchmakerPlayerControllerClass __instance, NotificationClass notification)
private static bool PatchPrefix(MatchmakerPlayerControllerClass __instance, NotificationAbstractClass notification)
{
return notification switch
{
Expand All @@ -21,7 +21,7 @@ private static bool PatchPrefix(MatchmakerPlayerControllerClass __instance, Noti
}

[PatchPostfix]
private static void PostPrefix(MatchmakerPlayerControllerClass __instance, NotificationClass notification)
private static void PostPrefix(MatchmakerPlayerControllerClass __instance, NotificationAbstractClass notification)
{
if (notification is not GClass2020)
{
Expand Down
4 changes: 2 additions & 2 deletions Fika.Core/Coop/Players/CoopPlayer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public static async Task<LocalPlayer> Create(int playerId, Vector3 position, Qua
Func<float> getAimingSensitivity, IViewFilter filter, int netId, IStatisticsManager statisticsManager)
{
CoopPlayer player = Create<CoopPlayer>(ResourceKeyManagerAbstractClass.PLAYER_BUNDLE_NAME, playerId, position, updateQueue, armsUpdateMode,
bodyUpdateMode, characterControllerMode, getSensitivity, getAimingSensitivity, prefix, false);
bodyUpdateMode, characterControllerMode, getSensitivity, getAimingSensitivity, prefix, false);

player.IsYourPlayer = true;
player.NetId = netId;
Expand All @@ -67,7 +67,7 @@ public static async Task<LocalPlayer> Create(int playerId, Vector3 position, Qua

ISession session = Singleton<ClientApplication<ISession>>.Instance.GetClientBackEndSession();

LocalQuestControllerClass questController;
AbstractQuestControllerClass questController;
if (FikaPlugin.Instance.SharedQuestProgression)
{
questController = new CoopClientSharedQuestController(profile, inventoryController, session, player);
Expand Down
2 changes: 1 addition & 1 deletion Fika.Core/UI/FikaUIUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public static GClass3109 ShowFikaMessage(this ErrorScreen errorScreen, string ti
errorScreenHandler.context.OnDecline += errorScreen.method_4;
errorScreenHandler.context.OnCloseSilent += errorScreen.method_4;

CompositeDisposableClass ui = Traverse.Create(errorScreen).Field<CompositeDisposableClass>("UI").Value;
AddViewList ui = Traverse.Create(errorScreen).Field<AddViewList>("UI").Value;

ui.AddDisposable(new Action(errorScreenHandler.method_0));
string text = buttonType switch
Expand Down

0 comments on commit 5bea97c

Please sign in to comment.