From ad97fafa972bf019bf7534827cb5159b04dd9fe5 Mon Sep 17 00:00:00 2001 From: Cooldude2606 Date: Fri, 22 Mar 2019 21:23:55 +0000 Subject: [PATCH] Fixed Teleport when in vehicles --- modules/commands/teleport.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/commands/teleport.lua b/modules/commands/teleport.lua index 05f33a76..ed02fc0d 100644 --- a/modules/commands/teleport.lua +++ b/modules/commands/teleport.lua @@ -6,6 +6,7 @@ local function teleport(from_player,to_player) local surface = to_player.surface local position = surface.find_non_colliding_position('player',to_player.position,32,1) if not position then return false end -- return false if no new position + if from_player.driving then from_player.driving = false end -- kicks a player out a vehicle if in one from_player.teleport(position,surface) return true end