]> git.mxchange.org Git - flightgear.git/commitdiff
Fix to an ATC/AI communication timing bug
authordaveluff <daveluff>
Wed, 7 May 2003 00:07:20 +0000 (00:07 +0000)
committerdaveluff <daveluff>
Wed, 7 May 2003 00:07:20 +0000 (00:07 +0000)
src/ATC/tower.cxx

index 3ba92f03eca1b16655a914bcf3a7d82c83e030a0..db95044a56f23004f1a5c8c1b1c741b50f722829 100644 (file)
@@ -199,6 +199,7 @@ void FGTower::Init() {
 
 void FGTower::Update(double dt) {
        static int ii = 0;      // Counter for spreading the load
+       int ii_max = 15;
        //cout << "T" << flush;
        // Each time step, what do we need to do?
        // We need to go through the list of outstanding requests and acknowedgements
@@ -285,7 +286,7 @@ void FGTower::Update(double dt) {
                                                // possibly tell him to hold and what position he is?
                                        }
                                } else {
-                                       t->clearanceCounter += (dt * holdList.size());
+                                       t->clearanceCounter += (dt * holdList.size() * ii_max);
                                }
                        }                               
                        ++holdListItr;
@@ -445,7 +446,7 @@ void FGTower::Update(double dt) {
        
        ++ii;
        // How big should ii get - ie how long should the update cycle interval stretch?
-       if(ii >= 15) {
+       if(ii >= ii_max) {
                ii = 0;
        }
 }