Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 28, 2009, 1:58:22 AM (15 years ago)
Author:
landauf
Message:

Added Gameplay messages (Announces, Killmessages and Deathmessages)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/orxonox/objects/worldentities/triggers/CheckPoint.cc

    r3067 r3099  
    7272    {
    7373        SUPER(CheckPoint, changedActivity);
    74        
     74
    7575        if (this->BaseObject::isActive())
    7676        {
     
    9393            this->setRadarVisibility(false);
    9494
    95             if (bIsTriggered && bIsFirst_)
     95            if (bIsTriggered)
    9696            {
    97                 gametype->setTimeLimit(addTime_);
    98                 gametype->firstCheckpointReached(true);
    99             }
     97                if (bIsFirst_)
     98                {
     99                    gametype->setTimeLimit(addTime_);
     100                    gametype->firstCheckpointReached(true);
     101                }
    100102
    101             if (bIsTriggered && bIsDestination_)
    102             {
    103                 gametype->end();
     103                if (bIsDestination_)
     104                {
     105                    const_cast<GametypeInfo*>(gametype->getGametypeInfo())->sendAnnounceMessage("Congratulations - you have won the match!");
     106                    gametype->end();
     107                }
     108
     109                if (!bIsFirst_ && !bIsDestination_)
     110                {
     111                    const_cast<GametypeInfo*>(gametype->getGametypeInfo())->sendAnnounceMessage("Checkpoint reached");
     112                }
    104113            }
    105114        }
Note: See TracChangeset for help on using the changeset viewer.