Changeset 9272 for code/branches/presentation2012merge/src
- Timestamp:
- Jun 3, 2012, 6:05:24 PM (12 years ago)
- Location:
- code/branches/presentation2012merge/src
- Files:
-
- 26 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentation2012merge/src/modules/gametypes/SpaceRaceManager.cc
r9271 r9272 149 149 } 150 150 else 151 151 { 152 152 // adjust the radarvisibility 153 153 gametype->newCheckpointReached(newCheckpoint, player); -
code/branches/presentation2012merge/src/modules/pickup/items/DamageBoostPickup.cc
r9271 r9272 70 70 void DamageBoostPickup::initialize(void) 71 71 { 72 73 72 this->duration_ = 0.0f; 73 this->damageMultiplier_ = 1.0f; //The default damage multiplier. 74 74 //Defines who is allowed to pick up the pickup. 75 75 this->addTarget(ClassIdentifier<SpaceShip>::getIdentifier()); … … 130 130 SpaceShip* ship = this->carrierToSpaceShipHelper(); 131 131 if(ship == NULL) // If the PickupCarrier is no SpaceShip, then this pickup is useless and therefore is destroyed. 132 132 this->Pickupable::destroy(); 133 133 134 134 -
code/branches/presentation2012merge/src/modules/pickup/items/DamageBoostPickup.h
r9271 r9272 57 57 virtual void clone(OrxonoxClass*& item); //!< Creates a duplicate of the input OrxonoxClass. 58 58 59 59 /** 60 60 @brief Get the time the DamagePickup lasts. 61 61 @return Returns the time in seconds the DamagePickup lasts. … … 95 95 96 96 Timer durationTimer_; //!< Timer. 97 97 float duration_; //! Duration of damage boost. 98 98 99 99 }; -
code/branches/presentation2012merge/src/modules/towerdefense/CMakeLists.txt
r9271 r9272 5 5 TowerDefenseHUDController.cc 6 6 TowerDefensePlayerStats.cc 7 7 8 8 ) 9 9 … … 13 13 LINK_LIBRARIES 14 14 orxonox 15 15 overlays 16 16 SOURCE_FILES ${TOWERDEFENSE_SRC_FILES} 17 17 ) -
code/branches/presentation2012merge/src/modules/towerdefense/TDEnemy.h
r9271 r9272 13 13 14 14 private: 15 16 17 15 float health; 16 float speed; 17 float armour; 18 18 19 19 -
code/branches/presentation2012merge/src/modules/towerdefense/Tower.cc
r9271 r9272 17 17 { 18 18 CreateFactory(Tower); 19 19 20 20 /** 21 22 23 21 @brief 22 Constructor. Registers and initializes the object. 23 */ 24 24 Tower::Tower(BaseObject* creator) : Pawn(creator) 25 25 { … … 34 34 this->delay_ = false; 35 35 this->delayTimer_.setTimer(0.2f, false, createExecutor(createFunctor(&TetrisStone::enableMovement, this))); 36 36 */ 37 37 } 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 38 39 void Tower::setOrientation(const Quaternion& orientation) 40 { 41 static int ori; 42 orxout() << "orientation " << ++ori << endl; 43 } 44 45 void Tower::rotateYaw(const Vector2& value) 46 { 47 static int yaw; 48 orxout() << "rotateYaw " << ++yaw << endl; 49 } 50 51 void Tower::rotatePitch(const Vector2& value) 52 { 53 static int pitch; 54 orxout() << "rotatePitch " << ++pitch << endl; 55 } 56 57 void Tower::rotateRoll(const Vector2& value) 58 { 59 static int roll; 60 orxout() << "rotateRoll" << ++roll << endl; 61 } 62 63 // This function is called whenever a player presses the up or the down key. 64 64 // You have to implement what happens when the up or the down key is pressed. 65 65 // value.x < 0 means: down key is pressed. … … 75 75 76 76 /** 77 78 79 80 81 82 77 @brief 78 Overloaded the function to rotate the stone. 79 @param value 80 A vector whose first component is the angle by which to rotate. 81 */ 82 /* 83 83 void Tower::moveFrontBack(const Vector2& value) 84 84 { 85 85 //orxout() << "frontBack.x: " << value.x << endl; 86 86 } 87 88 87 */ 88 89 89 /** 90 91 92 93 94 95 90 @brief 91 Overloaded the function to steer the stone right and left 92 @param value 93 A vector whose first component is the direction in which we want to steer the stone. 94 */ 95 /* 96 96 void Tower::moveRightLeft(const Vector2& value) 97 97 { 98 99 98 //orxout() << "rightLeft.x: " << value.x << endl; 99 100 100 if(!this->delay_) 101 101 { … … 104 104 if(!this->tetris_->isValidMove(this, newPos)) 105 105 return; 106 106 107 107 this->setPosition(newPos); 108 108 this->delay_ = true; 109 109 this->delayTimer_.startTimer(); 110 110 } 111 111 } 112 112 */ 113 113 } -
code/branches/presentation2012merge/src/modules/towerdefense/Tower.h
r9271 r9272 10 10 @brief 11 11 See TowerDefenseReadme.txt for Information. 12 12 13 13 @ingroup TowerDefense 14 14 */ … … 20 20 #include "towerdefense/TowerDefensePrereqs.h" 21 21 #include "worldentities/pawns/SpaceShip.h" 22 22 23 23 24 24 namespace orxonox … … 26 26 class _TowerDefenseExport Tower : public Pawn 27 27 { 28 29 30 31 32 33 34 35 36 37 38 39 28 public: 29 Tower(BaseObject* creator); 30 virtual ~Tower() {}; 31 32 // Maybe later override these to move towers with cursor keys 33 /* 34 virtual void moveFrontBack(const Vector2& value); 35 virtual void moveRightLeft(const Vector2& value); 36 */ 37 38 // Overriding these to stop towers from spasing out 39 void setOrientation(const Quaternion& orientation); 40 40 virtual void rotateYaw(const Vector2& value); 41 41 virtual void rotatePitch(const Vector2& value); 42 42 virtual void rotateRoll(const Vector2& value); 43 44 45 46 47 43 44 void setGame(TowerDefense* towerdefense) 45 { assert(towerdefense); game_ = towerdefense; } 46 private: 47 TowerDefense* game_; 48 48 }; 49 49 } -
code/branches/presentation2012merge/src/modules/towerdefense/TowerDefense.cc
r9271 r9272 82 82 #include "worldentities/pawns/SpaceShip.h" 83 83 #include "controllers/WaypointController.h" 84 84 85 85 #include "graphics/Model.h" 86 86 #include "infos/PlayerInfo.h" 87 87 88 88 #include "chat/ChatManager.h" 89 89 … … 94 94 { 95 95 CreateUnloadableFactory(TowerDefense); 96 97 96 97 TowerDefense::TowerDefense(BaseObject* creator) : Deathmatch(creator) 98 98 { 99 99 RegisterObject(TowerDefense); 100 100 101 101 this->setHUDTemplate("TowerDefenseHUD"); 102 102 103 104 105 106 107 } 108 103 this->stats_ = new TowerDefensePlayerStats(); 104 105 /* Temporary hack to allow the player to add towers */ 106 this->dedicatedAddTower_ = createConsoleCommand( "addTower", createExecutor( createFunctor(&TowerDefense::addTower, this) ) ); 107 } 108 109 109 TowerDefense::~TowerDefense() 110 110 { 111 111 /* Part of a temporary hack to allow the player to add towers */ 112 112 if (this->isInitialized()) 113 113 { … … 116 116 } 117 117 } 118 119 120 121 122 123 124 125 118 119 void TowerDefense::setCenterpoint(TowerDefenseCenterpoint *centerpoint) 120 { 121 orxout() << "Centerpoint now setting..." << endl; 122 this->center_ = centerpoint; 123 orxout() << "Centerpoint now set..." << endl; 124 } 125 126 126 void TowerDefense::start() 127 127 { 128 128 Deathmatch::start(); 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 } 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 for(std::vector<Coordinate>::iterator it = addedTowersCoordinates_.begin(); it != addedTowersCoordinates_.end(); ++it) 206 207 208 209 210 211 212 213 214 215 216 129 130 const int kInitialTowerCount = 3; 131 Coordinate initialTowerCoordinates[kInitialTowerCount] = {{3,2}, {8,5}, {12,10}}; 132 133 for (int i = 0; i < kInitialTowerCount; i++) 134 { 135 Coordinate coordinate = initialTowerCoordinates[i]; 136 addTower(coordinate.x, coordinate.y); 137 } 138 139 ChatManager::message("Use the console command addTower x y to add towers"); 140 141 //TODO: let the player control his controllable entity && TODO: create a new ControllableEntity for the player 142 } 143 144 void TowerDefense::end() 145 { 146 Deathmatch::end(); 147 148 ChatManager::message("Match is over"); 149 } 150 151 void TowerDefense::addTower(int x, int y) 152 { 153 const TowerCost towerCost = TDDefaultTowerCost; 154 155 if (!this->hasEnoughCreditForTower(towerCost)) 156 { 157 orxout() << "not enough credit: " << (this->stats_->getCredit()) << " available, " << TDDefaultTowerCost << " needed."; 158 return; 159 } 160 161 if (this->towerExists(x,y)) 162 { 163 orxout() << "tower exists!!" << endl; 164 return; 165 } 166 167 /* 168 unsigned int width = this->center_->getWidth(); 169 unsigned int height = this->center_->getHeight(); 170 */ 171 172 int tileScale = (int) this->center_->getTileScale(); 173 174 if (x > 15 || y > 15 || x < 0 || y < 0) 175 { 176 //Hard coded: TODO: let this depend on the centerpoint's height, width and fieldsize (fieldsize doesn't exist yet) 177 orxout() << "Can not add Tower: x and y should be between 0 and 15" << endl; 178 return; 179 } 180 181 orxout() << "Will add tower at (" << (x-8) * tileScale << "," << (y-8) * tileScale << ")" << endl; 182 183 // Add tower to coordinatesStack 184 Coordinate newTowerCoordinates = {x, y}; 185 addedTowersCoordinates_.push_back(newTowerCoordinates); 186 187 // Reduce credit 188 this->stats_->buyTower(towerCost); 189 190 // Create tower 191 Tower* newTower = new Tower(this->center_); 192 newTower->addTemplate(this->center_->getTowerTemplate()); 193 194 newTower->setPosition(static_cast<float>((x-8) * tileScale), static_cast<float>((y-8) * tileScale), 75); 195 newTower->setGame(this); 196 } 197 198 bool TowerDefense::hasEnoughCreditForTower(TowerCost towerCost) 199 { 200 return ((this->stats_->getCredit()) >= towerCost); 201 } 202 203 bool TowerDefense::towerExists(int x, int y) 204 { 205 for(std::vector<Coordinate>::iterator it = addedTowersCoordinates_.begin(); it != addedTowersCoordinates_.end(); ++it) 206 { 207 Coordinate currentCoordinates = (Coordinate) (*it); 208 if (currentCoordinates.x == x && currentCoordinates.y == y) 209 return true; 210 } 211 212 return false; 213 } 214 215 216 void TowerDefense::tick(float dt) 217 217 { 218 218 SUPER(TowerDefense, tick, dt); 219 219 } 220 221 // Function to test if we can add waypoints using code only. Doesn't work yet 222 223 // THE PROBLEM: WaypointController's getControllableEntity() returns null, so it won't track. How do we get the controlableEntity to NOT BE NULL??? 224 /* 225 void TowerDefense::addWaypointsAndFirstEnemy() 226 { 227 SpaceShip *newShip = new SpaceShip(this->center_); 228 newShip->addTemplate("spaceshipassff"); 229 230 WaypointController *newController = new WaypointController(newShip); 231 newController->setAccuracy(3); 232 233 Model *wayPoint1 = new Model(newController); 234 wayPoint1->setMeshSource("crate.mesh"); 235 wayPoint1->setPosition(7,-7,5); 236 wayPoint1->setScale(0.2); 237 238 Model *wayPoint2 = new Model(newController); 239 wayPoint2->setMeshSource("crate.mesh"); 240 wayPoint2->setPosition(7,7,5); 241 wayPoint2->setScale(0.2); 242 243 newController->addWaypoint(wayPoint1); 244 newController->addWaypoint(wayPoint2); 245 246 // The following line causes the game to crash 247 248 newShip->setController(newController); 249 // newController -> getPlayer() -> startControl(newShip); 250 newShip->setPosition(-7,-7,5); 251 newShip->setScale(0.1); 252 //newShip->addSpeed(1); 253 254 255 256 // this->center_->attach(newShip); 257 } 258 */ 259 /* 260 void TowerDefense::playerEntered(PlayerInfo* player) 261 { 262 Deathmatch::playerEntered(player); 263 264 const std::string& message = player->getName() + " entered the game"; 265 ChatManager::message(message); 266 } 267 268 bool TowerDefense::playerLeft(PlayerInfo* player) 269 { 270 bool valid_player = Deathmatch::playerLeft(player); 271 272 if (valid_player) 273 { 274 const std::string& message = player->getName() + " left the game"; 275 ChatManager::message(message); 276 } 277 278 return valid_player; 279 } 280 281 282 void TowerDefense::pawnKilled(Pawn* victim, Pawn* killer) 283 { 284 if (victim && victim->getPlayer()) 285 { 286 std::string message; 287 if (killer) 288 { 289 if (killer->getPlayer()) 290 message = victim->getPlayer()->getName() + " was killed by " + killer->getPlayer()->getName(); 291 else 292 message = victim->getPlayer()->getName() + " was killed"; 293 } 294 else 295 message = victim->getPlayer()->getName() + " died"; 296 297 ChatManager::message(message); 298 } 299 300 Deathmatch::pawnKilled(victim, killer); 301 } 302 303 void TowerDefense::playerScored(PlayerInfo* player) 304 { 305 Gametype::playerScored(player); 306 307 }*/ 220 221 // Function to test if we can add waypoints using code only. Doesn't work yet 222 223 // THE PROBLEM: WaypointController's getControllableEntity() returns null, so it won't track. How do we get the controlableEntity to NOT BE NULL??? 224 /* 225 void TowerDefense::addWaypointsAndFirstEnemy() 226 { 227 SpaceShip *newShip = new SpaceShip(this->center_); 228 newShip->addTemplate("spaceshipassff"); 229 230 WaypointController *newController = new WaypointController(newShip); 231 newController->setAccuracy(3); 232 233 Model *wayPoint1 = new Model(newController); 234 wayPoint1->setMeshSource("crate.mesh"); 235 wayPoint1->setPosition(7,-7,5); 236 wayPoint1->setScale(0.2); 237 238 Model *wayPoint2 = new Model(newController); 239 wayPoint2->setMeshSource("crate.mesh"); 240 wayPoint2->setPosition(7,7,5); 241 wayPoint2->setScale(0.2); 242 243 newController->addWaypoint(wayPoint1); 244 newController->addWaypoint(wayPoint2); 245 246 // The following line causes the game to crash 247 248 newShip->setController(newController); 249 // newController -> getPlayer() -> startControl(newShip); 250 newShip->setPosition(-7,-7,5); 251 newShip->setScale(0.1); 252 //newShip->addSpeed(1); 253 254 255 256 // this->center_->attach(newShip); 257 } 258 */ 259 /* 260 void TowerDefense::playerEntered(PlayerInfo* player) 261 { 262 Deathmatch::playerEntered(player); 263 264 const std::string& message = player->getName() + " entered the game"; 265 ChatManager::message(message); 266 } 267 268 bool TowerDefense::playerLeft(PlayerInfo* player) 269 { 270 bool valid_player = Deathmatch::playerLeft(player); 271 272 if (valid_player) 273 { 274 const std::string& message = player->getName() + " left the game"; 275 ChatManager::message(message); 276 } 277 278 return valid_player; 279 } 280 281 282 void TowerDefense::pawnKilled(Pawn* victim, Pawn* killer) 283 { 284 if (victim && victim->getPlayer()) 285 { 286 std::string message; 287 if (killer) 288 { 289 if (killer->getPlayer()) 290 message = victim->getPlayer()->getName() + " was killed by " + killer->getPlayer()->getName(); 291 else 292 message = victim->getPlayer()->getName() + " was killed"; 293 } 294 else 295 message = victim->getPlayer()->getName() + " died"; 296 297 ChatManager::message(message); 298 } 299 300 Deathmatch::pawnKilled(victim, killer); 301 } 302 303 void TowerDefense::playerScored(PlayerInfo* player) 304 { 305 Gametype::playerScored(player); 306 }*/ 308 307 } -
code/branches/presentation2012merge/src/modules/towerdefense/TowerDefense.h
r9271 r9272 26 26 * 27 27 */ 28 28 29 29 /** 30 31 32 33 30 @brief 31 GameType class for TowerDefense. See TowerDefenseReadme.txt for Information. 32 33 @ingroup TowerDefense 34 34 */ 35 35 36 36 37 37 #ifndef _TowerDefense_H__ … … 40 40 #include "towerdefense/TowerDefensePrereqs.h" 41 41 #include "gametypes/Deathmatch.h" 42 42 43 43 #include "TowerDefensePlayerStats.h" 44 44 45 45 namespace orxonox 46 46 { 47 47 class _TowerDefenseExport TowerDefense : public Deathmatch 48 48 { 49 public: 50 TowerDefense(BaseObject* creator); 51 virtual ~TowerDefense(); 52 53 virtual void start(); //<! The function is called when the gametype starts 54 virtual void end(); 55 virtual void tick(float dt); 56 //virtual void playerEntered(PlayerInfo* player); 57 //virtual bool playerLeft(PlayerInfo* player); 58 59 //virtual void pawnKilled(Pawn* victim, Pawn* killer = 0); 60 //virtual void playerScored(PlayerInfo* player); 61 62 63 /* Called by TowerDefenseCenterpoint upon game start 64 The centerpoint is used to create towers 65 */ 66 void setCenterpoint(TowerDefenseCenterpoint *centerpoint); 67 68 /* Adds a tower at x, y in the playfield */ 69 void addTower(int x, int y); 70 71 /* Part of a temporary hack to allow the player to add towers */ 72 ConsoleCommand* dedicatedAddTower_; 73 74 //TODO: void spawnNewWave() 75 //TODO: create a timer which regularly calls the spawnNewWave function (time driven) 76 // or spawn a new wave when the old wave has been killed (event driven) 49 public: 50 TowerDefense(BaseObject* creator); 51 virtual ~TowerDefense(); 52 53 virtual void start(); //<! The function is called when the gametype starts 54 virtual void end(); 55 virtual void tick(float dt); 56 //virtual void playerEntered(PlayerInfo* player); 57 //virtual bool playerLeft(PlayerInfo* player); 58 59 //virtual void pawnKilled(Pawn* victim, Pawn* killer = 0); 60 //virtual void playerScored(PlayerInfo* player); 77 61 78 62 79 private: 80 TowerDefenseCenterpoint *center_; 81 82 /* handles stats */ 83 TowerDefensePlayerStats *stats_; 84 bool hasEnoughCreditForTower(TowerCost towerCost); 85 86 bool towerExists(int x, int y); 87 88 typedef struct { 89 int x; 90 int y; 91 } Coordinate; 92 93 std::vector<Coordinate> addedTowersCoordinates_; 94 std::vector<Tower*> towers_; 63 /* Called by TowerDefenseCenterpoint upon game start 64 The centerpoint is used to create towers 65 */ 66 void setCenterpoint(TowerDefenseCenterpoint *centerpoint); 67 68 /* Adds a tower at x, y in the playfield */ 69 void addTower(int x, int y); 70 71 /* Part of a temporary hack to allow the player to add towers */ 72 ConsoleCommand* dedicatedAddTower_; 73 74 //TODO: void spawnNewWave() 75 //TODO: create a timer which regularly calls the spawnNewWave function (time driven) 76 // or spawn a new wave when the old wave has been killed (event driven) 77 78 79 private: 80 TowerDefenseCenterpoint *center_; 81 82 /* handles stats */ 83 TowerDefensePlayerStats *stats_; 84 bool hasEnoughCreditForTower(TowerCost towerCost); 85 86 bool towerExists(int x, int y); 87 88 typedef struct { 89 int x; 90 int y; 91 } Coordinate; 92 93 std::vector<Coordinate> addedTowersCoordinates_; 94 std::vector<Tower*> towers_; 95 95 }; 96 96 } -
code/branches/presentation2012merge/src/modules/towerdefense/TowerDefenseCenterpoint.cc
r9271 r9272 50 50 { 51 51 RegisterObject(TowerDefenseCenterpoint); 52 53 52 53 this->width_ = 15; 54 54 this->height_ = 15; 55 55 this->towerTemplate_ = ""; 56 56 57 57 //this->setCollisionType(Static); 58 58 59 59 this->checkGametype(); 60 60 61 61 } … … 71 71 XMLPortParam(TowerDefenseCenterpoint, "width", setWidth, getWidth, xmlelement, mode); 72 72 XMLPortParam(TowerDefenseCenterpoint, "height", setHeight, getHeight, xmlelement, mode); 73 73 XMLPortParam(TowerDefenseCenterpoint, "tileScale", setTileScale, getTileScale, xmlelement, mode); 74 74 XMLPortParam(TowerDefenseCenterpoint, "towerTemplate", setTowerTemplate, getTowerTemplate, xmlelement, mode); 75 75 76 76 //TODO: add XMLPortObject(TowerDefenseCenterpoint, WorldEntity, "waypoints", addWaypoint, getWaypoint, xmlelement, mode); 77 77 // This was copied and shightly modified from WaypointController.cc ; there are no getters and setters and no membervariable yet … … 100 100 void TowerDefenseCenterpoint::checkGametype() 101 101 { 102 102 if (this->getGametype() != NULL && this->getGametype()->isA(Class(TowerDefense))) 103 103 { 104 104 // Sets the centerpoint of the gametype. The gametype uses this to later spawn in towers, he needs the tower template stored in the center point 105 105 TowerDefense* towerDefenseGametype = orxonox_cast<TowerDefense*>(this->getGametype().get()); 106 106 towerDefenseGametype->setCenterpoint(this); -
code/branches/presentation2012merge/src/modules/towerdefense/TowerDefenseCenterpoint.h
r9271 r9272 54 54 virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); 55 55 virtual void changedGametype(); 56 56 57 57 /** 58 58 @brief The width and hight in number of tiles. Default is 15 for both. … … 60 60 void setWidth(unsigned int width) 61 61 { this->width_ = width; } 62 63 62 63 unsigned int getWidth(void) const 64 64 { return this->width_; } 65 65 66 66 void setHeight(unsigned int height) 67 67 { this->height_ = height; } 68 69 68 69 unsigned int getHeight(void) const 70 70 { return this->height_; } 71 72 73 74 75 76 77 78 79 80 71 72 /** 73 @brief How to convert to world coordinates, e.g. that 0,15 is not at -8,-8 but at -80,-80 (if scale would be 10) 74 */ 75 void setTileScale(unsigned int tileScale) 76 { this->tileScale_ = tileScale; } 77 78 unsigned int getTileScale(void) const 79 { return this->tileScale_; } 80 81 81 /** 82 82 @brief Set the template for the towers. … … 85 85 void setTowerTemplate(const std::string& templateName) 86 86 { this->towerTemplate_ = templateName; } 87 88 87 88 const std::string& getTowerTemplate(void) const 89 89 { return this->towerTemplate_; } 90 90 91 91 private: 92 92 void checkGametype(); 93 93 94 94 unsigned int width_; 95 95 unsigned int height_; 96 97 96 unsigned int tileScale_; 97 98 98 std::string towerTemplate_; 99 99 }; -
code/branches/presentation2012merge/src/modules/towerdefense/TowerDefenseHUDController.cc
r9271 r9272 25 25 * ... 26 26 */ 27 27 28 28 #include "TowerDefenseHUDController.h" 29 29 … … 35 35 namespace orxonox 36 36 { 37 38 37 CreateFactory(TowerDefenseHUDController); 38 39 39 TowerDefenseHUDController::TowerDefenseHUDController(BaseObject* creator) : OverlayText(creator) 40 41 42 43 44 45 46 47 40 { 41 RegisterObject(TowerDefenseHUDController); 42 } 43 44 TowerDefenseHUDController::~TowerDefenseHUDController() 45 { 46 47 } 48 48 49 49 void TowerDefenseHUDController::tick(float dt) 50 51 52 53 50 { 51 SUPER(TowerDefenseHUDController, tick, dt); 52 } 53 54 54 void TowerDefenseHUDController::XMLPort(Element& xmlelement, XMLPort::Mode mode) 55 56 57 58 55 { 56 SUPER(TowerDefenseHUDController, XMLPort, xmlelement, mode); 57 } 58 59 59 void TowerDefenseHUDController::changedOwner() 60 60 { 61 61 SUPER(TowerDefenseHUDController, changedOwner); 62 62 /* 63 63 if (this->getOwner() != NULL && this->getOwner()->getGametype()) 64 64 this->owner_ = orxonox_cast<Pong*>(this->getOwner()->getGametype().get()); 65 65 else 66 66 this->owner_ = 0; 67 67 */ 68 68 } 69 69 70 70 } -
code/branches/presentation2012merge/src/modules/towerdefense/TowerDefenseHUDController.h
r9271 r9272 26 26 * 27 27 */ 28 28 29 29 /** 30 31 32 33 30 @brief 31 This subclass of OverlayText is used to display the stats of the player in the HUD 32 33 @ingroup TowerDefense 34 34 */ 35 35 36 36 37 37 #ifndef _TowerDefenseHUDController_H__ … … 48 48 class _TowerDefenseExport TowerDefenseHUDController : public OverlayText, public Tickable 49 49 { 50 51 50 public: 51 TowerDefenseHUDController(BaseObject* creator); 52 52 virtual ~TowerDefenseHUDController(); 53 53 54 54 virtual void tick(float dt); 55 55 virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); 56 56 virtual void changedOwner(); 57 57 }; 58 58 } -
code/branches/presentation2012merge/src/modules/towerdefense/TowerDefensePlayerStats.cc
r9271 r9272 25 25 * ... 26 26 */ 27 27 28 28 #include "TowerDefensePlayerStats.h" 29 29 30 30 namespace orxonox 31 31 { 32 33 32 const int kDefaultCredit = 200; 33 34 34 TowerDefensePlayerStats::TowerDefensePlayerStats() 35 36 37 38 39 40 41 42 43 */ 35 { 36 this->credit_ = kDefaultCredit; 37 this->waveNumber_ = 0; 38 } 39 /* 40 TowerDefensePlayerStats::~TowerDefensePlayerStats() 41 { 42 } 43 */ 44 44 } -
code/branches/presentation2012merge/src/modules/towerdefense/TowerDefensePlayerStats.h
r9271 r9272 26 26 * 27 27 */ 28 28 29 29 /** 30 31 32 33 30 @brief 31 This manages the stats of the player. It is used by 'TowerDefense', the gametype 32 33 @ingroup TowerDefense 34 34 */ 35 35 36 36 37 37 #ifndef _TowerDefensePlayerStats_H__ … … 42 42 namespace orxonox 43 43 { 44 45 46 47 48 44 typedef enum _TowerCosts { 45 // Set to 0 for debug... 46 TDDefaultTowerCost = 0 47 } TowerCost; 48 49 49 class _TowerDefenseExport TowerDefensePlayerStats 50 50 { 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 51 public: 52 TowerDefensePlayerStats(); 53 54 inline int getCredit() 55 { return credit_; } 56 57 inline void setCredit(int credit) 58 { credit_ = credit; } 59 60 inline void buyTower(TowerCost cost) 61 { credit_ -= cost;} 62 63 inline int getWaveNumber() 64 { return waveNumber_; } 65 66 inline void didLoadNextWave() 67 { waveNumber_++; } 68 69 private: 70 int credit_; 71 int waveNumber_; 72 //int baseHealth_; 73 73 }; 74 74 } -
code/branches/presentation2012merge/src/modules/towerdefense/TowerDefensePrereqs.h
r9271 r9272 66 66 { 67 67 class TowerDefense; 68 68 class Tower; 69 69 class TowerDefenseCenterpoint; 70 71 70 class TowerDefenseHUDController; 71 class TowerDefensePlayerStats; 72 72 } 73 73 -
code/branches/presentation2012merge/src/orxonox/LevelInfo.h
r9269 r9272 24 24 * Co-authors: 25 25 * ... 26 * 26 * 27 27 */ 28 28 … … 79 79 */ 80 80 inline const std::string& getName(void) const { return this->name_; } // tolua_export 81 81 82 82 /** 83 83 @brief Set the screenshot of the Level. … … 117 117 */ 118 118 inline bool hasTag(const std::string& tag) const { return this->tags_.find(tag) != this->tags_.end(); } // tolua_export 119 119 120 120 void setShips(const std::string& ships); //!< Set the starting ship models of the level 121 121 bool addShip(const std::string& ship, bool update = true); //!< Add a model to shipselection … … 125 125 */ 126 126 inline const std::string& getShips(void) const 127 { return this->startingShipsString_; } 127 { return this->startingShipsString_; } 128 128 /** 129 129 @brief Get whether the Level allows a specific starting ship model … … 131 131 @return Returns true if the Level allows the input ship model 132 132 */ 133 inline bool hasShip(const std::string& ship) const { return this->ships_.find(ship) != this->ships_.end(); } // tolua_export 133 inline bool hasShip(const std::string& ship) const { return this->ships_.find(ship) != this->ships_.end(); } // tolua_export 134 134 /** 135 135 @brief Get the XML-filename of the Level. … … 138 138 139 139 inline const std::string& getXMLFilename(void) const { return this->xmlfilename_; } // tolua_export 140 140 inline void selectShip (const std::string& ship) { this->changeShip(ship); } // tolua_export 141 141 142 142 … … 153 153 private: 154 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 size_t found = buff.find(pawndesignString.append(shipSelectionTag)); 172 if (found!= std::string::npos) 173 174 175 176 177 178 179 180 } 155 inline void changeShip (const std::string& model) { 156 static std::string shipSelectionTag = "shipselection"; 157 //HACK: Read Level XML File, find "shipselection", replace with ship model 158 std::string levelPath = "../levels/"; 159 levelPath.append(this->getXMLFilename()); 160 std::string tempPath = "../levels/"; 161 tempPath.append("_temp.oxw"); 162 orxout(user_status) << levelPath << endl; 163 orxout(user_status) << tempPath << endl; 164 std::ifstream myLevel (levelPath.c_str()); 165 std::ofstream tempLevel (tempPath.c_str()); 166 while(!myLevel.eof()) 167 { 168 std::string buff; 169 std::getline(myLevel, buff); 170 std::string pawndesignString = "pawndesign="; 171 size_t found = buff.find(pawndesignString.append(shipSelectionTag)); 172 if (found!= std::string::npos) 173 buff = buff.substr(0, found + 11) + model + buff.substr(found+11+shipSelectionTag.length(), std::string::npos); 174 tempLevel.write(buff.c_str(), buff.length()); 175 tempLevel << std::endl; 176 } 177 myLevel.close(); 178 tempLevel.close(); 179 orxout(user_status) << "done" << endl; 180 } 181 181 void tagsUpdated(void); //!< Updates the comma-seperated string of all tags, if the set of tags has changed. 182 182 void shipsUpdated(void); //!< Updates the comma-seperated string of all tags, if the set of tags has changed. … … 199 199 std::string tagsString_; //!< The comma-seperated string of all the tags the Level is tagged with. 200 200 std::set<std::string> ships_; //!< The set of starting ship models the Level allows. 201 std::string startingShipsString_; //!< The comma-seperated string of all the allowed ship models for the shipselection. 201 std::string startingShipsString_; //!< The comma-seperated string of all the allowed ship models for the shipselection. 202 202 }; // tolua_export 203 203 … … 210 210 - @b screenshot The screenshot of the level. 211 211 - @b tags A comma-seperated string of tags. Allowed tags are: <em>test</em>, <em>singleplayer</em>, <em>multiplayer</em>, <em>showcase</em>, <em>tutorial</em>, <em>presentation</em>, <em>shipselection</em>. 212 - @b (optional) startingships The comma-seperated string of starting ship models 212 - @b (optional) startingships The comma-seperated string of starting ship models 213 213 An example would be: 214 214 @code … … 224 224 @author 225 225 Damian 'Mozork' Frick 226 227 226 @edit 227 Matthias Hutter 228 228 @ingroup Orxonox 229 229 */ … … 235 235 236 236 virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); //!< Creates a LevelInfo object through XML. 237 237 238 238 /** 239 239 @brief Set the screenshot of the Level. … … 283 283 */ 284 284 inline const std::string& getShips(void) const 285 { return this->LevelInfoItem::getShips(); } 285 { return this->LevelInfoItem::getShips(); } 286 286 LevelInfoItem* copy(void); //!< Copies the contents of this LevelInfo object to a new LevelInfoItem object. 287 287 }; … … 302 302 } 303 303 }; 304 304 305 305 } // tolua_export 306 306 -
code/branches/presentation2012merge/src/orxonox/ShipManager.cc
r9271 r9272 22 22 * Author: 23 23 * Matthias Hutter 24 * 24 * 25 25 */ 26 26 … … 28 28 @file ShipManager.cc 29 29 @brief Work-in Progress: Implementation of the ShipManager singleton. 30 30 Should make SpaceShip info available to lua handlers. 31 31 */ 32 32 … … 72 72 } 73 73 74 74 75 75 /** 76 76 @brief … … 132 132 void ShipManager::compileAvailableShipList() 133 133 { 134 135 136 137 138 139 140 141 142 143 144 145 146 147 134 /* 135 // We only want to load as little as possible 136 ClassTreeMask mask; 137 mask.exclude(Class(BaseObject)); 138 mask.include(Class(SpaceShip)); 139 SpaceShip* info = NULL; 140 XMLFile file = XMLFile(ship); 141 Loader::load(&file, mask, false, true); 142 for(ObjectList<SpaceShip>::iterator item = ObjectList<SpaceShip>::begin(); item != ObjectList<SpaceShip>::end(); ++item) 143 if(item->getXMLFilename() == *it) 144 info = item->copy(); 145 Loader::unload(&file); 146 */ 147 148 148 // Get all files matching the level criteria 149 149 Ogre::StringVectorPtr levels = Resource::findResourceNames("*.oxw"); -
code/branches/presentation2012merge/src/orxonox/controllers/FormationController.cc
r9271 r9272 50 50 { 51 51 52 SetConsoleCommand("FormationController", "formationflight", &FormationController::formationflight);53 SetConsoleCommand("FormationController", "masteraction", &FormationController::masteraction);54 SetConsoleCommand("FormationController", "followme", &FormationController::followme);55 SetConsoleCommand("FormationController", "passivebehaviour", &FormationController::passivebehaviour);56 SetConsoleCommand("FormationController", "formationsize", &FormationController::formationsize);57 58 59 60 61 static const unsigned int STANDARD_MAX_FORMATION_SIZE = 9;62 static const int RADIUS_TO_SEARCH_FOR_MASTERS = 5000;63 static const float FORMATION_LENGTH = 110;64 static const float FORMATION_WIDTH = 110;65 static const int FREEDOM_COUNT = 4; //seconds the slaves in a formation will be set free when master attacks an enemy66 static const float SPEED_MASTER = 0.6f;67 static const float ROTATEFACTOR_MASTER = 0.2f;68 static const float SPEED_FREE = 0.8f;69 static const float ROTATEFACTOR_FREE = 0.8f;70 71 FormationController::FormationController(BaseObject* creator) : Controller(creator)72 {52 SetConsoleCommand("FormationController", "formationflight", &FormationController::formationflight); 53 SetConsoleCommand("FormationController", "masteraction", &FormationController::masteraction); 54 SetConsoleCommand("FormationController", "followme", &FormationController::followme); 55 SetConsoleCommand("FormationController", "passivebehaviour", &FormationController::passivebehaviour); 56 SetConsoleCommand("FormationController", "formationsize", &FormationController::formationsize); 57 58 59 60 61 static const unsigned int STANDARD_MAX_FORMATION_SIZE = 9; 62 static const int RADIUS_TO_SEARCH_FOR_MASTERS = 5000; 63 static const float FORMATION_LENGTH = 110; 64 static const float FORMATION_WIDTH = 110; 65 static const int FREEDOM_COUNT = 4; //seconds the slaves in a formation will be set free when master attacks an enemy 66 static const float SPEED_MASTER = 0.6f; 67 static const float ROTATEFACTOR_MASTER = 0.2f; 68 static const float SPEED_FREE = 0.8f; 69 static const float ROTATEFACTOR_FREE = 0.8f; 70 71 FormationController::FormationController(BaseObject* creator) : Controller(creator) 72 { 73 73 RegisterObject(FormationController); 74 74 … … 91 91 this->team_=-1; 92 92 this->target_.setCallback(createFunctor(&FormationController::targetDied, this)); 93 }94 95 FormationController::~FormationController()96 {97 if (this->isInitialized())93 } 94 95 FormationController::~FormationController() 96 { 97 if (this->isInitialized()) 98 98 { 99 99 this->removeFromFormation(); … … 123 123 } 124 124 } 125 }126 127 void FormationController::XMLPort(Element& xmlelement, XMLPort::Mode mode)125 } 126 127 void FormationController::XMLPort(Element& xmlelement, XMLPort::Mode mode) 128 128 { 129 129 SUPER(FormationController, XMLPort, xmlelement, mode); … … 137 137 138 138 139 /**139 /** 140 140 @brief Activates / deactivates formationflight behaviour 141 141 @param form activate formflight if form is true 142 142 */ 143 void FormationController::formationflight(const bool form)143 void FormationController::formationflight(const bool form) 144 144 { 145 145 for (ObjectList<Pawn>::iterator it = ObjectList<Pawn>::begin(); it; ++it) … … 168 168 } 169 169 170 /**170 /** 171 171 @brief Get all masters to do a "specific master action" 172 172 @param action which action to perform (integer, so it can be called with a console command (tmp solution)) … … 198 198 } 199 199 200 /**200 /** 201 201 @brief Sets shooting behaviour of pawns. 202 202 @param passive if true, bots won't shoot. … … 225 225 } 226 226 227 /**227 /** 228 228 @brief Sets maximal formation size 229 229 @param size maximal formation size. … … 282 282 Vector2 coord = get2DViewcoordinates(this->getControllableEntity()->getPosition(), this->getControllableEntity()->getOrientation() * WorldEntity::FRONT, this->getControllableEntity()->getOrientation() * WorldEntity::UP, target); 283 283 float distance = (target - this->getControllableEntity()->getPosition()).length(); 284 285 286 287 288 289 290 284 if(coord.x < 0.0001 && coord.y < 0.0001) 285 { 286 // if the ship reaches a direction very close to the direct one, set it to the direct one 287 Vector3 v_temp = this->getControllableEntity()->getPosition(); 288 Quaternion quat = v_temp.getRotationTo(target); 289 this->getControllableEntity()->rotate(quat); 290 } 291 291 292 292 if(this->state_ == FREE) … … 324 324 325 325 if(this->state_ == SLAVE) 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 } else this->getControllableEntity()->moveFrontBack(1.2f*SPEED_MASTER); 342 343 } else { 344 this->getControllableEntity()->moveFrontBack(1.2f*SPEED_MASTER + distance/300.0f); 345 } 346 326 { 327 328 this->getControllableEntity()->rotateYaw(-2.0f * ROTATEFACTOR_MASTER * coord.x * 2); 329 this->getControllableEntity()->rotatePitch(2.0f * ROTATEFACTOR_MASTER * coord.y * 2); 330 331 if (distance < 300) 332 { 333 if (bHasTargetOrientation_) 334 { 335 copyTargetOrientation(); 336 } 337 if (distance < 100) 338 { //linear speed reduction 339 this->getControllableEntity()->moveFrontBack(distance/100.0f*0.4f*SPEED_MASTER); 340 } 341 else 342 this->getControllableEntity()->moveFrontBack(1.2f*SPEED_MASTER); 343 } 344 else 345 this->getControllableEntity()->moveFrontBack(1.2f*SPEED_MASTER + distance/300.0f); 346 } 347 347 348 348 if (distance < 10) 349 349 { 350 350 this->positionReached(); 351 352 } 353 } 354 355 356 357 void FormationController::moveToTargetPosition()351 bHasTargetOrientation_=false; 352 } 353 } 354 355 356 357 void FormationController::moveToTargetPosition() 358 358 { 359 359 this->moveToPosition(this->targetPosition_); 360 360 } 361 361 362 //copy the Roll orientation of given Quaternion.363 void FormationController::copyOrientation(const Quaternion& orient)362 //copy the Roll orientation of given Quaternion. 363 void FormationController::copyOrientation(const Quaternion& orient) 364 364 { 365 365 //roll angle difference in radian … … 379 379 380 380 381 /**381 /** 382 382 @brief Unregisters a slave from its master. Initiated by a slave. 383 383 */ … … 469 469 } 470 470 } 471 /** 471 472 /** 472 473 @brief Commands the slaves of a master into a formation. Sufficiently fast not to be called within tick. Initiated by a master. 473 474 */ 474 475 void FormationController::commandSlaves() 475 void FormationController::commandSlaves() 476 476 { 477 477 if(this->state_ != MASTER) return; … … 487 487 } 488 488 else 489 489 // formation: 490 490 { 491 491 dest += 1.0f*orient*WorldEntity::BACK; 492 492 Vector3 pos = Vector3::ZERO; 493 493 bool left=true; 494 494 int i = 1; 495 495 … … 689 689 690 690 if (specificMasterActionHoldCount_ == 0) 691 691 { 692 692 this->specificMasterAction_ = NONE; 693 693 this->searchNewTarget(); 694 } 695 else specificMasterActionHoldCount_--; 694 } 695 else 696 specificMasterActionHoldCount_--; 696 697 } 697 698 … … 717 718 void FormationController::turn180() 718 719 { 719 720 721 722 723 724 720 Vector2 coord = get2DViewdirection(this->getControllableEntity()->getPosition(), this->getControllableEntity()->getOrientation() * WorldEntity::FRONT, this->getControllableEntity()->getOrientation() * WorldEntity::UP, this->targetPosition_); 721 722 this->getControllableEntity()->rotateYaw(-2.0f * sgn(coord.x) * coord.x*coord.x); 723 this->getControllableEntity()->rotatePitch(2.0f * sgn(coord.y) * coord.y*coord.y); 724 725 this->getControllableEntity()->moveFrontBack(SPEED_MASTER); 725 726 } 726 727 … … 740 741 void FormationController::spin() 741 742 { 742 743 743 this->moveToTargetPosition(); 744 this->getControllableEntity()->rotateRoll(0.8f); 744 745 } 745 746 … … 779 780 if((humanPawn != NULL) && (allMasters.size() != 0)) 780 781 { 781 float posHuman = humanPawn->getPosition().length(); 782 float distance = 0.0f; 783 float minDistance = FLT_MAX; 784 int index = 0; 785 int i = 0; 786 787 for(std::vector<FormationController*>::iterator it = allMasters.begin(); it != allMasters.end(); it++, i++) 788 { 789 if (!FormationController::sameTeam((*it)->getControllableEntity(), humanPawn, (*it)->getGametype())) continue; 790 distance = posHuman - (*it)->getControllableEntity()->getPosition().length(); 791 if(distance < minDistance) index = i; 792 } 793 allMasters[index]->followInit(humanPawn); 794 } 795 796 } 797 798 799 800 782 float posHuman = humanPawn->getPosition().length(); 783 float distance = 0.0f; 784 float minDistance = FLT_MAX; 785 int index = 0; 786 int i = 0; 787 788 for(std::vector<FormationController*>::iterator it = allMasters.begin(); it != allMasters.end(); it++, i++) 789 { 790 if (!FormationController::sameTeam((*it)->getControllableEntity(), humanPawn, (*it)->getGametype())) continue; 791 distance = posHuman - (*it)->getControllableEntity()->getPosition().length(); 792 if(distance < minDistance) index = i; 793 } 794 allMasters[index]->followInit(humanPawn); 795 } 796 } 801 797 802 798 /** … … 820 816 } 821 817 822 /**818 /** 823 819 @brief Master begins to follow a randomly chosen human player of the same team. Is a "specific master action". 824 820 */ … … 848 844 849 845 850 /**846 /** 851 847 @brief Master follows target with adjusted speed. Called within tick. 852 848 */ … … 860 856 861 857 862 void FormationController::setTargetPosition(const Vector3& target)858 void FormationController::setTargetPosition(const Vector3& target) 863 859 { 864 860 this->targetPosition_ = target; … … 924 920 } 925 921 926 void FormationController::forgetTarget()922 void FormationController::forgetTarget() 927 923 { 928 924 this->target_ = 0; … … 930 926 } 931 927 932 void FormationController::targetDied()928 void FormationController::targetDied() 933 929 { 934 930 this->forgetTarget(); … … 936 932 } 937 933 938 bool FormationController::sameTeam(ControllableEntity* entity1, ControllableEntity* entity2, Gametype* gametype)934 bool FormationController::sameTeam(ControllableEntity* entity1, ControllableEntity* entity2, Gametype* gametype) 939 935 { 940 936 if (entity1 == entity2) -
code/branches/presentation2012merge/src/orxonox/gametypes/Mission.cc
r9271 r9272 63 63 { 64 64 this->missionAccomplished_ = false; 65 65 this->end(); 66 66 } 67 67 } … … 78 78 { 79 79 Gametype::end(); 80 /*if (this->missionAccomplished_) 80 /*if (this->missionAccomplished_) 81 81 this->gtinfo_->sendAnnounceMessage("Mission accomplished!"); 82 82 else 83 83 this->gtinfo_->sendAnnounceMessage("Mission failed!"); 84 **/84 */ 85 85 } 86 86 -
code/branches/presentation2012merge/src/orxonox/infos/PlayerInfo.cc
r9257 r9272 173 173 this->changedControllableEntity(); 174 174 175 175 RadarViewable* radarviewable = orxonox_cast<RadarViewable*>(entity); 176 176 if (radarviewable != NULL) 177 177 radarviewable->setRadarName(this->getName()); -
code/branches/presentation2012merge/src/orxonox/interfaces/RadarViewable.h
r9257 r9272 61 61 virtual ~RadarViewable(); 62 62 63 64 65 66 67 68 69 70 71 72 63 virtual void setRadarName(const std::string& name) 64 { 65 if (this->radarName_ != name) 66 { 67 this->radarName_ = name; 68 this->settingsChanged(); 69 } 70 } 71 const std::string& getRadarName() const 72 { return this->radarName_; } 73 73 74 74 inline void setRadarObjectCamouflage(float camouflage) … … 163 163 ColourValue radarObjectColour_; 164 164 float scale_; 165 165 std::string radarName_; 166 166 }; 167 167 } -
code/branches/presentation2012merge/src/orxonox/worldentities/ControllableEntity.cc
r9016 r9272 87 87 this->setPriority( Priority::VeryHigh ); 88 88 this->registerVariables(); 89 89 this->team_ = -1; 90 90 } 91 91 -
code/branches/presentation2012merge/src/orxonox/worldentities/ControllableEntity.h
r9255 r9272 164 164 void setTargetInternal( uint32_t targetID ); 165 165 166 167 168 169 166 inline void setTeam(int team) 167 { this->team_ = team; } 168 inline int getTeam() const 169 { return this->team_; } 170 170 171 171 protected: … … 243 243 WeakPtr<WorldEntity> target_; 244 244 245 245 int team_ ; //<! teamnumber 246 246 }; 247 247 } -
code/branches/presentation2012merge/src/orxonox/worldentities/pawns/Pawn.cc
r9269 r9272 232 232 { 233 233 //Applies multiplier given by the DamageBoost Pickup. 234 235 236 237 238 239 240 234 Pawn *test = dynamic_cast<Pawn *>(originator); 235 if( test != NULL ) 236 { 237 damage *= originator->getDamageMultiplier(); 238 } 239 240 if (this->getGametype() && this->getGametype()->allowPawnDamage(this, originator)) 241 241 { 242 242 if (shielddamage >= this->getShieldHealth()) -
code/branches/presentation2012merge/src/orxonox/worldentities/pawns/SpaceShip.cc
r8892 r9272 133 133 { 134 134 SetConfigValue(bInvertYAxis_, false).description("Set this to true for joystick-like mouse behaviour (mouse up = ship down)."); 135 135 136 136 SetConfigValueExternal(bEnableMotionBlur_, "GraphicsSettings", "enableMotionBlur", true) 137 137 .description("Enable or disable the motion blur effect when moving very fast") … … 503 503 void SpaceShip::resetCamera() 504 504 { 505 506 505 if(this->hasLocalController() && this->hasHumanController()) 506 { 507 507 Camera *camera = this->getCamera(); 508 508 if (camera == 0) … … 514 514 camera->setPosition(this->cameraOriginalPosition_); 515 515 camera->setOrientation(this->cameraOriginalOrientation_); 516 516 } 517 517 } 518 518
Note: See TracChangeset
for help on using the changeset viewer.