From 8f085e02a107dd8092393935bfa1bba71d2546d2 Mon Sep 17 00:00:00 2001 From: DS Date: Fri, 4 Jun 2021 21:22:33 +0200 Subject: Add metatables to lua vectors (#11039) Add backwards-compatible metatable functions for vectors. --- builtin/game/chat.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'builtin/game/chat.lua') diff --git a/builtin/game/chat.lua b/builtin/game/chat.lua index 4dbcff1e2..e155fba70 100644 --- a/builtin/game/chat.lua +++ b/builtin/game/chat.lua @@ -499,10 +499,10 @@ core.register_chatcommand("remove_player", { -- pos may be a non-integer position local function find_free_position_near(pos) local tries = { - {x=1, y=0, z=0}, - {x=-1, y=0, z=0}, - {x=0, y=0, z=1}, - {x=0, y=0, z=-1}, + vector.new( 1, 0, 0), + vector.new(-1, 0, 0), + vector.new( 0, 0, 1), + vector.new( 0, 0, -1), } for _, d in ipairs(tries) do local p = vector.add(pos, d) -- cgit v1.2.3