Frame wrote:Just out of curiosity,
...so does that mean that its 0.25 / 27.983 * 28.906 = number in seconds, time until the next appropriate action is taken ?
Cheers Frame...
Think interval is always 0.125 when I am right. Next think time is current time added with this think interval. This is overruled by a pauseAI command that changes the next thinktime into current time added with pause value.
At that time the UPDATE is executed. In your example it takes 28.906 - 27.983 = 0.923 seconds before the next UPDATE is evaluated. Or better: rounded up to the next multiple of think interval what is 8 * 0.125 = 1.00 seconds.
Planet patrol reads every 7.5 seconds its destination.
---
For me, I added debug messages in my Oolite source that logged the "destination" variable immediately after setting the beacon position. At that moment the value was always correct, but with a target dump it was on every dump different. Something is messing with that variable. But it is very selective as docking ships that almost use a similar flight behaviour, are not affected.
To make sure it was not a "checkCourseToDestination" that affected the stuf I simplified the code to:
Code: Select all
"GOTO_POSITION_N" = {
ENTER = ("setSpeedFactorTo: 1.0", "pauseAI: 5.0");
"DESIRED_RANGE_ACHIEVED" = ("setStateTo: RELEASE_N");
UPDATE = (setDestinationToStationBeacon, "setDesiredRangeTo: 10.0", "setSpeedFactorTo: 1.0", performFlyToRangeFromDestination, "pauseAI: 10.0");
};
The dumpstate however showed that the destination kept changing while it was correct immediately after every setDestinationToStationBeacon command.
Code: Select all
[dumpState.entity] Entity.m:1053: Universal ID: 298
[dumpState.entity] Entity.m:1055: Status: STATUS_IN_FLIGHT
[dumpState.entity] Entity.m:1056: Position: (21183.1, 37880, 438596)
[dumpState.shipEntity] ShipEntity.m:8371: Behaviour: BEHAVIOUR_FLY_TO_DESTINATION
[dumpState.shipEntity] ShipEntity.m:8373: Destination: (25893.2, 39328.8, 437066)
[dumpState.shipEntity] ShipEntity.m:8411: Spawn time: 24.3945 (20.2492 seconds ago)
----------
[dumpState.shipEntity] ShipEntity.m:8371: Behaviour: BEHAVIOUR_FLY_TO_DESTINATION
[dumpState.shipEntity] ShipEntity.m:8373: Destination: (22144.5, 36134.5, 433836)
[dumpState.shipEntity] ShipEntity.m:8411: Spawn time: 24.3945 (27.5919 seconds ago)
----------
[dumpState.shipEntity] ShipEntity.m:8371: Behaviour: BEHAVIOUR_FLY_TO_DESTINATION
[dumpState.shipEntity] ShipEntity.m:8373: Destination: (21684.4, 42960.4, 437847)
[dumpState.shipEntity] ShipEntity.m:8411: Spawn time: 24.3945 (42.7485 seconds ago)
----------
[dumpState.shipEntity] ShipEntity.m:8371: Behaviour: BEHAVIOUR_FLY_TO_DESTINATION
[dumpState.shipEntity] ShipEntity.m:8373: Destination: (25371.3, 37286.1, 435641)
[dumpState.shipEntity] ShipEntity.m:8411: Spawn time: 24.3945 (69.2076 seconds ago)
----------
[dumpState.shipEntity] ShipEntity.m:8371: Behaviour: BEHAVIOUR_FLY_TO_DESTINATION
[dumpState.shipEntity] ShipEntity.m:8373: Destination: (23760, 36225, 434443)
[dumpState.shipEntity] ShipEntity.m:8411: Spawn time: 24.3945 (78.2903 seconds ago)
----------
[dumpState.shipEntity] ShipEntity.m:8373: Destination: (21670.9, 36228.3, 433731)
[dumpState.shipEntity] ShipEntity.m:8411: Spawn time: 24.3945 (187.391 seconds ago)
Thinking further at the problem I noticed the similarity between my repairship and the planetPatrol is that it are both ships that started existence with a launch. So I spawned my repair ship and the destination did not change anymore and the buoy was drop on the spot.
Launching in the past has something to do with it.