Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 11966 for code


Ignore:
Timestamp:
May 17, 2018, 2:30:20 PM (7 years ago)
Author:
andera
Message:

SpaceRaceController.cc updated

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/RacingBots_FS18/src/modules/gametypes/SpaceRace.cc

    r11938 r11966  
    8585        this->cantMove_ = false;
    8686        this->bTimeIsUp_ = false;
    87 
    8887        this->numberOfBots_ = 5; // quick fix: don't allow default-bots to enter the race
     88        this->bLost =false;
    8989        //we fixed the number of bots in order to have the same starting position all the time !
    9090    }
     
    125125        {
    126126            engine->setActive(false);
    127             engine->addSpeedMultiply(1.7);
    128 
    129            
    130         }
    131 
     127            engine->setAccelerationFront(100.0f);
     128        }
    132129
    133130        //append spawn positions to bots
     
    197194        {
    198195            message = multi_cast<std::string>(s) + "." + multi_cast<std::string>(ms) + " seconds !!\n"
    199                         + "You lose!";
    200         }
     196                        + "You loose!";
     197        }
     198        else if(this->bLost)
     199            message = multi_cast<std::string>(s)+"You could not reach the last checkpoint before your opponents. YOU LOOSE!";
    201200        else
    202201        {
     
    226225        this->getGametypeInfo()->sendAnnounceMessage(message);
    227226        ChatManager::message(message);
     227        if(checkpoint->getCheckpointIndex()==20){
     228             const std::string& message = player->getName() + " reached the checkpoint " + multi_cast<std::string>(checkpoint->getCheckpointIndex() + 1)
     229                + "after " + multi_cast<std::string>(s) + "." + multi_cast<std::string>(ms) + " seconds and WON THE GAME.";
     230
     231        }
    228232
    229233    }
Note: See TracChangeset for help on using the changeset viewer.