mirror of
https://github.com/Refactorio/RedMew.git
synced 2025-03-03 14:53:01 +02:00
Fixed tpplayer bug, invoke surface tp and player killed debug print
This commit is contained in:
parent
e7ffffac9f
commit
5969f1288c
@ -24,7 +24,7 @@ local function invoke(cmd)
|
||||
return
|
||||
end
|
||||
local pos = game.player.surface.find_non_colliding_position("player", game.player.position, 0, 1)
|
||||
game.players[target].teleport({pos.x, pos.y})
|
||||
game.players[target].teleport({pos.x, pos.y}, game.player.surface)
|
||||
game.print(target .. ", get your ass over here!")
|
||||
end
|
||||
|
||||
@ -39,7 +39,7 @@ local function teleport_player(cmd)
|
||||
return
|
||||
end
|
||||
local surface = game.players[target].surface
|
||||
local pos = surface.find_non_colliding_position("player", surface.position, 0, 1)
|
||||
local pos = surface.find_non_colliding_position("player", game.players[target].position, 0, 1)
|
||||
game.player.teleport(pos, surface)
|
||||
game.print(target .. "! watcha doin'?!")
|
||||
end
|
||||
|
@ -401,7 +401,7 @@ end
|
||||
|
||||
local function log_on_player_died_debug(str, event)
|
||||
local cause = event.cause or {name = "no cause"}
|
||||
game.write_file("on_player_died_debug", game.tick .. " (" .. game.players[event.player_index].name .. ", cause: " .. cause.name .. ") " .. str .. "\n", true, 1)
|
||||
game.write_file("on_player_died_debug", game.tick .. " (" .. game.players[event.player_index].name .. ", cause: " .. cause.name .. ") " .. str .. "\n", true, 0)
|
||||
end
|
||||
|
||||
local function player_list_on_player_died(event)
|
||||
|
Loading…
x
Reference in New Issue
Block a user