Special Aircraft Service

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Medicine against AI  (Read 2008 times)

0 Members and 1 Guest are viewing this topic.

SAS~Skipper

  • .. geese fly ...
  • SAS Honourable Member
  • member
  • Offline Offline
  • Posts: 1413
Medicine against AI
« on: August 16, 2011, 09:25:59 AM »

Here's an offer I received in ICQ.
Maybe somebody of the experts will evaluate the idea?

Quote
RMS.SS TITANIC (00:25:54 16/08/2011)
private void flutter() {
 if (Realism.Flutter_Effect)
     ((Aircraft) actor).msgCollision(actor, "CF_D0", "CF_D0");
    }   
    private void flutterDamage() {
 if (Realism.Flutter_Effect) {
     String string;
     switch (World.Rnd().nextInt(0, 29)) {
     case 0:
     case 1:
     case 2:
     case 3:
     case 20:
  string = "AroneL";
  break;
     case 4:
     case 5:
     case 6:
     case 7:
     case 21:
  string = "AroneR";
  break;
     case 8:
     case 9:
     case 10:
     case 22:
  string = "VatorL";
  break;
     case 11:
     case 12:
     case 13:
     case 23:
  string = "VatorR";
  break;
     case 24:
     case 25:
     case 26:
  string = "Rudder1";
  break;
     case 27:
     case 28:
     case 29:
  string = "Rudder2";
  break;
     case 14:
  string = "WingLOut";
  break;
     case 15:
  string = "WingROut";
  break;
     case 16:
  string = "WingLMid";
  break;
     case 17:
  string = "WingRMid";
  break;
     case 18:
  string = "WingLIn";
  break;
     case 19:
  string = "WingRIn";
  break;
     default:
  string = "CF";
     }
     string += "_D0";
     ((Aircraft) actor).msgCollision(actor, string, string);
 }
    }


 RMS.SS TITANIC (00:26:28 16/08/2011)

if (indSpeed > VmaxAllowed
       && (World.Rnd().nextFloat(0.0F, 16.0F)
    < indSpeed - VmaxAllowed)
       && World.Rnd().nextInt(0, 99) < 2)
       flutterDamage();
Logged

SAS~Storebror

  • retired
  • SAS Honourable Member
  • member
  • Offline Offline
  • Posts: 20268
  • Taking a timeout
    • STFU
Re: Medicine against AI
« Reply #1 on: August 16, 2011, 12:15:26 PM »

flutter code from the RealFlightModel class.
I guess the author's advice is to implement this in the AIFlightModel class?
Reasonable first hand, but it turns out to be wrong since AI simply doesn't know how to avoid this, so they'll still dive at above max speed and thus do flutter damage to themselves.

Best regards - Mike
Logged
While love lives, while suns set, while snowmoons rise in november skies
While ties bind, while souls cry, while oceans ride in an endless tide
While love grows, while blood flows, while truth is real you need never feel alone.
Pages: [1]   Go Up
 

Page created in 0.044 seconds with 26 queries.