From 76c67ac84eeedebcdb3b7dcc02c8965faaf21d65 Mon Sep 17 00:00:00 2001 From: nixnoxus Date: Fri, 22 Apr 2022 19:09:17 +0200 Subject: [PATCH] unnecessary checks in `is_vector()` removed --- mods/default/functions.lua | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/mods/default/functions.lua b/mods/default/functions.lua index 39b73149..3c95508c 100644 --- a/mods/default/functions.lua +++ b/mods/default/functions.lua @@ -723,10 +723,8 @@ local log_non_player_actions = minetest.settings:get_bool("log_non_player_action -- `vector.check` is available since minetest >= 5.5.0 local is_vector = vector.check or function(v) - return v and type(v) == "table" and - v.x and type(v.x) == "number" and - v.y and type(v.y) == "number" and - v.z and type(v.z) == "number" + return type(v) == "table" and + type(v.x) == "number" and type(v.y) == "number" and type(v.z) == "number" end function default.log_player_action(player, ...)