Changeset 2826
- Timestamp:
- Mar 23, 2009, 12:02:49 PM (16 years ago)
- Location:
- code/trunk
- Files:
-
- 100 edited
- 16 copied
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:mergeinfo changed
/code/branches/miniprojects (added) merged: 2755,2768,2789,2806,2818-2821,2824
- Property svn:mergeinfo changed
-
code/trunk/bin/client1.bat.in
- Property svn:mergeinfo changed (with no actual effect on merging)
-
code/trunk/bin/client2.bat.in
- Property svn:mergeinfo changed (with no actual effect on merging)
-
code/trunk/bin/dedicated.bat.in
- Property svn:mergeinfo changed (with no actual effect on merging)
-
code/trunk/bin/run.bat.in
- Property svn:mergeinfo changed (with no actual effect on merging)
-
code/trunk/bin/server.bat.in
- Property svn:mergeinfo changed (with no actual effect on merging)
-
code/trunk/cmake/FindDirectX.cmake
- Property svn:mergeinfo changed (with no actual effect on merging)
-
code/trunk/cmake/LibraryConfigTardis.cmake
- Property svn:mergeinfo changed (with no actual effect on merging)
-
code/trunk/src/core/LuaBind.cc
- Property svn:mergeinfo changed (with no actual effect on merging)
-
code/trunk/src/core/LuaBind.h
- Property svn:mergeinfo changed (with no actual effect on merging)
-
code/trunk/src/core/Template.cc
- Property svn:mergeinfo changed (with no actual effect on merging)
-
code/trunk/src/core/Template.h
- Property svn:mergeinfo changed (with no actual effect on merging)
-
code/trunk/src/core/XMLFile.h
- Property svn:mergeinfo changed (with no actual effect on merging)
-
code/trunk/src/core/XMLIncludes.h
- Property svn:mergeinfo changed (with no actual effect on merging)
-
code/trunk/src/cpptcl/cpptcl.cc
- Property svn:mergeinfo changed (with no actual effect on merging)
-
code/trunk/src/cpptcl/cpptcl.h
- Property svn:mergeinfo changed (with no actual effect on merging)
-
code/trunk/src/network/synchronisable/NetworkCallback.h
- Property svn:mergeinfo changed (with no actual effect on merging)
-
code/trunk/src/network/synchronisable/Synchronisable.cc
- Property svn:mergeinfo changed (with no actual effect on merging)
-
code/trunk/src/network/synchronisable/Synchronisable.h
- Property svn:mergeinfo changed (with no actual effect on merging)
-
code/trunk/src/orxonox/CameraManager.cc
- Property svn:mergeinfo changed (with no actual effect on merging)
-
code/trunk/src/orxonox/CameraManager.h
- Property svn:mergeinfo changed (with no actual effect on merging)
-
code/trunk/src/orxonox/OrxonoxPrereqs.h
r2710 r2826 104 104 class RadarListener; 105 105 106 class Teamcolourable; 107 106 108 class CameraManager; 107 109 class LevelManager; … … 149 151 class ParticleSpawner; 150 152 153 class PongCenterpoint; 154 class PongBall; 155 class PongBat; 156 151 157 class Camera; 152 158 class CameraPosition; 153 159 class SpawnPoint; 160 class TeamSpawnPoint; 154 161 155 162 class Spectator; … … 193 200 194 201 class Gametype; 202 class Deathmatch; 203 class TeamDeathmatch; 204 class Pong; 195 205 196 206 class Scores; -
code/trunk/src/orxonox/gamestates/GSLevel.cc
r2759 r2826 49 49 namespace orxonox 50 50 { 51 SetCommandLineArgument(level, "presentation .oxw").shortcut("l");51 SetCommandLineArgument(level, "presentation_dm.oxw").shortcut("l"); 52 52 53 53 GSLevel::GSLevel() -
code/trunk/src/orxonox/objects/CMakeLists.txt
r2710 r2826 8 8 RadarListener.cc 9 9 RadarViewable.cc 10 Teamcolourable.cc 10 11 Tickable.cc 11 12 Test.cc -
code/trunk/src/orxonox/objects/Level.cc
- Property svn:mergeinfo changed
/code/branches/miniprojects/src/orxonox/objects/Level.cc (added) merged: 2768
r2710 r2826 105 105 { 106 106 Identifier* identifier = ClassByString(gametype); 107 if (identifier && identifier->isA(Class(Gametype))) 107 108 if (!identifier || !identifier->isA(Class(Gametype))) 108 109 { 110 COUT(0) << "Error: \"" << gametype << "\" is not a valid gametype." << std::endl; 111 identifier = Class(Gametype); 112 this->gametype_ = "Gametype"; 113 } 114 else 109 115 this->gametype_ = gametype; 110 116 111 Gametype* rootgametype = dynamic_cast<Gametype*>(identifier->fabricate(this)); 112 this->setGametype(rootgametype); 117 std::cout << "Load Gametype: " << this->gametype_ << std::endl; 113 118 114 for (std::list<BaseObject*>::iterator it = this->objects_.begin(); it != this->objects_.end(); ++it)115 (*it)->setGametype(rootgametype);119 Gametype* rootgametype = dynamic_cast<Gametype*>(identifier->fabricate(this)); 120 this->setGametype(rootgametype); 116 121 117 if (LevelManager::getInstancePtr()) 118 LevelManager::getInstance().requestActivity(this); 119 } 122 std::cout << "root gametype: " << rootgametype->getIdentifier()->getName() << std::endl; 123 124 for (std::list<BaseObject*>::iterator it = this->objects_.begin(); it != this->objects_.end(); ++it) 125 (*it)->setGametype(rootgametype); 126 127 if (LevelManager::getInstancePtr()) 128 LevelManager::getInstance().requestActivity(this); 120 129 } 121 130 - Property svn:mergeinfo changed
-
code/trunk/src/orxonox/objects/Level.h
- Property svn:mergeinfo changed (with no actual effect on merging)
-
code/trunk/src/orxonox/objects/collisionshapes
- Property svn:mergeinfo changed (with no actual effect on merging)
-
code/trunk/src/orxonox/objects/controllers/Controller.cc
r2662 r2826 43 43 this->player_ = 0; 44 44 this->controllableEntity_ = 0; 45 this->hud_ = 0;46 this->bUpdateHUD_ = false;47 45 } 48 46 49 47 Controller::~Controller() 50 48 { 51 if (this->isInitialized() && this->hud_)52 delete this->hud_;53 }54 55 void Controller::changedControllableEntity()56 {57 if (this->bUpdateHUD_)58 {59 this->updateHUD();60 this->bUpdateHUD_ = false;61 }62 63 if (this->hud_)64 this->hud_->setOwner(this->getControllableEntity());65 }66 67 void Controller::updateHUD()68 {69 if (this->hud_)70 {71 delete this->hud_;72 this->hud_ = 0;73 }74 75 if (this->hudtemplate_ != "")76 {77 this->hud_ = new OverlayGroup(this);78 this->hud_->addTemplate(this->hudtemplate_);79 this->hud_->setOwner(this->getControllableEntity());80 }81 49 } 82 50 } -
code/trunk/src/orxonox/objects/controllers/Controller.h
r2662 r2826 57 57 inline ControllableEntity* getControllableEntity() const 58 58 { return this->controllableEntity_; } 59 virtual void changedControllableEntity(); 60 61 inline void setHUDTemplate(const std::string& name) 62 { 63 if (name != this->hudtemplate_) 64 { 65 this->hudtemplate_ = name; 66 if (this->controllableEntity_) 67 this->updateHUD(); 68 else 69 this->bUpdateHUD_ = true; 70 } 71 } 72 inline const std::string& getHUDTemplate() const 73 { return this->hudtemplate_; } 74 75 inline OverlayGroup* getHUD() const 76 { return this->hud_; } 59 virtual void changedControllableEntity() {} 77 60 78 61 protected: 79 void updateHUD();80 81 62 PlayerInfo* player_; 82 63 ControllableEntity* controllableEntity_; 83 std::string hudtemplate_;84 OverlayGroup* hud_;85 bool bUpdateHUD_;86 64 }; 87 65 } -
code/trunk/src/orxonox/objects/gametypes/CMakeLists.txt
r2710 r2826 1 1 ADD_SOURCE_FILES(ORXONOX_SRC_FILES 2 2 Gametype.cc 3 Deathmatch.cc 4 TeamDeathmatch.cc 5 Pong.cc 3 6 ) -
code/trunk/src/orxonox/objects/gametypes/Gametype.cc
r2710 r2826 44 44 #include "objects/worldentities/Camera.h" 45 45 46 #include "network/Host.h"47 48 46 namespace orxonox 49 47 { … … 65 63 66 64 this->setConfigValues(); 67 68 this->addBots(this->numberOfBots_);69 65 70 66 // load the corresponding score board … … 105 101 void Gametype::start() 106 102 { 107 COUT(0) << "game started" << std::endl; 103 this->addBots(this->numberOfBots_); 104 108 105 this->gtinfo_.bStarted_ = true; 109 106 … … 113 110 void Gametype::end() 114 111 { 115 COUT(0) << "game ended" << std::endl;116 112 this->gtinfo_.bEnded_ = true; 117 113 } … … 120 116 { 121 117 this->players_[player].state_ = PlayerState::Joined; 122 123 std::string message = player->getName() + " entered the game"; 124 COUT(0) << message << std::endl; 125 Host::Broadcast(message); 126 } 127 128 void Gametype::playerLeft(PlayerInfo* player) 118 } 119 120 bool Gametype::playerLeft(PlayerInfo* player) 129 121 { 130 122 std::map<PlayerInfo*, Player>::iterator it = this->players_.find(player); … … 132 124 { 133 125 this->players_.erase(it); 134 135 std::string message = player->getName() + " left the game"; 136 COUT(0) << message << std::endl; 137 Host::Broadcast(message); 138 } 126 return true; 127 } 128 return false; 139 129 } 140 130 … … 147 137 } 148 138 149 voidGametype::playerChangedName(PlayerInfo* player)139 bool Gametype::playerChangedName(PlayerInfo* player) 150 140 { 151 141 if (this->players_.find(player) != this->players_.end()) … … 153 143 if (player->getName() != player->getOldName()) 154 144 { 155 std::string message = player->getOldName() + " changed name to " + player->getName(); 156 COUT(0) << message << std::endl; 157 Host::Broadcast(message); 158 } 159 } 145 return true; 146 } 147 } 148 return false; 160 149 } 161 150 … … 168 157 } 169 158 159 void Gametype::playerPreSpawn(PlayerInfo* player) 160 { 161 } 162 163 void Gametype::playerPostSpawn(PlayerInfo* player) 164 { 165 } 166 167 void Gametype::playerStartsControllingPawn(PlayerInfo* player, Pawn* pawn) 168 { 169 } 170 171 void Gametype::playerStopsControllingPawn(PlayerInfo* player, Pawn* pawn) 172 { 173 } 174 175 bool Gametype::allowPawnHit(Pawn* victim, Pawn* originator) 176 { 177 return true; 178 } 179 180 bool Gametype::allowPawnDamage(Pawn* victim, Pawn* originator) 181 { 182 return true; 183 } 184 185 bool Gametype::allowPawnDeath(Pawn* victim, Pawn* originator) 186 { 187 return true; 188 } 189 170 190 void Gametype::pawnKilled(Pawn* victim, Pawn* killer) 171 191 { 172 if (victim && victim->getPlayer())173 {174 std::string message;175 if (killer)176 {177 if (killer->getPlayer())178 message = victim->getPlayer()->getName() + " was killed by " + killer->getPlayer()->getName();179 else180 message = victim->getPlayer()->getName() + " was killed";181 }182 else183 message = victim->getPlayer()->getName() + " died";184 185 COUT(0) << message << std::endl;186 Host::Broadcast(message);187 }188 189 192 if (victim && victim->getPlayer()) 190 193 { … … 197 200 // Reward killer 198 201 if (killer) 199 { 200 std::map<PlayerInfo*, Player>::iterator itKiller = this->players_.find(killer->getPlayer()); 201 if (itKiller != this->players_.end()) 202 { 203 this->playerScored(itKiller->second); 204 } 205 else 206 COUT(2) << "Warning: Killing Pawn was not in the playerlist" << std::endl; 207 } 202 this->playerScored(killer->getPlayer()); 208 203 209 204 ControllableEntity* entity = this->defaultControllableEntity_.fabricate(victim->getCreator()); … … 225 220 } 226 221 227 void Gametype::playerScored(Player& player) 228 { 229 player.frags_++; 222 void Gametype::playerScored(PlayerInfo* player) 223 { 224 std::map<PlayerInfo*, Player>::iterator it = this->players_.find(player); 225 if (it != this->players_.end()) 226 it->second.frags_++; 230 227 } 231 228 … … 336 333 if (spawnpoint) 337 334 { 335 this->playerPreSpawn(player); 338 336 player->startControl(spawnpoint->spawn()); 339 337 this->players_[player].state_ = PlayerState::Alive; 338 this->playerPostSpawn(player); 340 339 } 341 340 else -
code/trunk/src/orxonox/objects/gametypes/Gametype.h
r2662 r2826 84 84 virtual void end(); 85 85 virtual void playerEntered(PlayerInfo* player); 86 virtual voidplayerLeft(PlayerInfo* player);86 virtual bool playerLeft(PlayerInfo* player); 87 87 virtual void playerSwitched(PlayerInfo* player, Gametype* newgametype); 88 88 virtual void playerSwitchedBack(PlayerInfo* player, Gametype* oldgametype); 89 virtual voidplayerChangedName(PlayerInfo* player);89 virtual bool playerChangedName(PlayerInfo* player); 90 90 91 virtual void playerScored(Player& player); 91 virtual void playerScored(PlayerInfo* player); 92 93 virtual bool allowPawnHit(Pawn* victim, Pawn* originator = 0); 94 virtual bool allowPawnDamage(Pawn* victim, Pawn* originator = 0); 95 virtual bool allowPawnDeath(Pawn* victim, Pawn* originator = 0); 92 96 93 97 virtual void pawnKilled(Pawn* victim, Pawn* killer = 0); 94 98 virtual void pawnPreSpawn(Pawn* pawn); 95 99 virtual void pawnPostSpawn(Pawn* pawn); 100 virtual void playerPreSpawn(PlayerInfo* player); 101 virtual void playerPostSpawn(PlayerInfo* player); 102 103 virtual void playerStartsControllingPawn(PlayerInfo* player, Pawn* pawn); 104 virtual void playerStopsControllingPawn(PlayerInfo* player, Pawn* pawn); 96 105 97 106 inline const std::map<PlayerInfo*, Player>& getPlayers() const … … 106 115 { return this->gtinfo_.startCountdown_; } 107 116 117 inline void setHUDTemplate(const std::string& name) 118 { this->gtinfo_.hudtemplate_ = name; } 119 inline const std::string& getHUDTemplate() const 120 { return this->gtinfo_.hudtemplate_; } 121 108 122 void addBots(unsigned int amount); 109 123 void killBots(unsigned int amount = 0); … … 112 126 { return this->players_.size(); } 113 127 114 pr ivate:128 protected: 115 129 virtual SpawnPoint* getBestSpawnPoint(PlayerInfo* player) const; 116 130 117 void addPlayer(PlayerInfo* player); 118 void removePlayer(PlayerInfo* player); 119 120 void assignDefaultPawnsIfNeeded(); 121 void checkStart(); 122 void spawnPlayer(PlayerInfo* player); 123 void spawnPlayersIfRequested(); 124 void spawnDeadPlayersIfRequested(); 131 virtual void assignDefaultPawnsIfNeeded(); 132 virtual void checkStart(); 133 virtual void spawnPlayer(PlayerInfo* player); 134 virtual void spawnPlayersIfRequested(); 135 virtual void spawnDeadPlayersIfRequested(); 125 136 126 137 GametypeInfo gtinfo_; -
code/trunk/src/orxonox/objects/infos/GametypeInfo.cc
r2662 r2826 58 58 registerVariable(this->startCountdown_, variableDirection::toclient); 59 59 registerVariable(this->bStartCountdownRunning_, variableDirection::toclient); 60 registerVariable(this->hudtemplate_, variableDirection::toclient); 60 61 } 61 62 } -
code/trunk/src/orxonox/objects/infos/GametypeInfo.h
r2662 r2826 56 56 { return this->startCountdown_; } 57 57 58 inline const std::string& getHUDTemplate() const 59 { return this->hudtemplate_; } 60 58 61 private: 59 62 bool bStarted_; … … 61 64 bool bStartCountdownRunning_; 62 65 float startCountdown_; 66 std::string hudtemplate_; 63 67 }; 64 68 } -
code/trunk/src/orxonox/objects/infos/HumanPlayer.cc
r2662 r2826 53 53 this->defaultController_ = Class(HumanController); 54 54 55 this->humanHud_ = 0; 56 this->gametypeHud_ = 0; 57 55 58 this->setConfigValues(); 56 59 this->registerVariables(); … … 59 62 HumanPlayer::~HumanPlayer() 60 63 { 64 if (this->BaseObject::isInitialized()) 65 { 66 if (this->humanHud_) 67 delete this->humanHud_; 68 69 if (this->gametypeHud_) 70 delete this->gametypeHud_; 71 } 61 72 } 62 73 … … 89 100 void HumanPlayer::configvaluecallback_changedHUDTemplate() 90 101 { 91 this-> changedController();102 this->setHumanHUDTemplate(this->hudtemplate_); 92 103 } 93 104 … … 111 122 112 123 this->createController(); 124 this->updateHumanHUD(); 113 125 } 114 126 } … … 146 158 } 147 159 148 void HumanPlayer::changedController() 149 { 150 if (this->getController()) 151 { 152 this->getController()->setHUDTemplate(this->hudtemplate_); 153 154 if (this->getController() && this->getController()->getHUD()) 155 this->getController()->getHUD()->setOwner(this->getControllableEntity()); 160 void HumanPlayer::changedGametype() 161 { 162 PlayerInfo::changedGametype(); 163 164 if (this->isInitialized() && this->isLocalPlayer()) 165 if (this->getGametype()->getHUDTemplate() != "") 166 this->setGametypeHUDTemplate(this->getGametype()->getHUDTemplate()); 167 } 168 169 void HumanPlayer::changedControllableEntity() 170 { 171 PlayerInfo::changedControllableEntity(); 172 173 if (this->humanHud_) 174 this->humanHud_->setOwner(this->getControllableEntity()); 175 176 if (this->gametypeHud_) 177 this->gametypeHud_->setOwner(this->getControllableEntity()); 178 } 179 180 void HumanPlayer::updateHumanHUD() 181 { 182 if (this->humanHud_) 183 { 184 delete this->humanHud_; 185 this->humanHud_ = 0; 186 } 187 188 if (this->isLocalPlayer() && this->humanHudTemplate_ != "") 189 { 190 this->humanHud_ = new OverlayGroup(this); 191 this->humanHud_->addTemplate(this->humanHudTemplate_); 192 this->humanHud_->setOwner(this->getControllableEntity()); 193 } 194 } 195 196 void HumanPlayer::updateGametypeHUD() 197 { 198 if (this->gametypeHud_) 199 { 200 delete this->gametypeHud_; 201 this->gametypeHud_ = 0; 202 } 203 204 if (this->isLocalPlayer() && this->gametypeHudTemplate_ != "") 205 { 206 this->gametypeHud_ = new OverlayGroup(this); 207 this->gametypeHud_->addTemplate(this->gametypeHudTemplate_); 208 this->gametypeHud_->setOwner(this->getControllableEntity()); 156 209 } 157 210 } -
code/trunk/src/orxonox/objects/infos/HumanPlayer.h
r2662 r2826 51 51 void setClientID(unsigned int clientID); 52 52 53 virtual void changedController(); 53 virtual void changedGametype(); 54 virtual void changedControllableEntity(); 55 56 inline void setHumanHUDTemplate(const std::string& name) 57 { 58 if (name != this->humanHudTemplate_) 59 { 60 this->humanHudTemplate_ = name; 61 this->updateHumanHUD(); 62 } 63 } 64 inline const std::string& getHumanHUDTemplate() const 65 { return this->humanHudTemplate_; } 66 inline OverlayGroup* getHumanHUD() const 67 { return this->humanHud_; } 68 69 inline void setGametypeHUDTemplate(const std::string& name) 70 { 71 if (name != this->gametypeHudTemplate_) 72 { 73 this->gametypeHudTemplate_ = name; 74 this->updateGametypeHUD(); 75 } 76 } 77 inline const std::string& getGametypeHUDTemplate() const 78 { return this->gametypeHudTemplate_; } 79 inline OverlayGroup* getGametypeHUD() const 80 { return this->gametypeHud_; } 54 81 55 82 protected: … … 61 88 void networkcallback_client_initialized(); 62 89 90 void updateHumanHUD(); 91 void updateGametypeHUD(); 92 63 93 std::string nick_; 64 94 std::string synchronize_nick_; … … 66 96 bool server_initialized_; 67 97 bool client_initialized_; 98 99 std::string humanHudTemplate_; 100 OverlayGroup* humanHud_; 101 std::string gametypeHudTemplate_; 102 OverlayGroup* gametypeHud_; 68 103 }; 69 104 } -
code/trunk/src/orxonox/objects/infos/PlayerInfo.cc
r2662 r2826 141 141 if (this->controller_) 142 142 this->controller_->setControllableEntity(entity); 143 144 this->changedControllableEntity(); 143 145 } 144 146 … … 155 157 if (callback) 156 158 entity->removePlayer(); 159 160 this->changedControllableEntity(); 157 161 } 158 162 } -
code/trunk/src/orxonox/objects/infos/PlayerInfo.h
r2662 r2826 49 49 virtual void changedGametype(); 50 50 51 virtual void changedController() {} 52 virtual void changedControllableEntity() {} 53 51 54 inline bool isHumanPlayer() const 52 55 { return this->bHumanPlayer_; } … … 73 76 inline Controller* getController() const 74 77 { return this->controller_; } 75 virtual void changedController() {}76 78 77 79 protected: -
code/trunk/src/orxonox/objects/pickup/Usable.h
- Property svn:mergeinfo changed (with no actual effect on merging)
-
code/trunk/src/orxonox/objects/quest/AddQuest.cc
- Property svn:mergeinfo changed (with no actual effect on merging)
-
code/trunk/src/orxonox/objects/quest/AddQuest.h
- Property svn:mergeinfo changed (with no actual effect on merging)
-
code/trunk/src/orxonox/objects/quest/AddQuestHint.cc
- Property svn:mergeinfo changed (with no actual effect on merging)
-
code/trunk/src/orxonox/objects/quest/AddQuestHint.h
- Property svn:mergeinfo changed (with no actual effect on merging)
-
code/trunk/src/orxonox/objects/quest/AddReward.cc
- Property svn:mergeinfo changed (with no actual effect on merging)
-
code/trunk/src/orxonox/objects/quest/AddReward.h
- Property svn:mergeinfo changed (with no actual effect on merging)
-
code/trunk/src/orxonox/objects/quest/ChangeQuestStatus.cc
- Property svn:mergeinfo changed (with no actual effect on merging)
-
code/trunk/src/orxonox/objects/quest/ChangeQuestStatus.h
- Property svn:mergeinfo changed (with no actual effect on merging)
-
code/trunk/src/orxonox/objects/quest/CompleteQuest.cc
- Property svn:mergeinfo changed (with no actual effect on merging)
-
code/trunk/src/orxonox/objects/quest/CompleteQuest.h
- Property svn:mergeinfo changed (with no actual effect on merging)
-
code/trunk/src/orxonox/objects/quest/FailQuest.cc
- Property svn:mergeinfo changed (with no actual effect on merging)
-
code/trunk/src/orxonox/objects/quest/FailQuest.h
- Property svn:mergeinfo changed (with no actual effect on merging)
-
code/trunk/src/orxonox/objects/quest/GlobalQuest.cc
- Property svn:mergeinfo changed (with no actual effect on merging)
-
code/trunk/src/orxonox/objects/quest/GlobalQuest.h
- Property svn:mergeinfo changed (with no actual effect on merging)
-
code/trunk/src/orxonox/objects/quest/LocalQuest.cc
- Property svn:mergeinfo changed (with no actual effect on merging)
-
code/trunk/src/orxonox/objects/quest/LocalQuest.h
- Property svn:mergeinfo changed (with no actual effect on merging)
-
code/trunk/src/orxonox/objects/quest/Quest.cc
- Property svn:mergeinfo changed (with no actual effect on merging)
-
code/trunk/src/orxonox/objects/quest/Quest.h
- Property svn:mergeinfo changed (with no actual effect on merging)
-
code/trunk/src/orxonox/objects/quest/QuestDescription.cc
- Property svn:mergeinfo changed (with no actual effect on merging)
-
code/trunk/src/orxonox/objects/quest/QuestDescription.h
- Property svn:mergeinfo changed (with no actual effect on merging)
-
code/trunk/src/orxonox/objects/quest/QuestEffect.cc
- Property svn:mergeinfo changed (with no actual effect on merging)
-
code/trunk/src/orxonox/objects/quest/QuestEffect.h
- Property svn:mergeinfo changed (with no actual effect on merging)
-
code/trunk/src/orxonox/objects/quest/QuestHint.cc
- Property svn:mergeinfo changed (with no actual effect on merging)
-
code/trunk/src/orxonox/objects/quest/QuestHint.h
- Property svn:mergeinfo changed (with no actual effect on merging)
-
code/trunk/src/orxonox/objects/quest/QuestItem.cc
- Property svn:mergeinfo changed (with no actual effect on merging)
-
code/trunk/src/orxonox/objects/quest/QuestItem.h
- Property svn:mergeinfo changed (with no actual effect on merging)
-
code/trunk/src/orxonox/objects/quest/QuestManager.cc
- Property svn:mergeinfo changed (with no actual effect on merging)
-
code/trunk/src/orxonox/objects/quest/QuestManager.h
- Property svn:mergeinfo changed (with no actual effect on merging)
-
code/trunk/src/orxonox/objects/quest/Rewardable.cc
- Property svn:mergeinfo changed (with no actual effect on merging)
-
code/trunk/src/orxonox/objects/quest/Rewardable.h
- Property svn:mergeinfo changed (with no actual effect on merging)
-
code/trunk/src/orxonox/objects/weaponSystem/WeaponSystem.cc
- Property svn:mergeinfo changed (with no actual effect on merging)
-
code/trunk/src/orxonox/objects/weaponSystem/WeaponSystem.h
- Property svn:mergeinfo changed (with no actual effect on merging)
-
code/trunk/src/orxonox/objects/worldentities/Backlight.cc
- Property svn:mergeinfo changed (with no actual effect on merging)
-
code/trunk/src/orxonox/objects/worldentities/Backlight.h
- Property svn:mergeinfo changed (with no actual effect on merging)
-
code/trunk/src/orxonox/objects/worldentities/Billboard.h
r2662 r2826 34 34 #include "util/Math.h" 35 35 #include "tools/BillboardSet.h" 36 #include "objects/Teamcolourable.h" 36 37 37 38 namespace orxonox 38 39 { 39 class _OrxonoxExport Billboard : public StaticEntity 40 class _OrxonoxExport Billboard : public StaticEntity, public Teamcolourable 40 41 { 41 42 public: … … 61 62 { return this->colour_; } 62 63 64 virtual void setTeamColour(const ColourValue& colour) 65 { this->setColour(colour); } 66 63 67 protected: 64 68 inline BillboardSet& getBillboardSet() -
code/trunk/src/orxonox/objects/worldentities/CMakeLists.txt
r2710 r2826 19 19 Planet.cc 20 20 SpawnPoint.cc 21 TeamSpawnPoint.cc 22 PongCenterpoint.cc 23 PongBall.cc 24 PongBat.cc 21 25 ) 22 26 -
code/trunk/src/orxonox/objects/worldentities/Camera.cc
- Property svn:mergeinfo changed (with no actual effect on merging)
-
code/trunk/src/orxonox/objects/worldentities/Camera.h
- Property svn:mergeinfo changed (with no actual effect on merging)
-
code/trunk/src/orxonox/objects/worldentities/CameraPosition.cc
r2662 r2826 44 44 this->bDrag_ = false; 45 45 this->bAllowMouseLook_ = false; 46 this->bAbsolute_ = false; 46 47 47 48 this->setObjectMode(0x0); … … 58 59 XMLPortParam(CameraPosition, "drag", setDrag, getDrag, xmlelement, mode).defaultValues(false); 59 60 XMLPortParam(CameraPosition, "mouselook", setAllowMouseLook, getAllowMouseLook, xmlelement, mode).defaultValues(false); 61 XMLPortParam(CameraPosition, "absolute", setIsAbsolute, getIsAbsolute, xmlelement, mode).defaultValues(false); 60 62 } 61 63 -
code/trunk/src/orxonox/objects/worldentities/CameraPosition.h
r2662 r2826 54 54 { return this->bAllowMouseLook_; } 55 55 56 inline void setIsAbsolute(bool bAbsolute) 57 { this->bAbsolute_ = bAbsolute; } 58 inline bool getIsAbsolute() const 59 { return this->bAbsolute_; } 60 56 61 void attachCamera(Camera* camera); 57 62 … … 59 64 bool bDrag_; 60 65 bool bAllowMouseLook_; 66 bool bAbsolute_; 61 67 }; 62 68 } -
code/trunk/src/orxonox/objects/worldentities/ControllableEntity.cc
r2662 r2826 144 144 void ControllableEntity::addCameraPosition(CameraPosition* position) 145 145 { 146 if (position->getAllowMouseLook()) 147 position->attachToNode(this->cameraPositionRootNode_); 146 if (!position->getIsAbsolute()) 147 { 148 if (position->getAllowMouseLook()) 149 position->attachToNode(this->cameraPositionRootNode_); 150 else 151 this->attach(position); 152 } 148 153 else 149 this->attach(position); 154 { 155 WorldEntity* parent = this->getParent(); 156 if (parent) 157 parent->attach(position); 158 } 150 159 this->cameraPositions_.push_back(position); 151 160 } -
code/trunk/src/orxonox/objects/worldentities/Light.h
r2662 r2826 37 37 38 38 #include "util/Math.h" 39 #include "objects/Teamcolourable.h" 39 40 40 41 namespace orxonox 41 42 { 42 class _OrxonoxExport Light : public StaticEntity 43 class _OrxonoxExport Light : public StaticEntity, public Teamcolourable 43 44 { 44 45 public: … … 68 69 inline const ColourValue& getSpecularColour() const 69 70 { return this->specular_; } 71 72 virtual void setTeamColour(const ColourValue& colour) 73 { this->setDiffuseColour(colour); this->setSpecularColour(colour); } 70 74 71 75 /** -
code/trunk/src/orxonox/objects/worldentities/MobileEntity.cc
- Property svn:mergeinfo changed
/code/trunk/src/orxonox/objects/worldentities/MobileEntity.cc merged: 2171-2660
- Property svn:mergeinfo changed
-
code/trunk/src/orxonox/objects/worldentities/MobileEntity.h
- Property svn:mergeinfo changed
/code/trunk/src/orxonox/objects/worldentities/MobileEntity.h merged: 2171-2660
- Property svn:mergeinfo changed
-
code/trunk/src/orxonox/objects/worldentities/ParticleSpawner.cc
- Property svn:mergeinfo changed (with no actual effect on merging)
-
code/trunk/src/orxonox/objects/worldentities/ParticleSpawner.h
- Property svn:mergeinfo changed (with no actual effect on merging)
-
code/trunk/src/orxonox/objects/worldentities/StaticEntity.cc
- Property svn:mergeinfo changed (with no actual effect on merging)
-
code/trunk/src/orxonox/objects/worldentities/StaticEntity.h
- Property svn:mergeinfo changed (with no actual effect on merging)
-
code/trunk/src/orxonox/objects/worldentities/pawns/Pawn.cc
r2809 r2826 133 133 } 134 134 135 void Pawn::setPlayer(PlayerInfo* player) 136 { 137 ControllableEntity::setPlayer(player); 138 139 if (this->getGametype()) 140 this->getGametype()->playerStartsControllingPawn(player, this); 141 } 142 143 void Pawn::removePlayer() 144 { 145 if (this->getGametype()) 146 this->getGametype()->playerStopsControllingPawn(this->getPlayer(), this); 147 148 ControllableEntity::removePlayer(); 149 } 150 135 151 void Pawn::setHealth(float health) 136 152 { … … 140 156 void Pawn::damage(float damage, Pawn* originator) 141 157 { 142 this->setHealth(this->health_ - damage); 143 this->lastHitOriginator_ = originator; 144 145 // play damage effect 158 if (this->getGametype() && this->getGametype()->allowPawnDamage(this, originator)) 159 { 160 this->setHealth(this->health_ - damage); 161 this->lastHitOriginator_ = originator; 162 163 // play damage effect 164 } 146 165 } 147 166 148 167 void Pawn::hit(Pawn* originator, const Vector3& force, float damage) 149 168 { 150 this->damage(damage, originator); 151 this->setVelocity(this->getVelocity() + force); 152 153 // play hit effect 169 if (this->getGametype() && this->getGametype()->allowPawnHit(this, originator)) 170 { 171 this->damage(damage, originator); 172 this->setVelocity(this->getVelocity() + force); 173 174 // play hit effect 175 } 154 176 } 155 177 … … 176 198 void Pawn::death() 177 199 { 178 // Set bAlive_ to false and wait for PawnManager to do the destruction 179 this->bAlive_ = false; 180 181 this->setDestroyWhenPlayerLeft(false); 182 183 if (this->getGametype()) 184 this->getGametype()->pawnKilled(this, this->lastHitOriginator_); 185 186 if (this->getPlayer()) 187 this->getPlayer()->stopControl(this); 188 189 if (Core::isMaster()) 190 this->deatheffect(); 200 if (this->getGametype() && this->getGametype()->allowPawnDeath(this, this->lastHitOriginator_)) 201 { 202 // Set bAlive_ to false and wait for PawnManager to do the destruction 203 this->bAlive_ = false; 204 205 this->setDestroyWhenPlayerLeft(false); 206 207 if (this->getGametype()) 208 this->getGametype()->pawnKilled(this, this->lastHitOriginator_); 209 210 if (this->getPlayer()) 211 this->getPlayer()->stopControl(this); 212 213 if (Core::isMaster()) 214 this->deatheffect(); 215 } 216 else 217 this->setHealth(1); 191 218 } 192 219 -
code/trunk/src/orxonox/objects/worldentities/pawns/Pawn.h
r2662 r2826 47 47 virtual void tick(float dt); 48 48 void registerVariables(); 49 50 virtual void setPlayer(PlayerInfo* player); 51 virtual void removePlayer(); 49 52 50 53 inline bool isAlive() const -
code/trunk/src/orxonox/objects/worldentities/triggers/DistanceTrigger.cc
- Property svn:mergeinfo changed (with no actual effect on merging)
-
code/trunk/src/orxonox/objects/worldentities/triggers/DistanceTrigger.h
- Property svn:mergeinfo changed (with no actual effect on merging)
-
code/trunk/src/orxonox/objects/worldentities/triggers/Trigger.cc
- Property svn:mergeinfo changed (with no actual effect on merging)
-
code/trunk/src/orxonox/objects/worldentities/triggers/Trigger.h
- Property svn:mergeinfo changed (with no actual effect on merging)
-
code/trunk/src/tolua/all-5.0.lua
- Property svn:mergeinfo changed (with no actual effect on merging)
-
code/trunk/src/tolua/all-5.1.lua
- Property svn:mergeinfo changed (with no actual effect on merging)
-
code/trunk/src/util
- Property svn:mergeinfo changed (with no actual effect on merging)
-
code/trunk/src/util/Exception.cc
- Property svn:mergeinfo changed (with no actual effect on merging)
-
code/trunk/src/util/Exception.h
- Property svn:mergeinfo changed (with no actual effect on merging)
-
code/trunk/src/util/SignalHandler.cc
- Property svn:mergeinfo changed (with no actual effect on merging)
-
code/trunk/src/util/SignalHandler.h
- Property svn:mergeinfo changed (with no actual effect on merging)
Note: See TracChangeset
for help on using the changeset viewer.