made it so units can go within mapsize not just window size