From 79cb6ddc4923ea8a009b2810efe785cf3720c63f Mon Sep 17 00:00:00 2001 From: jordan4ibanez Date: Fri, 23 Apr 2021 22:35:35 -0400 Subject: [PATCH] Fix lua locals in environment.lua --- mods/ENTITIES/mcl_mobs/api/mob_functions/environment.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mods/ENTITIES/mcl_mobs/api/mob_functions/environment.lua b/mods/ENTITIES/mcl_mobs/api/mob_functions/environment.lua index 8320955adb..5b5dc5d47a 100644 --- a/mods/ENTITIES/mcl_mobs/api/mob_functions/environment.lua +++ b/mods/ENTITIES/mcl_mobs/api/mob_functions/environment.lua @@ -9,6 +9,7 @@ local minetest_registered_nodes = minetest.registered_nodes local minetest_get_connected_players = minetest.get_connected_players local vector_new = vector.new +local vector_add = vector.add local vector_multiply = vector.multiply local vector_distance = vector.distance @@ -39,7 +40,7 @@ mobs.detect_closest_player_within_radius = function(self, line_of_sight, radius, local pos2 = player:get_pos() - local distance = vector.distance(pos1,pos2) + local distance = vector_distance(pos1,pos2) if distance <= radius then if line_of_sight then @@ -94,7 +95,7 @@ mobs.jump_check = function(self,dtime) vector_multiply(dir, radius) --only jump if there's a node and a non-solid node above it - local test_dir = vector.add(pos,dir) + local test_dir = vector_add(pos,dir) local green_flag_1 = minetest_get_item_group(minetest_get_node(test_dir).name, "solid") ~= 0