Fix leave/join hack
This commit is contained in:
parent
e73b8b47dc
commit
cef2bc4f1d
4 changed files with 8 additions and 12 deletions
|
@ -10,5 +10,5 @@ function give_initial_stuff(player)
|
|||
end
|
||||
end
|
||||
|
||||
minetest.register_on_newplayer(give_initial_stuff)
|
||||
minetest.register_on_joinplayer(give_initial_stuff)
|
||||
minetest.register_on_respawnplayer(give_initial_stuff)
|
|
@ -47,3 +47,5 @@ minetest.register_on_joinplayer(function(player)
|
|||
player:set_inventory_formspec(fs)
|
||||
end
|
||||
end)
|
||||
|
||||
dofile(minetest.get_modpath("ctf_inventory") .. "/give_initial_stuff.lua")
|
||||
|
|
|
@ -4,12 +4,10 @@ local drop = function(pos, itemstack)
|
|||
local obj = core.add_item(pos, it)
|
||||
|
||||
if obj then
|
||||
|
||||
obj:setvelocity({x=math.random(-1,1), y=5, z=math.random(-1,1)})
|
||||
|
||||
local remi = minetest.setting_get("remove_items")
|
||||
|
||||
if remi and remi == "true" then
|
||||
if minetest.is_yes(remi) then
|
||||
obj:remove()
|
||||
end
|
||||
|
||||
|
@ -26,8 +24,6 @@ minetest.register_on_dieplayer(function(player)
|
|||
local pos = player:getpos()
|
||||
pos.y = math.floor(pos.y + 0.5)
|
||||
|
||||
minetest.chat_send_player(player:get_player_name(), 'at '..math.floor(pos.x)..','..math.floor(pos.y)..','..math.floor(pos.z))
|
||||
|
||||
local player_inv = player:get_inventory()
|
||||
|
||||
for i=1,player_inv:get_size("main") do
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
default
|
||||
|
Loading…
Reference in a new issue