diff --git a/scripts/ai/turns/AITurn.lua b/scripts/ai/turns/AITurn.lua index db34c5b2c..c0ef15de8 100644 --- a/scripts/ai/turns/AITurn.lua +++ b/scripts/ai/turns/AITurn.lua @@ -108,6 +108,9 @@ end function AITurn:onBlocked() -- unregister here before the AITurn object is destructed self.proximityController:unregisterBlockingObjectListener() + -- restore onWaypoint* listeners before giving back control to the drive strategy, otherwise they'll be lost + -- when the recovery turn is instantiated and registers its own listeners + self.ppc:restorePreviouslyRegisteredListeners() self.driveStrategy:startRecoveryTurn(1 * self.turningRadius) end diff --git a/scripts/field/FieldScanner.lua b/scripts/field/FieldScanner.lua index 2260adea5..706afcc5f 100644 --- a/scripts/field/FieldScanner.lua +++ b/scripts/field/FieldScanner.lua @@ -177,7 +177,7 @@ function FieldScanner:findContour(x, z) else if not done and not lost then self:debug('%d. try, edge not found, we may have hit an island or corner, reset/rotate the probe a bit and retry', i) - setRotation(probe, 0, i * math.pi / 7, 0) + setRotation(probe, 0, i * math.pi / 6, 0) elseif lost then self:info('Could not trace field edge, limit search to field %d and retry', fieldId) limitToFieldId = fieldId