Nivekk / KOS

Fully programmable autopilot mod for KSP.
Other
80 stars 30 forks source link

WAIT 0 ends up waiting for infiity. #249

Open Dunbaratu opened 10 years ago

Dunbaratu commented 10 years ago

It would seem intuitive that WAIT 0 would have no effect. It would wait for zero time.

But in fact it actually seems to wait forever.

Also, waiting for a negative time also waits forever. (I decided to try this when I noticed the effect of the wait 0 just to see what it would do too.)

This came up because I was trying to have the script wait a varying amount of time depending on different circumstances, and to turn off the wait entirely in some circumstances I just set the waitTime variable to zero, thinking that would work.

Obviously there's a work around, to do this:

if waitTime > 0 { wait waitTime. }.

So this isn't high priority. But it would probably not be what someone would expect so I figured I'd report it.