Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dev > main #57

Merged
merged 37 commits into from
May 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
915ffc2
main > dev
Lacyway May 20, 2024
a781981
Change raid settings sync
Lacyway May 20, 2024
1ddec4b
Fixes #53
Lacyway May 20, 2024
db7743c
Remove null propagation and null-coalescing operators
Lacyway May 21, 2024
65d448a
Null checks to destroy
Lacyway May 21, 2024
702c758
Fix field assignment
Lacyway May 21, 2024
fabac8d
Fix item sending UI causing errors when used from transfer window
Lacyway May 21, 2024
d319cba
Merge branch 'dev' of https://github.com/project-fika/Fika-Plugin int…
Lacyway May 21, 2024
5c956de
Fix startup errors and restructure init of players
Lacyway May 21, 2024
f8be681
Remove jumpscare on game start
Lacyway May 21, 2024
9ba4690
More efficient traverse reflection
Lacyway May 21, 2024
6badce5
Fix Lightkeeper quests freezing the dialogue
Lacyway May 22, 2024
a6f4cef
Remove return on marker plant for host
Lacyway May 22, 2024
16b1424
Remove dogtag when cancelling
Lacyway May 22, 2024
cbd4be7
Allow dynamic AI rate to be changed during session
Lacyway May 22, 2024
c247e14
Enable bots before disposing
Lacyway May 22, 2024
1a01968
Delete unused method
Lacyway May 22, 2024
c1f3c2f
Reorganize CoopGame class
Lacyway May 22, 2024
e282e2c
More cleaning
Lacyway May 22, 2024
99d92df
Save profile immediately upon death
ArchangelWTF May 22, 2024
2ced378
Make saving on death a server-side configuration
ArchangelWTF May 22, 2024
3a0d0fd
Do not disable OfflineSaveProfilePatch by default
ArchangelWTF May 22, 2024
edc10dc
Apply requested changes
ArchangelWTF May 23, 2024
7c3f842
Merge pull request #54 from ArchangelWTF/feature/anti-altf4
Lacyway May 23, 2024
1a2ef4c
Use coroutine to prevent nullref on HP bars
Lacyway May 23, 2024
54392c8
Merge branch 'dev' of https://github.com/project-fika/Fika-Plugin int…
Lacyway May 23, 2024
31b4bce
Cleanup
Lacyway May 23, 2024
8ab45ce
Use own saving methods to support new saveondeath
Lacyway May 23, 2024
634f1b7
More checks to save
Lacyway May 23, 2024
e841bd0
CameraController improvements
Lacyway May 23, 2024
186df30
Fix patch not modifying ref
Lacyway May 23, 2024
1e08ee1
Fix grenade launchers
Lacyway May 23, 2024
7da41e9
Allow examination of items in raid
ArchangelWTF May 23, 2024
d3bfeb0
Merge pull request #56 from ArchangelWTF/fix/item-examination
Lacyway May 23, 2024
848697e
Improve DynamicAI disabling
Lacyway May 23, 2024
07e9949
Only use max AI if enforced is enabled
Lacyway May 23, 2024
df9e0e5
Improve logic to enforced spawn limits
Lacyway May 23, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Fika.Core/Coop/BTR/FikaBTRManager_Host.cs
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ private void UpdateBTRSideDoorState(byte state)
{
try
{
BTRSide btrSide = lastInteractPlayer.BtrInteractionSide ?? lastInteractedBtrSide;
BTRSide btrSide = lastInteractPlayer.BtrInteractionSide != null ? lastInteractPlayer.BtrInteractionSide : lastInteractedBtrSide;
byte sideId = btrClientSide.GetSideId(btrSide);
switch (sideId)
{
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 @@ -22,11 +22,11 @@ public override void SendNetworkSyncPacket(GStruct346 packet)
{
if (packet.SyncType == GStruct346.ESyncType.IsAlive && !packet.Data.IsAlive.IsAlive)
{
coopBot?.PacketSender?.HealthSyncPackets.Enqueue(coopBot.SetupDeathPacket(packet));
coopBot.PacketSender.HealthSyncPackets.Enqueue(coopBot.SetupDeathPacket(packet));
return;
}

coopBot?.PacketSender?.HealthSyncPackets.Enqueue(new(coopBot.NetId)
coopBot.PacketSender.HealthSyncPackets.Enqueue(new(coopBot.NetId)
{
Packet = packet
});
Expand Down
2 changes: 1 addition & 1 deletion Fika.Core/Coop/BotClasses/CoopBotInventoryController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public override void Execute(GClass2837 operation, [CanBeNull] Callback callback
OperationBytes = opBytes
};

CoopBot.PacketSender?.InventoryPackets?.Enqueue(packet);
CoopBot.PacketSender.InventoryPackets.Enqueue(packet);
}
}
}
4 changes: 2 additions & 2 deletions Fika.Core/Coop/ClientClasses/CoopClientHealthController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ public override void SendNetworkSyncPacket(GStruct346 packet)
{
if (packet.SyncType == GStruct346.ESyncType.IsAlive && !packet.Data.IsAlive.IsAlive)
{
coopPlayer?.PacketSender?.HealthSyncPackets.Enqueue(coopPlayer.SetupDeathPacket(packet));
coopPlayer.PacketSender.HealthSyncPackets.Enqueue(coopPlayer.SetupDeathPacket(packet));
return;
}

coopPlayer?.PacketSender?.HealthSyncPackets.Enqueue(new(coopPlayer.NetId)
coopPlayer.PacketSender.HealthSyncPackets.Enqueue(new(coopPlayer.NetId)
{
Packet = packet
});
Expand Down
49 changes: 24 additions & 25 deletions Fika.Core/Coop/ClientClasses/CoopClientInventoryController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,34 +26,36 @@ public override void CallMalfunctionRepaired(Weapon weapon)
base.CallMalfunctionRepaired(weapon);
if (!Player.IsAI && (bool)Singleton<SharedGameSettingsClass>.Instance.Game.Settings.MalfunctionVisability)
{
MonoBehaviourSingleton<PreloaderUI>.Instance.MalfunctionGlow.ShowGlow(BattleUIMalfunctionGlow.GlowType.Repaired, force: true, method_44());
MonoBehaviourSingleton<PreloaderUI>.Instance.MalfunctionGlow.ShowGlow(BattleUIMalfunctionGlow.GlowType.Repaired, true, method_44());
}
}

public override void Execute(GClass2837 operation, [CanBeNull] Callback callback)
{
// Do not replicate picking up quest items, throws an error on the other clients
if (operation is GClass2839 pickupOperation)
{
if (pickupOperation.Item.Template.QuestItem)
{
base.Execute(operation, callback);
return;
}
}

if (MatchmakerAcceptPatches.IsServer)
{
// Do not replicate quest operations
if (operation is GClass2866 or GClass2879)
{
base.Execute(operation, callback);
return;
}

HostInventoryOperationManager operationManager = new(this, operation, callback);
if (vmethod_0(operationManager.operation))
{
operationManager.operation.vmethod_0(operationManager.HandleResult);

// Do not replicate picking up quest items, throws an error on the other clients
if (operation is GClass2839 pickupOperation)
{
if (pickupOperation.Item.Template.QuestItem)
{
return;
}
}

// TODO: Check for glass increments
if (operation is GClass2870)
{
return;
}

InventoryPacket packet = new()
{
HasItemControllerExecutePacket = true
Expand All @@ -69,7 +71,7 @@ public override void Execute(GClass2837 operation, [CanBeNull] Callback callback
OperationBytes = opBytes
};

CoopPlayer.PacketSender?.InventoryPackets?.Enqueue(packet);
CoopPlayer.PacketSender.InventoryPackets.Enqueue(packet);

return;
}
Expand All @@ -78,14 +80,11 @@ public override void Execute(GClass2837 operation, [CanBeNull] Callback callback
}
else if (MatchmakerAcceptPatches.IsClient)
{
// Do not replicate picking up quest items, throws an error on the other clients
if (operation is GClass2839 pickupOperation)
// Do not replicate quest operations
if (operation is GClass2866 or GClass2879)
{
if (pickupOperation.Item.Template.QuestItem)
{
base.Execute(operation, callback);
return;
}
base.Execute(operation, callback);
return;
}

InventoryPacket packet = new()
Expand Down Expand Up @@ -113,7 +112,7 @@ public override void Execute(GClass2837 operation, [CanBeNull] Callback callback
OperationBytes = opBytes
};

CoopPlayer.PacketSender?.InventoryPackets?.Enqueue(packet);
CoopPlayer.PacketSender.InventoryPackets.Enqueue(packet);
}
}

Expand Down
Loading
Loading