added critical section to animation loop
Merge branch 'master' of github.com:jasonq/comp4903