1.) You're looping through all the characters in your game. Maybe it would be better to check if the character is actually in the same room as the player first.
2.) What's wrong with the commented code? It should work well in most cases and be a LOT faster.
2.) What's wrong with the commented code? It should work well in most cases and be a LOT faster.