Fixes already fallen motionless rocks from falling rock traps killing NPCs that bump into them.
Requirements
This mod does not have any known dependencies other than the base game.
Permissions and credits
Credits and distribution permission
Other user's assetsAll the assets in this file belong to the author, or are from free-to-use modder's resources
Upload permissionYou can upload this file to other sites but you must credit me as the creator of the file
Modification permissionYou are allowed to modify my files and release bug fixes or improve on the features without permission from or credit to me
Conversion permissionYou can convert this file to work with other games as long as you credit me as the creator of the file
Asset use permissionYou are allowed to use the assets in this file without permission or crediting me
Asset use permission in mods/files that are being soldYou are not allowed to use assets from this file in any mods/files that are being sold, for money, on Steam Workshop or other platforms
Asset use permission in mods/files that earn donation pointsYou are allowed to earn Donation Points for your mods if they use my assets
Author notes
You can do whatever you want with this
File credits
This author has not credited anyone else in this file
Donation Points system
This mod is opted-in to receive Donation Points
Changelogs
Version 1.2
The horizontal velocities are now only unused when checking if damage should be done, but still passed to ProcessTrapHit() function. Idk what it affects but that will probably be more correct.
Version 1.1
a microoptimization
Description
It's very likely that you encountered and even exploited this bug when already fallen motionless rocks from falling rock traps damage NPCs that bump into/try to walk through them. At the same time the player only gets damage when the rocks are actually falling or rolling on them, and even if you sprint into the rocks it's almost impossible to receive damage. This mod fixes it, so that only falling or rolling rocks damage NPCs. It doesn't fix suicidal NPCs running right under falling or rolling rocks, which still do damage.
This bug is caused by the OnTrapHitStart script event behaving differently for NPCs and the player, which, in turn, may be caused by the physical interaction between NPCs and rocks being bugged. This mod workarounds it by making the script only use the vertical velocity in calculations for NPCs. The calculations for the player are unchanged.
Compatibility
Compatible with everything except mods changing the same vanilla script