Optimized the collision checking so that it can handle more enemies/players in the room.