Skip to content

Commit

Permalink
Update structs & GClasses
Browse files Browse the repository at this point in the history
  • Loading branch information
ArchangelWTF committed Nov 4, 2024
1 parent 98c9b9c commit f312dfc
Show file tree
Hide file tree
Showing 20 changed files with 80 additions and 80 deletions.
2 changes: 1 addition & 1 deletion Fika.Core/Coop/BotClasses/BotPlayerBridge.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

namespace Fika.Core.Coop.ObservedClasses
{
public class BotPlayerBridge(CoopBot bot) : BodyPartCollider.GInterface20
public class BotPlayerBridge(CoopBot bot) : BodyPartCollider.IPlayerBridge

Check failure on line 9 in Fika.Core/Coop/BotClasses/BotPlayerBridge.cs

View workflow job for this annotation

GitHub Actions / test

The type name 'IPlayerBridge' does not exist in the type 'BodyPartCollider'
{
private readonly CoopBot bot = bot;

Expand Down
4 changes: 2 additions & 2 deletions Fika.Core/Coop/BotClasses/CoopBotHealthController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ public override bool _sendNetworkSyncPackets
}
}

public override void SendNetworkSyncPacket(GStruct358 packet)
public override void SendNetworkSyncPacket(NetworkHealthSyncStruct packet)

Check failure on line 21 in Fika.Core/Coop/BotClasses/CoopBotHealthController.cs

View workflow job for this annotation

GitHub Actions / test

The type or namespace name 'NetworkHealthSyncStruct' could not be found (are you missing a using directive or an assembly reference?)
{
if (packet.SyncType == GStruct358.ESyncType.IsAlive && !packet.Data.IsAlive.IsAlive)
if (packet.SyncType == NetworkHealthSyncStruct.ESyncType.IsAlive && !packet.Data.IsAlive.IsAlive)
{
coopBot.PacketSender.HealthSyncPackets.Enqueue(coopBot.SetupCorpseSyncPacket(packet));
return;
Expand Down
2 changes: 1 addition & 1 deletion Fika.Core/Coop/ClientClasses/CoopClientGameWorld.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public static CoopClientGameWorld Create(GameObject gameObject, PoolManager obje
return gameWorld;
}

public override GClass737 CreateGrenadeFactory()
public override GrenadeFactoryClass CreateGrenadeFactory()

Check failure on line 31 in Fika.Core/Coop/ClientClasses/CoopClientGameWorld.cs

View workflow job for this annotation

GitHub Actions / test

The type or namespace name 'GrenadeFactoryClass' could not be found (are you missing a using directive or an assembly reference?)
{
return new GClass738();
}
Expand Down
4 changes: 2 additions & 2 deletions Fika.Core/Coop/ClientClasses/CoopClientHealthController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ public override bool _sendNetworkSyncPackets
}
}

public override void SendNetworkSyncPacket(GStruct358 packet)
public override void SendNetworkSyncPacket(NetworkHealthSyncStruct packet)
{
if (packet.SyncType == GStruct358.ESyncType.IsAlive && !packet.Data.IsAlive.IsAlive)
if (packet.SyncType == NetworkHealthSyncStruct.ESyncType.IsAlive && !packet.Data.IsAlive.IsAlive)
{
coopPlayer.PacketSender.HealthSyncPackets.Enqueue(coopPlayer.SetupCorpseSyncPacket(packet));
return;
Expand Down
6 changes: 3 additions & 3 deletions Fika.Core/Coop/ClientClasses/FikaClientWorld.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ namespace Fika.Core.Coop.ClientClasses
/// </summary>
public class FikaClientWorld : World
{
public List<GStruct128> LootSyncPackets;
public List<LootSyncStruct> LootSyncPackets;
private CoopClientGameWorld clientGameWorld;

public static FikaClientWorld Create(CoopClientGameWorld gameWorld)
{
FikaClientWorld clientWorld = gameWorld.gameObject.AddComponent<FikaClientWorld>();
clientWorld.clientGameWorld = gameWorld;
clientWorld.LootSyncPackets = new List<GStruct128>(8);
clientWorld.LootSyncPackets = new List<LootSyncStruct>(8);
Singleton<FikaClient>.Instance.FikaClientWorld = clientWorld;
return clientWorld;
}
Expand All @@ -32,7 +32,7 @@ public void UpdateLootItems(GClass786<int, LootItem> lootItems)
{
for (int i = LootSyncPackets.Count - 1; i >= 0; i--)
{
GStruct128 gstruct = LootSyncPackets[i];
LootSyncStruct gstruct = LootSyncPackets[i];
if (lootItems.TryGetByKey(gstruct.Id, out LootItem lootItem))
{
if (lootItem is ObservedLootItem observedLootItem)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public override Dictionary<Type, OperationFactoryDelegate> GetOperationFactoryDe
Dictionary<Type, OperationFactoryDelegate> operationFactoryDelegates = base.GetOperationFactoryDelegates();
operationFactoryDelegates[typeof(GClass1752)] = new OperationFactoryDelegate(Weapon1);
operationFactoryDelegates[typeof(GClass1753)] = new OperationFactoryDelegate(Weapon2);
operationFactoryDelegates[typeof(GClass1765)] = new OperationFactoryDelegate(Weapon3);
operationFactoryDelegates[typeof(GenericFireOperationClass)] = new OperationFactoryDelegate(Weapon3);
return operationFactoryDelegates;
}

Expand Down Expand Up @@ -95,23 +95,23 @@ public Player.BaseAnimationOperation Weapon3()
{
if (Item.IsFlareGun)
{
return new GClass1768(this);
return new FlareGunFireOperationClass(this);
}
if (Item.IsOneOff)
{
return new GClass1770(this);
return new IsOneOffFireOperationClass(this);
}
if (Item.ReloadMode == Weapon.EReloadMode.OnlyBarrel)
{
return new FireOnlyBarrelFireOperation(this);
}
if (Item is GClass3048) // This is a revolver
{
return new GClass1767(this);
return new RevolverFireOperationClass(this);
}
if (!Item.BoltAction)
{
return new GClass1765(this);
return new GenericFireOperationClass(this);
}
return new FirearmClass4(this);
}
Expand Down
2 changes: 1 addition & 1 deletion Fika.Core/Coop/Components/ItemPositionSyncer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public class ItemPositionSyncer : MonoBehaviour
private FikaClient client;
private bool isServer;
private ObservedLootItem lootItem;
private GStruct128 data;
private LootSyncStruct data;

Check failure on line 15 in Fika.Core/Coop/Components/ItemPositionSyncer.cs

View workflow job for this annotation

GitHub Actions / test

The type or namespace name 'LootSyncStruct' could not be found (are you missing a using directive or an assembly reference?)

private Rigidbody Rigidbody
{
Expand Down
2 changes: 1 addition & 1 deletion Fika.Core/Coop/GameMode/CoopGame.cs
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ public ESeason Season
}
}

public GClass2359 SeasonsSettings { get; set; }
public SeasonsSettingsClass SeasonsSettings { get; set; }

Check failure on line 135 in Fika.Core/Coop/GameMode/CoopGame.cs

View workflow job for this annotation

GitHub Actions / test

The type or namespace name 'SeasonsSettingsClass' could not be found (are you missing a using directive or an assembly reference?)

private static ManualLogSource Logger;

Expand Down
2 changes: 1 addition & 1 deletion Fika.Core/Coop/GameMode/IFikaGame.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ public interface IFikaGame

public ESeason Season { get; set; }

public GClass2359 SeasonsSettings { get; set; }
public SeasonsSettingsClass SeasonsSettings { get; set; }

Check failure on line 21 in Fika.Core/Coop/GameMode/IFikaGame.cs

View workflow job for this annotation

GitHub Actions / test

The type or namespace name 'SeasonsSettingsClass' could not be found (are you missing a using directive or an assembly reference?)
}
}
2 changes: 1 addition & 1 deletion Fika.Core/Coop/HostClasses/CoopHostGameWorld.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public static CoopHostGameWorld Create(GameObject gameObject, PoolManager object
return gameWorld;
}

public override GClass737 CreateGrenadeFactory()
public override GrenadeFactoryClass CreateGrenadeFactory()
{
return new HostGrenadeFactory();
}
Expand Down
6 changes: 3 additions & 3 deletions Fika.Core/Coop/HostClasses/FikaHostWorld.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ namespace Fika.Core.Coop.HostClasses
/// </summary>
public class FikaHostWorld : World
{
public List<GStruct128> LootSyncPackets;
public List<LootSyncStruct> LootSyncPackets;

private FikaServer server;
private GameWorld gameWorld;
Expand All @@ -24,7 +24,7 @@ public static FikaHostWorld Create(CoopHostGameWorld gameWorld)
hostWorld.server = Singleton<FikaServer>.Instance;
hostWorld.server.FikaHostWorld = hostWorld;
hostWorld.gameWorld = gameWorld;
hostWorld.LootSyncPackets = new List<GStruct128>(8);
hostWorld.LootSyncPackets = new List<LootSyncStruct>(8);
return hostWorld;
}

Expand Down Expand Up @@ -77,7 +77,7 @@ public void UpdateLootItems(GClass786<int, LootItem> lootItems)
{
for (int i = LootSyncPackets.Count - 1; i >= 0; i--)
{
GStruct128 gstruct = LootSyncPackets[i];
LootSyncStruct gstruct = LootSyncPackets[i];
if (lootItems.TryGetByKey(gstruct.Id, out LootItem lootItem))
{
if (lootItem is ObservedLootItem observedLootItem)
Expand Down
2 changes: 1 addition & 1 deletion Fika.Core/Coop/HostClasses/HostGrenadeFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace Fika.Core.Coop.HostClasses
{
public class HostGrenadeFactory : GClass737
public class HostGrenadeFactory : GrenadeFactoryClass
{
public override Grenade AddGrenade(GameObject gameObject)
{
Expand Down
4 changes: 2 additions & 2 deletions Fika.Core/Coop/ObservedClasses/ObservedHealthController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public void PauseAllEffects()
for (int i = list_1.Count - 1; i >= 0; i--)
{
handler.PausedEffects.Add(list_1[i]);
GStruct357 gstruct = gclass803_0.Withdraw();
PausedEffectsStruct gstruct = gclass803_0.Withdraw();
gstruct.SaveInfo(list_1[i].Id, list_1[i].HealthController, list_1[i].Type, list_1[i].BodyPart, list_1[i].Strength,
list_1[i].CurrentStrength, list_1[i].DelayTime, list_1[i].StateTime, list_1[i].WorkStateTime, list_1[i].BuildUpTime,
list_1[i].ResidueTime, list_1[i].State);
Expand Down Expand Up @@ -121,7 +121,7 @@ private class EffectHandler(ObservedHealthController healthController)
{
private readonly ObservedHealthController healthController = healthController;
public readonly List<NetworkBodyEffectsAbstractClass> PausedEffects = [];
public readonly List<GStruct357> PausedEffectsInfo = [];
public readonly List<PausedEffectsStruct> PausedEffectsInfo = [];

Check failure on line 124 in Fika.Core/Coop/ObservedClasses/ObservedHealthController.cs

View workflow job for this annotation

GitHub Actions / test

The type or namespace name 'PausedEffectsStruct' could not be found (are you missing a using directive or an assembly reference?)

public void UnpauseEffects()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

namespace Fika.Core.Coop.ObservedClasses
{
public class ObservedClientBridge(ObservedCoopPlayer observedPlayer) : BodyPartCollider.GInterface20
public class ObservedClientBridge(ObservedCoopPlayer observedPlayer) : BodyPartCollider.IPlayerBridge

Check failure on line 9 in Fika.Core/Coop/ObservedClasses/PlayerBridge/ObservedClientBridge.cs

View workflow job for this annotation

GitHub Actions / test

The type name 'IPlayerBridge' does not exist in the type 'BodyPartCollider'
{
private readonly ObservedCoopPlayer observedPlayer = observedPlayer;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

namespace Fika.Core.Coop.ObservedClasses
{
public class ObservedHostBridge(ObservedCoopPlayer observedPlayer) : BodyPartCollider.GInterface20
public class ObservedHostBridge(ObservedCoopPlayer observedPlayer) : BodyPartCollider.IPlayerBridge

Check failure on line 9 in Fika.Core/Coop/ObservedClasses/PlayerBridge/ObservedHostBridge.cs

View workflow job for this annotation

GitHub Actions / test

The type name 'IPlayerBridge' does not exist in the type 'BodyPartCollider'
{
private readonly ObservedCoopPlayer observedPlayer = observedPlayer;

Expand Down
2 changes: 1 addition & 1 deletion Fika.Core/Coop/PacketHandlers/PacketReceiver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ protected void Update()
for (int i = 0; i < healthSyncPackets; i++)
{
HealthSyncPacket packet = HealthSyncPackets.Dequeue();
if (packet.Packet.SyncType == GStruct358.ESyncType.IsAlive && !packet.Packet.Data.IsAlive.IsAlive)
if (packet.Packet.SyncType == NetworkHealthSyncStruct.ESyncType.IsAlive && !packet.Packet.Data.IsAlive.IsAlive)
{
observedPlayer.SetAggressorData(packet.KillerId, packet.BodyPart, packet.WeaponId);
observedPlayer.CorpseSyncPacket = packet.CorpseSyncPacket;
Expand Down
2 changes: 1 addition & 1 deletion Fika.Core/Coop/Patches/GrenadeClass_Init_Patch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public class GrenadeClass_Init_Patch : ModulePatch
{
protected override MethodBase GetTargetMethod()
{
return typeof(GClass737).GetMethod(nameof(GClass737.Create));
return typeof(GrenadeFactoryClass).GetMethod(nameof(GrenadeFactoryClass.Create));
}

[PatchPostfix]
Expand Down
2 changes: 1 addition & 1 deletion Fika.Core/Coop/Players/CoopPlayer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -752,7 +752,7 @@ public override void ApplyCorpseImpulse()
Corpse.Ragdoll.ApplyImpulse(LastDamageInfo.HitCollider, LastDamageInfo.Direction, LastDamageInfo.HitPoint, _corpseAppliedForce);
}

public HealthSyncPacket SetupCorpseSyncPacket(GStruct358 packet)
public HealthSyncPacket SetupCorpseSyncPacket(NetworkHealthSyncStruct packet)
{
float num = EFTHardSettings.Instance.HIT_FORCE;
num *= 0.3f + 0.7f * Mathf.InverseLerp(50f, 20f, LastDamageInfo.PenetrationPower);
Expand Down
2 changes: 1 addition & 1 deletion Fika.Core/Networking/Packets/GameWorld/LootSyncPacket.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ namespace Fika.Core.Networking
{
public struct LootSyncPacket : INetSerializable
{
public GStruct128 Data;
public LootSyncStruct Data;

Check failure on line 7 in Fika.Core/Networking/Packets/GameWorld/LootSyncPacket.cs

View workflow job for this annotation

GitHub Actions / test

The type or namespace name 'LootSyncStruct' could not be found (are you missing a using directive or an assembly reference?)

public void Deserialize(NetDataReader reader)
{
Expand Down
Loading

0 comments on commit f312dfc

Please sign in to comment.