Fix a bunch of deprecation warnings

This commit is contained in:
a-bad-dev 2026-01-22 20:21:43 -04:00
commit 9ebc01bf29
7 changed files with 34 additions and 31 deletions

View file

@ -37,7 +37,7 @@ minetest.register_on_joinplayer(function(player)
hb.init_hudbar(player, "sprint")
else
players[playerName].hud = player:hud_add({
hud_elem_type = "statbar",
type = "statbar",
position = {x=0.5,y=1},
size = {x=24, y=24},
text = "sprint_stamina_icon.png",
@ -70,14 +70,14 @@ minetest.register_globalstep(function(dtime)
--If the player is sprinting, create particles behind him/her
if playerInfo["sprinting"] == true and gameTime % 0.1 == 0 then
local numParticles = math.random(1, 2)
local playerPos = player:getpos()
local playerPos = player:get_pos()
local playerNode = minetest.get_node({x=playerPos["x"], y=playerPos["y"]-1, z=playerPos["z"]})
if playerNode["name"] ~= "air" then
for i=1, numParticles, 1 do
minetest.add_particle({
pos = {x=playerPos["x"]+math.random(-1,1)*math.random()/2,y=playerPos["y"]+0.1,z=playerPos["z"]+math.random(-1,1)*math.random()/2},
vel = {x=0, y=5, z=0},
acc = {x=0, y=-13, z=0},
velocity = {x=0, y=5, z=0},
acceleration = {x=0, y=-13, z=0},
expirationtime = math.random(),
size = math.random()+0.5,
collisiondetection = true,