From 038d9ec0144504a4abfd506e1c512b380193581b Mon Sep 17 00:00:00 2001 From: ancientmarinerdev Date: Tue, 7 Mar 2023 22:16:56 +0000 Subject: [PATCH] Do not need to create new vector each time --- mods/ENTITIES/mcl_mobs/physics.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mods/ENTITIES/mcl_mobs/physics.lua b/mods/ENTITIES/mcl_mobs/physics.lua index 7d5eb6c68..1b6d7c544 100644 --- a/mods/ENTITIES/mcl_mobs/physics.lua +++ b/mods/ENTITIES/mcl_mobs/physics.lua @@ -1006,8 +1006,8 @@ function mob_class:check_suspend(player_in_active_range) local acc = self.object:get_acceleration() if acc then if acc.y > 0 or node_under ~= "air" then - self.object:set_acceleration(vector.new(0,0,0)) - self.object:set_velocity(vector.new(0,0,0)) + self.object:set_acceleration(vector.zero()) + self.object:set_velocity(vector.zero()) end if acc.y == 0 and node_under == "air" then self:falling(pos)