StuckEnemyFix
why doesnt combat music end?
About this mod Author’s original text
StuckEnemyFix
doing alarms, wave enemies sometimes spawn on furniture and get stuck. they can't move so they keep combat music and -stamina up forever. fix here.
how
- aggressive non-flyer enemy is given 30 seconds to move 2 meters away from spawn position
- if it doesn't, it gets moved to a new random position in the same coursenode and given a target (closest player)
- enemy takes the hint, comes at you aggressively. eventually.
- if enemy doesn't start moving after 4 relocates (120 seconds), it will be killed off.
thanks
- amorously. thank you kind sir for the help.
- sam db - feedback
- flowaria - feedback and general gtfo gandalf'ness. thanks buddies, appreciated.
Changelog
V0.0.8
- doing a small delay of one second to record enemy spawn position
- had some instances of enemy falling thru spawnpoint floor, over 2 meters away from actual spawnpoint, no action taken (enemy moved!)
- routine used to abort after 60s when full course needs 120, fixed
- i recommend borkencellgeofix to eliminate the navmesh on furniture / props, helps immensely with enemy mobility
V0.0.7
- now runs master only, won't try to do anything on clients
- mono disabled after business concluded instead of just endless returns on fixedupdate
- settarget now targets closest player, not host player
V0.0.6
- 6s -> 30s
- upon reseting enemy destination and pathing, also SetTarget is called to counter target invalid bug.
V0.0.5
- added a few navmesh commands to get enemies even more unstuck'er.
- also replaced Debug.Log with ManualLogSource, thank you auri for the teach.
V0.0.4
- noticed stupid enemies standing still and teleporting around every 6 seconds
- changed the logic a bit to address the above, seems to work better.
V0.0.3
- enemies that somehow spawn directly onto cfoam are ignored, stuck-tests resumed after thawing.
V0.0.2
- changed position from portal 0 smack middle (problem with a few nogate plugs) to getrandompositioninside (spawnnode)
V0.0.1
- initial
Install & use Install: follow the bundled instructions
- Unzip the archive from playbuff and read the bundled readme / instructions first.
- Most mods rely on the game's mod loader — the usual route is a community mod manager (such as r2modman): pick this game, install, and it handles the loader and dependencies.
- For a manual install, put the mod files into the matching Mod / plugins folder inside the game directory.
- Launch the game to confirm it loaded; mods with listed dependencies need those installed as well.
Install locations vary a lot between mods — the bundled readme is the most reliable guide.