1
0
Fork 0
MineClone2/mods/ENTITIES/mcl_mobs/api/ai/step_height.lua

10 lines
287 B
Lua

function mcl_mobs.mob:swap_auto_step_height_adjust()
local y_vel = self.object:get_velocity().y
if y_vel == 0 and self.stepheight ~= self.stepheight_backup then
self.stepheight = self.stepheight_backup
elseif y_vel ~= 0 and self.stepheight ~= 0 then
self.stepheight = 0
end
end