starlit  Diff

Differences From Artifact [e0959a01e2]:

To Artifact [236ca7459a]:


    44     44   				end
    45     45   			elseif ctx.how.state == 'prog' then
    46     46   				local d = ctx.how.delta
    47     47   				local p = user.action.prog.sprint
    48     48   				-- is the player currently holding any of WASD
    49     49   				local isMoving = bit.band(0x0f, user.entity:get_player_control_bits()) ~= 0
    50     50   				if p and isMoving then
    51         -					user.cooldownTimes.stamina = minetest.get_gametime()
           51  +					user.cooldownTimes.stamina = core.get_gametime()
    52     52   					p.cb = p.cb + cost*d
    53     53   					if p.cb >= 5 then
    54     54   						user:statDelta('stamina', -p.cb)
    55     55   						p.cb = 0
    56     56   						if user:effectiveStat 'stamina' < cost then halt() end
    57     57   					end
    58     58   				end