Lethal Company
This package has been deprecated and may no longer be maintained. We recommend looking for an alternative.
Install with App

Details

Latest version
1.3.4
Last Updated
First Uploaded
Downloads
92
Likes
0
Size
15KB
Dependants

Tags

Deprecated

MIDoorSync

A bug and incompatibility fix mod for v73.

This mod does not require Map Improvements but it is made specifically for it, the issue it fixes also fixes the issue for all other mods producing the same issue.

The Problem

Map Improvements adds extra fire exits by copying an existing outside door with Object.Instantiate. The copy is never spawned on the network, so the vanilla "player used this door" RPCs (TeleportPlayerServerRpc / TeleportPlayerClientRpc) can't run on it. You teleport on your own screen, but other players don't see you go through, don't hear the door, and still think you're on the other side.

The Fix

When a door with no network identity is used, this mod sends its own Netcode named message instead (door ID, side, position, player) to the host, which relays it to every client. Each client finds the same door locally and runs the same steps as the vanilla client RPC:

  • teleports the player model
  • plays the door audio
  • sets inside/outside for the player and their items
  • applies the spectator reverb

Normal, networked doors are untouched. The host only accepts a door-use message for the sender's own player. LethalLevelLoader's dungeon enter/exit events don't fire for non-networked doors, the same as without this mod.

Copied Doors and Switches

Map Improvements also copies interactive objects, such as Experimentation A's steel doors. Their open/close messages had the same problem as the fire exits: they went nowhere, so only the player who used them saw the change. MIDoorSync relays them through the host and replays the vanilla behaviour on every client: animation, sound and particles. It matches each copy by its place in the scene hierarchy, which is identical on every client, falling back to position.

Landing Hang Fix

Some Map Improvements layouts delete outside AI nodes (Experimentation C deletes 8). The game builds its list of outside nodes before Map Improvements runs, so the list still holds the deleted ones. CodeRebirth's flora spawner reads that list before the game refreshes it, throws on a deleted node, and level setup aborts, leaving the ship stuck landing forever. MIDoorSync removes deleted nodes from the list just before level setup.

LethalPerformance Warning

LethalPerformance shows "Entrance teleport mismatch. Expect 'The entrance appears to be blocked'" on landing whenever any door isn't networked, without checking whether the door works. MIDoorSync checks every non-networked door: if they all have an exit, the popup is hidden. If any door has no exit, the popup still shows and the door is named in the log.

Compatibility

  • EntranceTeleportOptimizations: Checked, compatible. Its cached exit lookup is used through FindExitPoint.

Incompatibilities

  • Entrance Blocker: Checked, incompatible. It causes blocked to appear. This will be fixed in the future.
Thunderstore development is made possible with ads. Please consider making an exception to your adblock.