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.
FreddyEnemy Refix
Required fix for OrtonLongGaming's FreddyEnemy: restores compatibility and fixes the endless attack loop and repeat kills on revived players.
By UrisTeam
CHANGELOG
Changelog
1.0.1 - 2026-10-23
Fixed
- Freddy no longer gets stuck in an endless attack loop after his instant kill.
The previous
HandleAttackreplacement never cleared the state impulse and never started the 2-second attack timer, so the attack ran again every frame and Freddy never left theAttackstate. - Revived players are no longer killed again by a previous attack. Damage was being re-applied every frame to the stored target, with no distance or alive check.
- The attack animation trigger and its network RPC are no longer fired every frame.
Changed
CustomHandleAttacknow mirrors the original logic: consume the impulse, deal damage once, wait 2 seconds, switch off the mouth light and go toLeave.- Damage is only dealt if the target exists, is not disabled and is within 8 m of Freddy.
Otherwise Freddy skips the hit and goes to
Leave. - Restored the
FreddyZoomRPCcall that was missing from the previous patch. - Private fields are now accessed through cached Harmony references instead of
Traverseon every frame. - Added a hard dependency on
OrtonLongGaming-FreddyEnemyso load order is guaranteed. - Package renamed to
FreddyEnemy_Refix; BepInExPack dependency updated to 5.4.2305. - The transpilers now log a warning if they cannot find the call they need to replace.
Removed
- The
Unpatchblock inAwake, which removed every Harmony patch onEnemyFreddy.UpdateandEnemyFreddyAnim.Update, including patches from other mods.
1.0.0 (upstream: erv-FreddyEnemy_Patch)
- Original compatibility patch by erv: adapts the
HurtOtherandSound.PlayLoopcalls of FreddyEnemy to the current game version.