tesinormed / FAndCDaveCo

Lethal Company mod which adds an insurance system and a loan system
https://thunderstore.io/c/lethal-company/p/tesinormed/FAndCDaveCo/
Creative Commons Zero v1.0 Universal
0 stars 0 forks source link

Host/client desync #1

Open Seviper opened 2 months ago

Seviper commented 2 months ago

Howdy! Been noticing an issue while using this mod with my friends where when someone died, the "Days Left Until Quota" desynced for us when everyone was revived, and the ship lever was stuck in the "Wait until ship has landed" position. I did some testing with 1 friend and the resulting error only showed on client side, not host side. Something also of note was that I saw the deductions made when people died, but my friends did not.

[Error : Unity Log] NullReferenceException: Object reference not set to an instance of an object Stack trace: tesinormed.FAndCDaveCo.Network.State.get_DisableDeathCreditPenalty () (at ./Network/State.cs:16) (wrapper dynamic-method) StartOfRound+<EndOfGame>d__278.DMD<StartOfRound+<EndOfGame>d__278::MoveNext>(StartOfRound/<EndOfGame>d__278) tesinormed.FAndCDaveCo.Patches.StartOfRound_EndOfGame_Patch+<Postfix>d__2.MoveNext () (at ./Patches/StartOfRound_EndOfGame_Patch.cs:114) UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at <e27997765c1848b09d8073e5d642717a>:0)

Some notes

Hope this helps! When this mod works, it saves runs. 😄 Thanks much for it!

tesinormed commented 2 months ago

Thank you for the kind words! I would have replied to you earlier, but I was doing something. I'm going to investigate this issue right now.

tesinormed commented 2 months ago

I've been investigating, and I think this is probably an issue with network syncing of the plugin's state (ie the current insurance policy, claims, and loan). I'll be working on this more later today.

Seviper commented 2 months ago

Glad to hear you found the problem so quickly, good luck working on it!

tesinormed commented 1 month ago

Sorry that I haven't given any updates; I've been busy with other tasks and things. I will try to get a fix out within this week. Apologies for any disruptions this may have caused.