mirror of
https://github.com/PHIDIAS0303/ExpCluster.git
synced 2025-12-31 04:51:40 +09:00
0.17.35 Fixes
This commit is contained in:
@@ -4,7 +4,7 @@ local Roles = require 'expcore.roles'
|
|||||||
local function teleport(player)
|
local function teleport(player)
|
||||||
local surface = player.surface
|
local surface = player.surface
|
||||||
local spawn = player.force.get_spawn_position(surface)
|
local spawn = player.force.get_spawn_position(surface)
|
||||||
local position = surface.find_non_colliding_position('player',spawn,32,1)
|
local position = surface.find_non_colliding_position('character',spawn,32,1)
|
||||||
if not position then return false end
|
if not position then return false end
|
||||||
if player.driving then player.driving = false end -- kicks a player out a vehicle if in one
|
if player.driving then player.driving = false end -- kicks a player out a vehicle if in one
|
||||||
player.teleport(position,surface)
|
player.teleport(position,surface)
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ require 'config.command_parse_general'
|
|||||||
|
|
||||||
local function teleport(from_player,to_player)
|
local function teleport(from_player,to_player)
|
||||||
local surface = to_player.surface
|
local surface = to_player.surface
|
||||||
local position = surface.find_non_colliding_position('player',to_player.position,32,1)
|
local position = surface.find_non_colliding_position('character',to_player.position,32,1)
|
||||||
if not position then return false end -- return false if no new position
|
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
|
if from_player.driving then from_player.driving = false end -- kicks a player out a vehicle if in one
|
||||||
from_player.teleport(position,surface)
|
from_player.teleport(position,surface)
|
||||||
|
|||||||
Reference in New Issue
Block a user