![]() |
Quick Cleanup of the UpdateNPCAI - Printable Version +- Mirage Source (https://mirage-engine.uk/forums) +-- Forum: Mirage Source (Nostalgia) (https://mirage-engine.uk/forums/forumdisplay.php?fid=61) +--- Forum: Archive (2006-2011) (https://mirage-engine.uk/forums/forumdisplay.php?fid=18) +---- Forum: Source Code Development (https://mirage-engine.uk/forums/forumdisplay.php?fid=51) +----- Forum: Mirage Source 4 (Visual Basic 6) (https://mirage-engine.uk/forums/forumdisplay.php?fid=44) +----- Thread: Quick Cleanup of the UpdateNPCAI (/showthread.php?tid=2625) Pages:
1
2
|
Re: Quick Cleanup of the UpdateNPCAI - Robin - 19-03-2009 DoEvents should only be used to keep a program responsive to user-input. It seems most Mirage goers have it as a bad habit now. It's a relic of the past, at it's best. You shouldn't call every loop, if you do need to use it. Try something like this: Code: If GetInputState 0 Then DoEvents If the queue contains one or more new mouse-button or keyboard messages, the return value is nonzero, but if there are no new mouse-button or keyboard messages in the queue, the return value is zero. |