Skip to content

Commit

Permalink
Further refactoring of CoopGame and CoopBot/ObservedCoopPlayer
Browse files Browse the repository at this point in the history
  • Loading branch information
Lacyway committed Jun 14, 2024
1 parent 807ee9f commit ada9da3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 15 deletions.
8 changes: 6 additions & 2 deletions Fika.Core/Coop/GameMode/CoopGame.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
using EFT.Counters;
using EFT.EnvironmentEffect;
using EFT.Game.Spawning;
using EFT.HealthSystem;
using EFT.Interactive;
using EFT.InventoryLogic;
using EFT.UI;
Expand Down Expand Up @@ -60,9 +61,8 @@ public sealed class CoopGame : BaseLocalGame<EftGamePlayerOwner>, IBotGame, IFik
public ExitStatus MyExitStatus { get; set; } = ExitStatus.Survived;
public string MyExitLocation { get; set; } = null;
public ISpawnSystem SpawnSystem;

public Dictionary<string, Player> Bots = [];
//private GameObject fikaStartButton;

private readonly Dictionary<int, int> botQueue = [];
private Coroutine extractRoutine;
private GClass2949 spawnPoints = null;
Expand Down Expand Up @@ -463,6 +463,10 @@ private async Task<LocalPlayer> CreateBot(Profile profile, Vector3 position)

CoopBot coopBot = (CoopBot)localPlayer;
coopBot.NetId = netId;
if (FikaPlugin.DisableBotMetabolism.Value)
{
coopBot.HealthController.DisableMetabolism();
}
coopHandler.Players.Add(coopBot.NetId, coopBot);

return localPlayer;
Expand Down
8 changes: 0 additions & 8 deletions Fika.Core/Coop/Players/CoopBot.cs
Original file line number Diff line number Diff line change
Expand Up @@ -137,14 +137,6 @@ public override GClass1688 ApplyShot(DamageInfo damageInfo, EBodyPart bodyPartTy
return hitInfo;
}

protected override void Start()
{
if (FikaPlugin.DisableBotMetabolism.Value)
{
HealthController.DisableMetabolism();
}
}

public override void BtrInteraction()
{
// Do nothing
Expand Down
5 changes: 0 additions & 5 deletions Fika.Core/Coop/Players/ObservedCoopPlayer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -895,11 +895,6 @@ private IEnumerator CreateHealthBar()
yield break;
}

protected override void Start()
{
// Do nothing
}

public override void LateUpdate()
{
DistanceDirty = true;
Expand Down

0 comments on commit ada9da3

Please sign in to comment.