Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
This package has been marked as deprecated, and it's suggested another
alternative is used.
You are viewing a potentially older version of this package.
View all versions.
NutcrackerFixes
Lethal Company mod that patches components for the Nutcracker and Shotgun item to reduce lag spikes and non-registering shots.
| Date uploaded | 2 years ago |
| Version | 1.0.0 |
| Download link | Zaggy1024-NutcrackerFixes-1.0.0.zip |
| Downloads | 374 |
| Dependency string | Zaggy1024-NutcrackerFixes-1.0.0 |
This mod requires the following mods to function
BepInEx-BepInExPack
BepInEx pack for Mono Unity games. Preconfigured and ready to use.
Preferred version: 5.4.2100README
NutcrackerFixes
Overview
Lethal Company mod that patches components for the Nutcracker and Shotgun item to reduce lag spikes and non-registering shots.
Specific Changes
- Patch Shotgun hit registration to make it more consistent.
- The SphereCastNonAlloc() used to check for hits on monsters has an undefined order for its resulting hit list, but the existing code seemed to assume that it was ordered from closest to farthest. The hit registration would bail out under some conditions, causing shots not to hit if a hit was obstucted by a wall, entity behind the player, or a non-enemy collider.
- The array used to get the hits was limited to 10 elements, but more colliders will sometimes be present, and cause the cast to miss the actual target the Shotgun is aimed at. This especially tended to happen when blobs with their many colliders were present.
- Any duplicate hits to the same enemy will now be ignored. This shouldn't change behavior for damageable enemies, but will avoid spawning tens of sound effects for each blob hit by a shot, which significantly reduces stuttering when shooting nearby to a blob.
- Remove debug spam from the Nutcracker and Shotgun. These would cause lower frame rates and even stutters.
- Prevent a NullReferenceException when a Nutcracker would shoot a Blob. The Blob AI assumed that only players could hit it, but now that is no longer the case.
CHANGELOG
Version 1.2.2
- Updating readme and changelog since I accidentally bumped the version two minor versions instead of one...
Version 1.2.1
- Removed some leftover debug code.
Version 1.2.0
- Added an opt-out feature to help ensure that shotguns stay synchronized.
- When a client picks up a shotgun, the number of shells loaded as well as the current safety setting will be synchronized. This prevents an issue where having too many items on the ship would cause the safety and shell count to be desynced.
- The safety setting will also be synchronized to all clients when it is changed to ensure that it doesn't remain desynced if anything changes the safety unexpectedly.
Version 1.0.1
- Disabled logging in the shotgun hitreg loop
Version 1.0.0
- Fixed stutters on nutcrackers shooting other monsters
- Improved shotgun hit registration to avoid non-registering shots