Use more framenum instead of time. Also fix some checks while game in pause state.