Hopefully fixed the leveling after death

Moved the check for player death to the top of playerai::update.
shouldn't be game-breaking, but I still can't run the game more than
once per cloning of the repository, so I can't check. Please revert if
it does.