only delete textures in devmode
fix pathfind fail due to use of wrong bounding box when checking buffer boundaries