mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-29 14:01:07 +01:00
Soul sand + (packed) ice or slimeblock = ultraslow
This commit is contained in:
parent
342f0dcdaa
commit
1f4f6a0e84
1 changed files with 8 additions and 3 deletions
|
@ -51,6 +51,7 @@ minetest.register_globalstep(function(dtime)
|
|||
-- what is around me?
|
||||
pos.y = pos.y - 0.1 -- standing on
|
||||
playerplus[name].nod_stand = node_ok(pos)
|
||||
playerplus[name].nod_stand_below = node_ok({x=pos.x, y=pos.y-1, z=pos.z})
|
||||
|
||||
pos.y = pos.y + 1.5 -- head level
|
||||
playerplus[name].nod_head = node_ok(pos)
|
||||
|
@ -75,11 +76,15 @@ minetest.register_globalstep(function(dtime)
|
|||
|
||||
-- standing on soul sand? if so walk slower
|
||||
if playerplus[name].nod_stand == "mcl_nether:soul_sand" then
|
||||
-- TODO: Fix walk speed
|
||||
-- TODO: Also check other blocks
|
||||
-- TODO: Tweak walk speed
|
||||
-- TODO: Also slow down mobs
|
||||
local below = playerplus[name].nod_stand_below
|
||||
if below == "mcl_core:ice" or below == "mcl_core:packed_ice" or below == "mcl_core:slimeblock" then
|
||||
def.speed = def.speed - 0.9
|
||||
else
|
||||
def.speed = def.speed - 0.6
|
||||
end
|
||||
end
|
||||
|
||||
-- set player physics
|
||||
-- TODO: Resolve conflict
|
||||
|
|
Loading…
Reference in a new issue