- Timestamp:
- Dec 18, 2017, 12:40:00 PM (7 years ago)
- Location:
- code/branches/Presentation_HS17
- Files:
-
- 4 deleted
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/Presentation_HS17
- Property svn:mergeinfo changed
/code/branches/Waypoints_HS17 reverse-merged: 11496,11523,11539,11559,11582,11603,11633,11655,11657,11659,11661,11687 /code/branches/ScriptableController_HS17 removed
- Property svn:mergeinfo changed
-
code/branches/Presentation_HS17/src/orxonox/worldentities/CMakeLists.txt
r11685 r11690 13 13 ExplosionPart.cc 14 14 Actionpoint.cc 15 AutonomousDrone.cc16 Arrow.cc17 15 NameableStaticEntity.cc 18 16 ) -
code/branches/Presentation_HS17/src/orxonox/worldentities/ControllableEntity.cc
r11686 r11690 39 39 40 40 #include "Scene.h" 41 #include "Level.h"42 41 #include "infos/PlayerInfo.h" 43 42 #include "controllers/NewHumanController.h" … … 68 67 this->camera_ = nullptr; 69 68 this->xmlcontroller_ = nullptr; 69 //this->controller_ = nullptr; 70 70 this->reverseCamera_ = nullptr; 71 71 this->bDestroyWhenPlayerLeft_ = false; -
code/branches/Presentation_HS17/src/orxonox/worldentities/ControllableEntity.h
r11686 r11690 175 175 inline int getTeam() const 176 176 { return this->team_; } 177 178 177 179 178 protected: -
code/branches/Presentation_HS17/src/orxonox/worldentities/MobileEntity.cc
r11686 r11690 36 36 37 37 #include "Scene.h" 38 #include "Level.h"39 #include "scriptablecontroller/scriptable_controller.h"40 38 41 39 namespace orxonox … … 74 72 this->setAngularVelocity(rotationAxis.normalisedCopy() * rotationRate.valueRadians()); 75 73 } 76 77 if(!this->id_.empty() && this->getLevel() != nullptr)78 this->getLevel()->getScriptableController()->registerMobileEntity(this->id_, this);79 74 } 80 75 -
code/branches/Presentation_HS17/src/orxonox/worldentities/WorldEntity.cc
r11686 r11690 44 44 #include "core/XMLPort.h" 45 45 #include "Scene.h" 46 #include "Level.h"47 46 #include "collisionshapes/WorldEntityCollisionShape.h" 48 #include "scriptablecontroller/scriptable_controller.h"49 47 50 48 namespace orxonox … … 81 79 this->parentID_ = OBJECTID_UNKNOWN; 82 80 this->bDeleteWithParent_ = true; 83 this->id_ = -1;84 81 85 82 this->node_->setPosition(Vector3::ZERO); … … 163 160 XMLPortParamTemplate(WorldEntity, "scale3D", setScale3D, getScale3D, xmlelement, mode, const Vector3&); 164 161 XMLPortParam (WorldEntity, "scale", setScale, getScale, xmlelement, mode); 165 XMLPortParamLoadOnly(WorldEntity, "id", setID, xmlelement, mode);166 162 XMLPortParamLoadOnly(WorldEntity, "lookat", lookAt_xmlport, xmlelement, mode); 167 163 XMLPortParamLoadOnly(WorldEntity, "direction", setDirection_xmlport, xmlelement, mode); … … 185 181 // Attached collision shapes 186 182 XMLPortObject(WorldEntity, CollisionShape, "collisionShapes", attachCollisionShape, getAttachedCollisionShape, xmlelement, mode); 187 188 if(!this->id_.empty() && this->getLevel() != nullptr)189 this->getLevel()->getScriptableController()->registerWorldEntity(this->id_, this);190 183 } 191 184 -
code/branches/Presentation_HS17/src/orxonox/worldentities/WorldEntity.h
r11686 r11690 110 110 virtual void changedActivity(void) override; 111 111 virtual void changedVisibility(void) override; 112 113 inline std::string getID(void)114 { return this->id_; }115 116 inline void setID(std::string id)117 { this->id_ = id; }118 112 119 113 virtual void setPosition(const Vector3& position) = 0; … … 448 442 449 443 btRigidBody* physicalBody_; //!< Bullet rigid body. Everything physical is applied to this instance. 450 std::string id_; //!< Used by the ScriptableController to identify objects451 444 452 445 private: -
code/branches/Presentation_HS17/src/orxonox/worldentities/pawns/Pawn.cc
r11686 r11690 50 50 #include "sound/WorldSound.h" 51 51 #include "core/object/ObjectListIterator.h" 52 #include "Level.h"53 #include "scriptablecontroller/scriptable_controller.h"54 52 55 53 #include "controllers/FormationController.h" … … 162 160 163 161 XMLPortParam ( RadarViewable, "radarname", setRadarName, getRadarName, xmlelement, mode ); 164 165 if(!this->id_.empty() && this->getLevel() != nullptr)166 this->getLevel()->getScriptableController()->registerPawn(this->id_, this);167 162 } 168 163 … … 287 282 { 288 283 // Health-damage cannot be absorbed by shields. 289 // Shield-damage only reduces shield health. 284 // Shield-damage only reduces shield health. 290 285 // Normal damage can be (partially) absorbed by shields. 291 286 … … 307 302 this->setHealth(this->health_ - (damage - shielddamage) - healthdamage); 308 303 } 309 this->getLevel()->getScriptableController()->pawnHit(this, originator, this->health_, this->shieldHealth_);310 304 311 305 this->lastHitOriginator_ = originator; … … 408 402 } 409 403 } 410 411 this->getLevel()->getScriptableController()->pawnKilled(this);412 404 } 413 405 void Pawn::goWithStyle() … … 633 625 { 634 626 // delete all debug models 635 for(Model* model : debugWeaponSlotModels_) 627 for(Model* model : debugWeaponSlotModels_) 636 628 { 637 629 model->destroy();
Note: See TracChangeset
for help on using the changeset viewer.