Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10283 in orxonox.OLD for branches/ai/src/ai/ai_team.cc


Ignore:
Timestamp:
Jan 17, 2007, 9:06:56 PM (17 years ago)
Author:
tfahrni
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/ai/src/ai/ai_team.cc

    r10275 r10283  
    5757                                        std::cout << "Go Start Position\n";
    5858                                        changeSwarmModule(it, new SwarmGoRel);
    59                                         newPosition=Vector(180,0,zNorm*60);
    60                                         speed=80;
    61                                 }else if(position.x > targetPos.x+150){ //go to attack position
     59                                        zNorm=1-(rand()%2)*2;   //1 or -1
     60                                        newPosition=Vector(190,0,zNorm*10);
     61                                        speed=60;
     62                                }else if(position.x > targetPos.x+160){ //go to attack position
    6263                                        std::cout << "Go Attack Position\n";
    6364                                        changeSwarmModule(it, new SwarmGoRel);
    64                                         newPosition=Vector(100,0,0);
    65                                         speed=80;
    66                                 }else if(position.x > targetPos.x+90){  //go to attack mode
     65                                        newPosition=Vector(130,0,0);
     66                                        speed=60;
     67                                }else if(position.x > targetPos.x+120){ //go to attack mode
    6768                                        std::cout << "Go Attack Mode\n";
    6869                                        changeSwarmModule(it, new SwarmAttack);
    69                                         newPosition=Vector(80,0,0);
    70                                         speed=80;
    71                                         maxTime=(rand()%11);//0-10 Sekunden
     70                                        newPosition=Vector(110,0,0);
     71                                        speed=60;
     72                                        maxTime=(rand()%11)+2;//2-12 Sekunden
    7273                                }else{                                                                                          //go to fallback point
    7374                                        std::cout << "Go  Fallback Point\n";
    7475                                        changeSwarmModule(it, new SwarmGoRel);
    75                                         newPosition=Vector(0,0,zNorm*100);
     76                                        newPosition=Vector(80,0,zNorm*90);
    7677                                        speed=80;
    7778                                }
     
    8081                        }
    8182
    82 
     83                        speed=0;
    8384
    8485                        if(enemyList->size()>0){
Note: See TracChangeset for help on using the changeset viewer.