diff --git a/mods/ENTITIES/mcl_mobs/api/mob_functions/animation.lua b/mods/ENTITIES/mcl_mobs/api/mob_functions/animation.lua index 8d37b7c090..97d0f7894e 100644 --- a/mods/ENTITIES/mcl_mobs/api/mob_functions/animation.lua +++ b/mods/ENTITIES/mcl_mobs/api/mob_functions/animation.lua @@ -9,12 +9,6 @@ local vector_new = vector.new local minetest_dir_to_yaw = minetest.dir_to_yaw - --- simple degrees calculation -local degrees = function(yaw) - return(yaw*180.0/math_pi) -end - -- set defined animation mobs.set_mob_animation = function(self, anim, fixed_frame) diff --git a/mods/ENTITIES/mcl_mobs/api/mob_functions/collision.lua b/mods/ENTITIES/mcl_mobs/api/mob_functions/collision.lua index e6c89e2dbc..91feeb1927 100644 --- a/mods/ENTITIES/mcl_mobs/api/mob_functions/collision.lua +++ b/mods/ENTITIES/mcl_mobs/api/mob_functions/collision.lua @@ -1,6 +1,7 @@ local minetest_get_objects_inside_radius = minetest.get_objects_inside_radius local math_random = math.random +local vector_multiply = vector.multiply local integer_test = {-1,1} @@ -74,8 +75,12 @@ mobs.collision = function(self) local vel1 = vector.multiply(velocity, -1.5) local vel2 = vector.multiply(velocity, 1.5) - vel1 = vector.multiply(vel1, force) + vel1 = vector.multiply(vel1, force * 10) vel2 = vector.multiply(vel2, force) + + if object:is_player() then + vel2 = vector_multiply(vel2, 2.5) + end self.object:add_velocity(vel1) object:add_velocity(vel2)