Have a look over what I checked in. I rewrote some of it (success min/max) since it still didnt look right. Let me know how it works out, I havent tested it.
A couple comments:
- use the log system to do conditional logging, not ifdef'd messages
- never cast unless you have very good reason to do so, it all too often masks or creates bugs.
|