forked from MineClone5/MineClone5
Merge remote-tracking branch 'origin/master' into testing
This commit is contained in:
commit
5b258f5344
|
@ -29,7 +29,7 @@ local psdef= {
|
|||
minpos = vector.new(-6,3,-6),
|
||||
maxpos = vector.new(6,15,6),
|
||||
minvel = vector.new(-vel,-falling_speed,-vel),
|
||||
maxvel = math.random(vel,-falling_speed+vel,vel),
|
||||
maxvel = vector.new(vel,-falling_speed+vel,vel),
|
||||
minacc = vector.new(0,0,0),
|
||||
maxacc = vector.new(0,-0.4,0),
|
||||
minexptime = 0.5,
|
||||
|
@ -46,7 +46,7 @@ local psdef_backsplash= {
|
|||
minpos = vector.new(-3,-1,-3),
|
||||
maxpos = vector.new(3,0,3),
|
||||
minvel = vector.new(-vel,falling_speed*2,-vel),
|
||||
maxvel = math.random(vel,falling_speed*2+vel,vel),
|
||||
maxvel = vector.new(vel,falling_speed*2+vel,vel),
|
||||
minacc = vector.new(0,0,0),
|
||||
maxacc = vector.new(0,0,0),
|
||||
minexptime = 0.1,
|
||||
|
@ -119,19 +119,6 @@ function mcl_weather.rain.remove_player(player)
|
|||
end
|
||||
end
|
||||
|
||||
mcl_worlds.register_on_dimension_change(function(player, dimension)
|
||||
if dimension ~= "overworld" and dimension ~= "void" then
|
||||
mcl_weather.rain.remove_sound(player)
|
||||
mcl_weather.rain.remove_player(player)
|
||||
elseif dimension == "overworld" then
|
||||
mcl_weather.rain.update_sound(player)
|
||||
if mcl_weather.rain.raining then
|
||||
mcl_weather.rain.add_rain_particles(player)
|
||||
mcl_weather.rain.add_player(player)
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
-- adds and removes rain sound depending how much rain particles around player currently exist.
|
||||
-- have few seconds delay before each check to avoid on/off sound too often
|
||||
-- when player stay on 'edge' where sound should play and stop depending from random raindrop appearance.
|
||||
|
|
|
@ -183,8 +183,11 @@ local function set_interact(player, interact)
|
|||
local player_name = player:get_player_name()
|
||||
local privs = minetest.get_player_privs(player_name)
|
||||
if privs.interact ~= interact then
|
||||
privs.interact = interact
|
||||
minetest.set_player_privs(player_name, privs)
|
||||
local meta = player:get_meta()
|
||||
if meta:get_int("ineract_revoked") ~= 1 then
|
||||
privs.interact = interact
|
||||
minetest.set_player_privs(player_name, privs)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -464,6 +467,5 @@ minetest.register_on_joinplayer(function(player)
|
|||
shields = {},
|
||||
blocking = 0,
|
||||
}
|
||||
mcl_shields.players[player].blocking = 0
|
||||
remove_shield_hud(player)
|
||||
end)
|
||||
|
|
|
@ -20,12 +20,26 @@ end)
|
|||
|
||||
for _, action in pairs({"grant", "revoke"}) do
|
||||
minetest["register_on_priv_" .. action](function(name, _, priv)
|
||||
if priv == "fly" then
|
||||
local player = minetest.get_player_by_name(name)
|
||||
if player then
|
||||
local meta = player:get_meta()
|
||||
local player = minetest.get_player_by_name(name)
|
||||
if player then
|
||||
local meta = player:get_meta()
|
||||
|
||||
if priv == "fly" then
|
||||
meta:set_int("fly_changed", 1)
|
||||
end
|
||||
|
||||
--[[
|
||||
so e.g. hackers who have been revoked of the interact privilege
|
||||
will not automatically get the interact privilege through the mcl shields code back
|
||||
]]
|
||||
|
||||
if priv == "interact" then
|
||||
if action == "revoke" then
|
||||
meta:set_int("ineract_revoked", 1)
|
||||
else
|
||||
meta:set_int("ineract_revoked", 0)
|
||||
end
|
||||
end
|
||||
end
|
||||
end)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue