Fix convoy coordination, AI combat and spectator recovery
This commit is contained in:
+20
-1
@@ -29,9 +29,28 @@ int main(){
|
||||
vector away=StandOff({100,120,0},{0,0,0},{-40,0,0});assert(away.x>0);
|
||||
vector clear=StandOff({300,120,0},{0,0,0},{-40,0,0});assert(clear.x==-40);
|
||||
vector coincident=StandOff({0,120,0},{0,0,0},{0,0,0});assert(std::isfinite(coincident.x)&&coincident.x>0);
|
||||
// Clearing the target area specifies a minimum outward SPEED, not a
|
||||
// per-frame impulse. Repeated calls must not accelerate an already-safe
|
||||
// radial velocity, even while the aircraft remains inside the radius.
|
||||
vector outward{25,0,28};
|
||||
for(int i=0;i<600;i++)outward=StandOff({100,120,0},{0,0,0},outward);
|
||||
assert(std::abs(outward.x-25)<.001&&outward.z==28);
|
||||
vector correction=StandOff({170,120,0},{0,0,0},{-40,0,28});
|
||||
assert(std::abs(correction.x-5)<.001&&correction.z==28);
|
||||
// The same stationary close-contact observation at different frame rates
|
||||
// must not inject unbounded speed into the persistent smoothed velocity.
|
||||
for(int hz: {30,60,120}){
|
||||
vector v{-40,0,28};
|
||||
for(int frame=0;frame<hz*5;frame++){
|
||||
vector desired{-10,0,28};v=v+(desired-v)*(0.6f/hz);
|
||||
v=StandOff({100,120,0},{0,0,0},v);
|
||||
assert(v.Length()<40);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
''')
|
||||
print('PASS: original 15-minute launch/loss cadence, active/captured timer disarm, saved delay reset, stop, 300m orbit and close-contact standoff')
|
||||
print('PASS: original 15-minute launch/loss cadence, active/captured timer disarm, saved delay reset, stop, 300m orbit and bounded close-contact standoff at 30/60/120 Hz')
|
||||
|
||||
# Explicit entity deletion must not leave an inactive launch deadline behind.
|
||||
removed=body(path,'void Removed(')
|
||||
|
||||
Reference in New Issue
Block a user