1
0
Fork 0

Fix lua locals in environment.lua

This commit is contained in:
jordan4ibanez 2021-04-23 22:35:35 -04:00
parent 6eb3eef215
commit 79cb6ddc49
1 changed files with 3 additions and 2 deletions

View File

@ -9,6 +9,7 @@ local minetest_registered_nodes = minetest.registered_nodes
local minetest_get_connected_players = minetest.get_connected_players local minetest_get_connected_players = minetest.get_connected_players
local vector_new = vector.new local vector_new = vector.new
local vector_add = vector.add
local vector_multiply = vector.multiply local vector_multiply = vector.multiply
local vector_distance = vector.distance 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 pos2 = player:get_pos()
local distance = vector.distance(pos1,pos2) local distance = vector_distance(pos1,pos2)
if distance <= radius then if distance <= radius then
if line_of_sight then if line_of_sight then
@ -94,7 +95,7 @@ mobs.jump_check = function(self,dtime)
vector_multiply(dir, radius) vector_multiply(dir, radius)
--only jump if there's a node and a non-solid node above it --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 local green_flag_1 = minetest_get_item_group(minetest_get_node(test_dir).name, "solid") ~= 0