allocated dynamic temps from heap instead of stack to get to compile with msvc2010
msvc2010 compilation helps/fixes
maxtime is of type int, so fix comparison to use 0 not 0.0f