Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jul 22, 2012, 10:04:10 PM (12 years ago)
Author:
landauf
Message:

added const qualifier to all message-sending functions in GametypeInfo
removed some related const_casts from spacerace classes

Location:
code/branches/presentation2012merge/src/modules/gametypes
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentation2012merge/src/modules/gametypes/OldRaceCheckPoint.cc

    r9271 r9333  
    112112                const std::string& message =  "You have " + multi_cast<std::string>(this->bTimeLimit_)
    113113                            + " seconds to reach the check point " + multi_cast<std::string>(this->bCheckpointIndex_+1);
    114                 const_cast<GametypeInfo*>(gametype->getGametypeInfo())->sendAnnounceMessage(message);
     114                gametype->getGametypeInfo()->sendAnnounceMessage(message);
    115115                ChatManager::message(message);
    116116            }
  • code/branches/presentation2012merge/src/modules/gametypes/OldSpaceRace.cc

    r9271 r9333  
    5858                        + "You didn't reach the check point " + multi_cast<std::string>(this->checkpointsReached_+1)
    5959                        + " before the time limit. You lose!";
    60             const_cast<GametypeInfo*>(this->getGametypeInfo())->sendAnnounceMessage(message);
     60            this->getGametypeInfo()->sendAnnounceMessage(message);
    6161            ChatManager::message(message);
    6262        }
     
    6868            const std::string& message = "You win!! You have reached the last check point after "+ multi_cast<std::string>(s)
    6969                        + "." + multi_cast<std::string>(ms) + " seconds.";
    70             const_cast<GametypeInfo*>(this->getGametypeInfo())->sendAnnounceMessage(message);
     70            this->getGametypeInfo()->sendAnnounceMessage(message);
    7171            ChatManager::message(message);
    7272/*
     
    8585
    8686        std::string message("The match has started! Reach the check points as quickly as possible!");
    87         const_cast<GametypeInfo*>(this->getGametypeInfo())->sendAnnounceMessage(message);
     87        this->getGametypeInfo()->sendAnnounceMessage(message);
    8888        ChatManager::message(message);
    8989    }
     
    9898                        + " reached after " + multi_cast<std::string>(s) + "." + multi_cast<std::string>(ms)
    9999                        + " seconds.";
    100         const_cast<GametypeInfo*>(this->getGametypeInfo())->sendAnnounceMessage(message);
     100        this->getGametypeInfo()->sendAnnounceMessage(message);
    101101        ChatManager::message(message);
    102102    }
  • code/branches/presentation2012merge/src/modules/gametypes/RaceCheckPoint.cc

    r9263 r9333  
    9797            std::string message =  "You have " + multi_cast<std::string>(this->timeLimit_)
    9898                        + " seconds to reach the check point " + multi_cast<std::string>(this->checkpointIndex_ + 1);
    99             const_cast<GametypeInfo*>(this->getGametype()->getGametypeInfo())->sendAnnounceMessage(message);
     99            this->getGametype()->getGametypeInfo()->sendAnnounceMessage(message);
    100100            ChatManager::message(message);
    101101        }
  • code/branches/presentation2012merge/src/modules/gametypes/SpaceRace.cc

    r9306 r9333  
    7272        }
    7373
    74         const_cast<GametypeInfo*>(this->getGametypeInfo())->sendAnnounceMessage(message);
     74        this->getGametypeInfo()->sendAnnounceMessage(message);
    7575        ChatManager::message(message);
    7676    }
     
    9999
    100100            std::string message = "The match has started! Reach the check points as quickly as possible!";
    101             const_cast<GametypeInfo*>(this->getGametypeInfo())->sendAnnounceMessage(message);
     101            this->getGametypeInfo()->sendAnnounceMessage(message);
    102102            ChatManager::message(message);
    103103        }
     
    114114        const std::string& message = "Checkpoint " + multi_cast<std::string>(checkpoint->getCheckpointIndex() + 1)
    115115            + " reached after " + multi_cast<std::string>(s) + "." + multi_cast<std::string>(ms) + " seconds.";
    116         const_cast<GametypeInfo*>(this->getGametypeInfo())->sendAnnounceMessage(message);
     116        this->getGametypeInfo()->sendAnnounceMessage(message);
    117117        ChatManager::message(message);
    118118    }
Note: See TracChangeset for help on using the changeset viewer.