-
Notifications
You must be signed in to change notification settings - Fork 1
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
Incompatibility with "More_Emotes" and "CrossHair " #4
Comments
Thanks for the issue on this! I looked briefly into the Crosshair code and found the method mentioned here: https://github.com/CTN-Originals/LethalCompany-CrossHair/blob/main/CrossHair/Patches/PlayerControllerBPatch.cs#L127 Even looking at the code it's not immediately clear to me as to what line is causing the issue. I know when I was testing OpenMonitors, I had to add the delay after the CreditsMonitor triggered because if it tried to update immediately in the patch, it was causing null references. I imagine something like that is happening here as well with |
For the The private void FindLegs()
{
_legs = (_player.transform.Find("ScavengerModel").Find("LEGS").GetComponent<SkinnedMeshRenderer>();
} |
I am also experiencing this issue. I'm not seeing how it could be an issue with More Emotes and/or CrossHair, given that they work without OpenMonitors installed, and they also work when Corporate Restructure is installed. If it helps, the issue is still present even with all of the terminals hidden via config options. I don't know anything about C# code or modding, but might the issue have to do with how OpenMonitors is patching "PlayerControllerB"? |
@julian-perge Could you please elaborate more on this and also point out where your have face this problem and how you have fixed it? |
There's a [HarmonyPostfix]
[HarmonyPatch(nameof(GameNetcodeStuff.PlayerControllerB.ConnectClientToPlayerObject))]
private static void OnPlayerConnect()
{
CoroutineHelper.Instance.StartCoroutine(WaitOnPlayerConnectForMonitorsToBeCreated());
}
private static IEnumerator WaitOnPlayerConnectForMonitorsToBeCreated()
{
ModLogger.LogDebug("WaitOnPlayerConnectForMonitorsToBeCreated");
yield return new WaitUntil(() => CreditsMonitor.Instance && LifeSupportMonitor.Instance);
CreditsMonitor.Instance.UpdateMonitor();
LifeSupportMonitor.Instance.UpdateMonitor();
PlayersLifeSupportMonitor.Instance.UpdateMonitor();
} |
Huh, I think I found the problem after digging a little deeper. https://github.com/julian-perge/LC_OpenMonitors/blob/main/OpenMonitors/Monitors/Setup.cs#L100 Here I'm renaming the GameObject to |
Yes, i have ndeed just found that same issue, the text i use as a reference is one of the monitors that you likely move around in some way which results in the crosshair mod not having the text reference. that is awkward... |
Thanks for working with me on this bug and hunting down the issue, I will update my mod once I have time. |
On the [Lethal Company Modding](https://discord.gg/lcmod) discord server, a server member ("haxe11") reported an [issue](julian-perge/LC_OpenMonitors#4) on the repo of [OpenMonitors](https://github.com/julian-perge/LC_OpenMonitors) that mentioned an incompatibility with this mod.
Should be fixed in v1.1.0 update. Sorry for the delay! |
Description:
For some very strange reason. These two mods do not work when Open Monitors is active. I have no idea why this happens, because at first glance they have nothing in common.
Edit: Corporate Restructure doesn't have this problem btw. No idea why.
Mods:
->https://thunderstore.io/c/lethal-company/p/CTNOriginals/CrossHair/
->https://thunderstore.io/c/lethal-company/p/Sligili/More_Emotes/
I get these errors in the Log:
`[Error : Unity Log] NullReferenceException: Object reference not set to an instance of an object
Stack trace:
MoreEmotes.Scripts.CustomAnimationObjects.FindLegs () (at :0)
MoreEmotes.Scripts.CustomAnimationObjects.Update () (at :0)
[Error : Unity Log] NullReferenceException: Object reference not set to an instance of an object
Stack trace:
CrossHair.Patches.PlayerControllerBPatch.Update (GameNetcodeStuff.PlayerControllerB& __instance) (at :0)
(wrapper dynamic-method) GameNetcodeStuff.PlayerControllerB.DMD<GameNetcodeStuff.PlayerControllerB::Update>(GameNetcodeStuff.PlayerControllerB)`
It would be great if you could find out what causes this error. To clarify, Open_Monitors works fine, the problem is that for some reason it makes the other 2 mods stop working.
The text was updated successfully, but these errors were encountered: