Sneak+punch prevents pummels

This commit is contained in:
Aaron Suen 2020-06-19 13:45:51 -04:00
parent 2d65e279c2
commit e1a558b754
2 changed files with 1 additions and 3 deletions

View File

@ -21,8 +21,6 @@ ISSUES: Bugs, Cleanup and Refinements
- Add a README to the official screenshot world explaining how to use
- Sneak+punch should not trigger pummels.
- Take advantage of the fact that players/inventories use a single shared
metatable for player inventory arrangement hooks in nc_player_pickup,
like we did for entity:set_properties.

View File

@ -49,7 +49,7 @@ nodecore.register_on_dignode("dig pummel reset", function(_, _, digger)
end)
nodecore.register_on_punchnode("pummel check", function(pos, node, puncher, pointed)
if not puncher:is_player() then return end
if (not puncher:is_player()) or puncher:get_player_control().sneak then return end
local pname = puncher:get_player_name()
if not nodecore.interact(pname) then return end