mirror of
https://github.com/HybridDog/pdisc.git
synced 2025-01-09 17:10:18 +01:00
use us_time instead of gametime due to lack of precision, sleep → usleep
M faden.lua M standardbefehlssatz.lua
This commit is contained in:
parent
b03c1fe61b
commit
641aa73686
@ -82,7 +82,7 @@ return function(faden_manip, parsed)
|
|||||||
self:suscitate()
|
self:suscitate()
|
||||||
end,
|
end,
|
||||||
try_rebirth = function(self)
|
try_rebirth = function(self)
|
||||||
if minetest.get_gametime() >= self.rebirth then
|
if minetest.get_us_time() >= self.rebirth then
|
||||||
self:continue()
|
self:continue()
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
|
@ -106,7 +106,7 @@ s = {
|
|||||||
return false, "jump target out of range"
|
return false, "jump target out of range"
|
||||||
end
|
end
|
||||||
faden.ip = p-1
|
faden.ip = p-1
|
||||||
if not s.sleep({0}, faden) then
|
if not s.usleep({0}, faden) then
|
||||||
error(SE)
|
error(SE)
|
||||||
end
|
end
|
||||||
return true
|
return true
|
||||||
@ -179,7 +179,7 @@ s = {
|
|||||||
return true, params[1] < params[2]
|
return true, params[1] < params[2]
|
||||||
end,
|
end,
|
||||||
|
|
||||||
sleep = function(params, faden)
|
usleep = function(params, faden)
|
||||||
if #params ~= 1 then
|
if #params ~= 1 then
|
||||||
return false, WNOA
|
return false, WNOA
|
||||||
end
|
end
|
||||||
@ -187,7 +187,7 @@ s = {
|
|||||||
if type(p) ~= "number" then
|
if type(p) ~= "number" then
|
||||||
return false, UAT
|
return false, UAT
|
||||||
end
|
end
|
||||||
faden.rebirth = minetest.get_gametime() + p
|
faden.rebirth = minetest.get_us_time() + p
|
||||||
faden:stop()
|
faden:stop()
|
||||||
return true
|
return true
|
||||||
end,
|
end,
|
||||||
|
Loading…
Reference in New Issue
Block a user