Remove sprinting particles
This commit is contained in:
parent
25ea2afb10
commit
43754f7735
2 changed files with 1 additions and 22 deletions
|
@ -1 +1 @@
|
|||
Subproject commit 40c84728d45a148da083b969135298738b35bfdd
|
||||
Subproject commit 8b12a8e4f12ec12a076a161b7ed808ab147e785f
|
|
@ -53,27 +53,6 @@ minetest.register_globalstep(function(dtime)
|
|||
players[playerName]["shouldSprint"] = false
|
||||
end
|
||||
|
||||
--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 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},
|
||||
expirationtime = math.random(),
|
||||
size = math.random()+0.5,
|
||||
collisiondetection = true,
|
||||
vertical = false,
|
||||
texture = "sprint_particle.png",
|
||||
})
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
--Adjust player states
|
||||
if players[playerName]["shouldSprint"] == true then --Stopped
|
||||
setSprinting(playerName, true)
|
||||
|
|
Loading…
Reference in a new issue