Improve warping code slightly.
This commit is contained in:
parent
c17fab7703
commit
5f4df3b138
|
@ -3,13 +3,16 @@
|
|||
function warp_to {
|
||||
parameter timestamp.
|
||||
|
||||
if timestamp <= TIME:seconds {
|
||||
return.
|
||||
}
|
||||
|
||||
print "Warping for " + round(timestamp - TIME:seconds, 1) + " seconds".
|
||||
KUNIVERSE:timewarp:warpto(timestamp). // TODO: improve.
|
||||
wait until TIME:seconds >= timestamp. // TODO
|
||||
}
|
||||
|
||||
function warp_for {
|
||||
parameter seconds.
|
||||
|
||||
print "Warping for " + round(seconds, 1) + " seconds".
|
||||
return warp_to(TIME:seconds + seconds).
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue