mirror of
https://github.com/a-bad-dev/simple-shooter-game.git
synced 2026-06-08 20:12:11 +00:00
Fix a bunch of deprecation warnings
This commit is contained in:
parent
3d5641ffed
commit
9ebc01bf29
7 changed files with 34 additions and 31 deletions
|
|
@ -1 +0,0 @@
|
|||
hudbars?
|
||||
|
|
@ -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,
|
||||
|
|
|
|||
2
mods/misc/sprint/mod.conf
Normal file
2
mods/misc/sprint/mod.conf
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
name = sprint
|
||||
description = Slightly improved version of GunshipPenguin's sprint mod
|
||||
Loading…
Add table
Add a link
Reference in a new issue