diff --git a/mods/snow/config.txt b/mods/snow/config.txt index 5e8431d0..47935839 100644 --- a/mods/snow/config.txt +++ b/mods/snow/config.txt @@ -1,18 +1,18 @@ -# Reduces the amount of resources and fps used by snowfall. -lighter_snowfall = false -# Enables smooth transition of biomes -smooth_biomes = true -# The minumum height a snow biome will generate. -min_height = 3 -# Disable this to prevent sleds from being riden. -sleds = true +# Whether you are running a legacy minetest version (auto-detected). +legacy = false +# Enables falling snow. +enable_snowfall = true # Disable this to stop snow from being smoothed. smooth_snow = true # Disable this to remove christmas saplings from being found. christmas_content = true -# Whether you are running a legacy minetest version (auto-detected). -legacy = false +# The minumum height a snow biome will generate. +min_height = 3 +# Disable this to prevent sleds from being riden. +sleds = true # Enables debug output. debug = false -# Enables falling snow. -enable_snowfall = true \ No newline at end of file +# Reduces the amount of resources and fps used by snowfall. +lighter_snowfall = false +# Enables smooth transition of biomes +smooth_biomes = true diff --git a/mods/sprint/esprint.lua b/mods/sprint/esprint.lua index bcccdee6..73b8a22a 100644 --- a/mods/sprint/esprint.lua +++ b/mods/sprint/esprint.lua @@ -40,7 +40,23 @@ minetest.register_globalstep(function(dtime) --Loop through all connected players for playerName,playerInfo in pairs(players) do local player = minetest.get_player_by_name(playerName) + local pos = player:getpos() if player ~= nil then + -- From playerplus : + -- am I near a cactus? + pos.y = pos.y + 0.1 + local near = minetest.find_node_near(pos, 1, "default:cactus") + if near then + pos = near + + -- am I touching the cactus? if so it hurts + for _,player in ipairs(minetest.get_objects_inside_radius(pos, 1.0)) do + if player:get_hp() > 0 then + player:set_hp(player:get_hp()-1) + end + end + end + --Check if they are pressing the e key players[playerName]["epressed"] = player:get_player_control()["aux1"] diff --git a/mods/sprint/wsprint.lua b/mods/sprint/wsprint.lua index a20af3ce..bdc5ec00 100644 --- a/mods/sprint/wsprint.lua +++ b/mods/sprint/wsprint.lua @@ -40,7 +40,23 @@ minetest.register_globalstep(function(dtime) --Loop through all connected players for playerName,playerInfo in pairs(players) do local player = minetest.get_player_by_name(playerName) + local pos = player:getpos() if player ~= nil then + -- From playerplus : + -- am I near a cactus? + pos.y = pos.y + 0.1 + local near = minetest.find_node_near(pos, 1, "default:cactus") + if near then + pos = near + + -- am I touching the cactus? if so it hurts + for _,player in ipairs(minetest.get_objects_inside_radius(pos, 1.0)) do + if player:get_hp() > 0 then + player:set_hp(player:get_hp()-1) + end + end + end + --Check if they are moving or not players[playerName]["moving"] = player:get_player_control()["up"]