Changeset 9667 for code/trunk/src/orxonox/worldentities
- Timestamp:
- Aug 25, 2013, 9:08:42 PM (11 years ago)
- Location:
- code/trunk
- Files:
-
- 37 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:mergeinfo changed
/code/branches/core6 merged: 9552-9554,9556-9574,9577-9579,9585-9593,9596-9612,9626-9662
- Property svn:mergeinfo changed
-
code/trunk/src/orxonox/worldentities/BigExplosion.cc
r8858 r9667 41 41 namespace orxonox 42 42 { 43 CreateFactory(BigExplosion);44 45 BigExplosion::BigExplosion( BaseObject* creator) : StaticEntity(creator)43 RegisterClass(BigExplosion); 44 45 BigExplosion::BigExplosion(Context* context) : StaticEntity(context) 46 46 { 47 47 RegisterObject(BigExplosion); … … 80 80 void BigExplosion::init() 81 81 { 82 this->debrisEntity1_ = new MovableEntity(this );83 this->debrisEntity2_ = new MovableEntity(this );84 this->debrisEntity3_ = new MovableEntity(this );85 this->debrisEntity4_ = new MovableEntity(this );82 this->debrisEntity1_ = new MovableEntity(this->getContext()); 83 this->debrisEntity2_ = new MovableEntity(this->getContext()); 84 this->debrisEntity3_ = new MovableEntity(this->getContext()); 85 this->debrisEntity4_ = new MovableEntity(this->getContext()); 86 86 87 87 this->debrisEntity1_->setSyncMode(0); … … 90 90 this->debrisEntity4_->setSyncMode(0); 91 91 92 this->debris1_ = new Model(this );93 this->debris2_ = new Model(this );94 this->debris3_ = new Model(this );95 this->debris4_ = new Model(this );92 this->debris1_ = new Model(this->getContext()); 93 this->debris2_ = new Model(this->getContext()); 94 this->debris3_ = new Model(this->getContext()); 95 this->debris4_ = new Model(this->getContext()); 96 96 97 97 this->debris1_->setSyncMode(0); … … 100 100 this->debris4_->setSyncMode(0); 101 101 102 this->explosion_ = new StaticEntity(this );102 this->explosion_ = new StaticEntity(this->getContext()); 103 103 this->explosion_->setSyncMode(0); 104 104 … … 148 148 this->debrisEntity4_->attach(debris4_); 149 149 150 ParticleSpawner* effect = new ParticleSpawner(this->getC reator());150 ParticleSpawner* effect = new ParticleSpawner(this->getContext()); 151 151 effect->setDestroyAfterLife(true); 152 152 effect->setSource("Orxonox/explosion2b"); … … 154 154 effect->setSyncMode(0); 155 155 156 ParticleSpawner* effect2 = new ParticleSpawner(this->getC reator());156 ParticleSpawner* effect2 = new ParticleSpawner(this->getContext()); 157 157 effect2->setDestroyAfterLife(true); 158 158 effect2->setSource("Orxonox/smoke6"); … … 172 172 for(int i=0;i<10;i++) 173 173 { 174 Model* part1 = new Model(this );175 Model* part2 = new Model(this );176 177 MovableEntity* partEntity1 = new MovableEntity(this );178 MovableEntity* partEntity2 = new MovableEntity(this );174 Model* part1 = new Model(this->getContext()); 175 Model* part2 = new Model(this->getContext()); 176 177 MovableEntity* partEntity1 = new MovableEntity(this->getContext()); 178 MovableEntity* partEntity2 = new MovableEntity(this->getContext()); 179 179 180 180 part1->setSyncMode(0); … … 225 225 { 226 226 this->debris1_->detachOgreObject(this->debrisFire1_->getParticleSystem()); 227 this->debrisFire1_->destroy();227 delete this->debrisFire1_; 228 228 } 229 229 if (this->debrisSmoke1_) 230 230 { 231 231 this->debris1_->detachOgreObject(this->debrisSmoke1_->getParticleSystem()); 232 this->debrisSmoke1_->destroy();232 delete this->debrisSmoke1_; 233 233 } 234 234 … … 236 236 { 237 237 this->debris2_->detachOgreObject(this->debrisFire2_->getParticleSystem()); 238 this->debrisFire2_->destroy();238 delete this->debrisFire2_; 239 239 } 240 240 if (this->debrisSmoke2_) 241 241 { 242 242 this->debris2_->detachOgreObject(this->debrisSmoke2_->getParticleSystem()); 243 this->debrisSmoke2_->destroy();243 delete this->debrisSmoke2_; 244 244 } 245 245 … … 247 247 { 248 248 this->debris3_->detachOgreObject(this->debrisFire3_->getParticleSystem()); 249 this->debrisFire3_->destroy();249 delete this->debrisFire3_; 250 250 } 251 251 if (this->debrisSmoke3_) 252 252 { 253 253 this->debris3_->detachOgreObject(this->debrisSmoke3_->getParticleSystem()); 254 this->debrisSmoke3_->destroy();254 delete this->debrisSmoke3_; 255 255 } 256 256 … … 258 258 { 259 259 this->debris4_->detachOgreObject(this->debrisFire4_->getParticleSystem()); 260 this->debrisFire4_->destroy();260 delete this->debrisFire4_; 261 261 } 262 262 if (this->debrisSmoke4_) 263 263 { 264 264 this->debris4_->detachOgreObject(this->debrisSmoke4_->getParticleSystem()); 265 this->debrisSmoke4_->destroy();265 delete this->debrisSmoke4_; 266 266 } 267 267 } -
code/trunk/src/orxonox/worldentities/BigExplosion.h
r7176 r9667 40 40 { 41 41 public: 42 BigExplosion( BaseObject* creator);42 BigExplosion(Context* context); 43 43 virtual ~BigExplosion(); 44 44 -
code/trunk/src/orxonox/worldentities/CameraPosition.cc
r8706 r9667 35 35 namespace orxonox 36 36 { 37 CreateFactory(CameraPosition);37 RegisterClass(CameraPosition); 38 38 39 CameraPosition::CameraPosition( BaseObject* creator) : StaticEntity(creator)39 CameraPosition::CameraPosition(Context* context) : StaticEntity(context) 40 40 { 41 41 RegisterObject(CameraPosition); -
code/trunk/src/orxonox/worldentities/CameraPosition.h
r5781 r9667 38 38 { 39 39 public: 40 CameraPosition( BaseObject* creator);40 CameraPosition(Context* context); 41 41 virtual ~CameraPosition(); 42 42 -
code/trunk/src/orxonox/worldentities/ControllableEntity.cc
r9348 r9667 33 33 34 34 #include "core/CoreIncludes.h" 35 #include "core/ ConfigValueIncludes.h"35 #include "core/config/ConfigValueIncludes.h" 36 36 #include "core/GameMode.h" 37 37 #include "core/XMLPort.h" … … 47 47 namespace orxonox 48 48 { 49 CreateFactory(ControllableEntity);49 RegisterClass(ControllableEntity); 50 50 51 51 registerMemberNetworkFunction( ControllableEntity, fire ); 52 52 registerMemberNetworkFunction( ControllableEntity, setTargetInternal ); 53 53 54 ControllableEntity::ControllableEntity( BaseObject* creator) : MobileEntity(creator)54 ControllableEntity::ControllableEntity(Context* context) : MobileEntity(context) 55 55 { 56 56 RegisterObject(ControllableEntity); … … 397 397 if (!this->camera_ && GameMode::showsGraphics()) 398 398 { 399 this->camera_ = new Camera(this );399 this->camera_ = new Camera(this->getContext()); 400 400 this->camera_->requestFocus(); 401 401 if (!this->cameraPositionTemplate_.empty()) … … 423 423 if (!this->hudtemplate_.empty()) 424 424 { 425 this->hud_ = new OverlayGroup(this );425 this->hud_ = new OverlayGroup(this->getContext()); 426 426 this->hud_->addTemplate(this->hudtemplate_); 427 427 this->hud_->setOwner(this); -
code/trunk/src/orxonox/worldentities/ControllableEntity.h
r9348 r9667 44 44 45 45 public: 46 ControllableEntity( BaseObject* creator);46 ControllableEntity(Context* context); 47 47 virtual ~ControllableEntity(); 48 48 -
code/trunk/src/orxonox/worldentities/Drone.cc
r7163 r9667 34 34 namespace orxonox 35 35 { 36 CreateFactory(Drone);36 RegisterClass(Drone); 37 37 /** 38 38 @brief 39 39 Constructor. Registers the object and initializes some default values. 40 40 */ 41 Drone::Drone( BaseObject* creator) : Pawn(creator)41 Drone::Drone(Context* context) : Pawn(context) 42 42 { 43 43 RegisterObject(Drone); … … 50 50 this->setCollisionType(WorldEntity::Dynamic); 51 51 52 myController_ = new DroneController( static_cast<BaseObject*>(this)); //!< Creates a new controller and passes our this pointer to it as creator.52 myController_ = new DroneController(this->getContext()); //!< Creates a new controller and passes our this pointer to it as creator. 53 53 myController_->setDrone(this); 54 54 -
code/trunk/src/orxonox/worldentities/Drone.h
r7163 r9667 47 47 { 48 48 public: 49 Drone( BaseObject* creator);49 Drone(Context* context); 50 50 virtual ~Drone(); 51 51 -
code/trunk/src/orxonox/worldentities/EffectContainer.cc
r6417 r9667 40 40 namespace orxonox 41 41 { 42 CreateFactory(EffectContainer);42 RegisterClass(EffectContainer); 43 43 44 EffectContainer::EffectContainer( BaseObject* creator)45 : BaseObject(c reator)44 EffectContainer::EffectContainer(Context* context) 45 : BaseObject(context) 46 46 , lua_(NULL) 47 47 { -
code/trunk/src/orxonox/worldentities/EffectContainer.h
r6417 r9667 40 40 { 41 41 public: 42 EffectContainer( BaseObject* creator);42 EffectContainer(Context* context); 43 43 virtual ~EffectContainer(); 44 44 -
code/trunk/src/orxonox/worldentities/ExplosionChunk.cc
r8858 r9667 38 38 namespace orxonox 39 39 { 40 CreateFactory(ExplosionChunk);40 RegisterClass(ExplosionChunk); 41 41 42 ExplosionChunk::ExplosionChunk( BaseObject* creator) : MovableEntity(creator)42 ExplosionChunk::ExplosionChunk(Context* context) : MovableEntity(context) 43 43 { 44 44 RegisterObject(ExplosionChunk); … … 92 92 { 93 93 this->detachOgreObject(this->fire_->getParticleSystem()); 94 this->fire_->destroy();94 delete this->fire_; 95 95 } 96 96 if (this->smoke_) 97 97 { 98 98 this->detachOgreObject(this->smoke_->getParticleSystem()); 99 this->smoke_->destroy();99 delete this->smoke_; 100 100 } 101 101 } -
code/trunk/src/orxonox/worldentities/ExplosionChunk.h
r7163 r9667 40 40 { 41 41 public: 42 ExplosionChunk( BaseObject* creator);42 ExplosionChunk(Context* context); 43 43 virtual ~ExplosionChunk(); 44 44 -
code/trunk/src/orxonox/worldentities/MobileEntity.cc
r8858 r9667 39 39 namespace orxonox 40 40 { 41 MobileEntity::MobileEntity(BaseObject* creator) : WorldEntity(creator) 41 RegisterClass(MobileEntity); 42 43 MobileEntity::MobileEntity(Context* context) : WorldEntity(context) 42 44 { 43 45 RegisterObject(MobileEntity); -
code/trunk/src/orxonox/worldentities/MobileEntity.h
r8727 r9667 41 41 { 42 42 public: 43 MobileEntity( BaseObject* creator);43 MobileEntity(Context* context); 44 44 virtual ~MobileEntity(); 45 45 -
code/trunk/src/orxonox/worldentities/MovableEntity.cc
r7284 r9667 41 41 static const float CONTINUOUS_SYNCHRONIZATION_TIME = 10.0f; 42 42 43 CreateFactory(MovableEntity);43 RegisterClass(MovableEntity); 44 44 45 MovableEntity::MovableEntity( BaseObject* creator) : MobileEntity(creator)45 MovableEntity::MovableEntity(Context* context) : MobileEntity(context) 46 46 { 47 47 RegisterObject(MovableEntity); -
code/trunk/src/orxonox/worldentities/MovableEntity.h
r7163 r9667 43 43 { 44 44 public: 45 MovableEntity( BaseObject* creator);45 MovableEntity(Context* context); 46 46 virtual ~MovableEntity(); 47 47 -
code/trunk/src/orxonox/worldentities/SpawnPoint.cc
r8858 r9667 37 37 namespace orxonox 38 38 { 39 CreateFactory(SpawnPoint);39 RegisterClass(SpawnPoint); 40 40 41 SpawnPoint::SpawnPoint( BaseObject* creator) : StaticEntity(creator)41 SpawnPoint::SpawnPoint(Context* context) : StaticEntity(context) 42 42 { 43 43 RegisterObject(SpawnPoint); … … 81 81 Pawn* SpawnPoint::spawn() 82 82 { 83 Pawn* entity = this->spawnclass_.fabricate(this );83 Pawn* entity = this->spawnclass_.fabricate(this->getContext()); 84 84 if (entity) 85 85 { -
code/trunk/src/orxonox/worldentities/SpawnPoint.h
r5929 r9667 33 33 34 34 #include <string> 35 #include "core/ SubclassIdentifier.h"35 #include "core/class/SubclassIdentifier.h" 36 36 #include "worldentities/StaticEntity.h" 37 37 … … 41 41 { 42 42 public: 43 SpawnPoint( BaseObject* creator);43 SpawnPoint(Context* context); 44 44 virtual ~SpawnPoint() {} 45 45 -
code/trunk/src/orxonox/worldentities/StaticEntity.cc
r8858 r9667 37 37 namespace orxonox 38 38 { 39 CreateFactory(StaticEntity);39 RegisterClass(StaticEntity); 40 40 41 StaticEntity::StaticEntity( BaseObject* creator) : WorldEntity(creator)41 StaticEntity::StaticEntity(Context* context) : WorldEntity(context) 42 42 { 43 43 RegisterObject(StaticEntity); -
code/trunk/src/orxonox/worldentities/StaticEntity.h
r7163 r9667 39 39 { 40 40 public: 41 StaticEntity( BaseObject* creator);41 StaticEntity(Context* context); 42 42 virtual ~StaticEntity(); 43 43 -
code/trunk/src/orxonox/worldentities/TeamSpawnPoint.cc
r5781 r9667 34 34 namespace orxonox 35 35 { 36 CreateFactory(TeamSpawnPoint);36 RegisterClass(TeamSpawnPoint); 37 37 38 TeamSpawnPoint::TeamSpawnPoint( BaseObject* creator) : SpawnPoint(creator)38 TeamSpawnPoint::TeamSpawnPoint(Context* context) : SpawnPoint(context) 39 39 { 40 40 RegisterObject(TeamSpawnPoint); -
code/trunk/src/orxonox/worldentities/TeamSpawnPoint.h
r5781 r9667 40 40 { 41 41 public: 42 TeamSpawnPoint( BaseObject* creator);42 TeamSpawnPoint(Context* context); 43 43 virtual ~TeamSpawnPoint() {} 44 44 -
code/trunk/src/orxonox/worldentities/WorldEntity.cc
r8858 r9667 61 61 BOOST_STATIC_ASSERT((int)Ogre::Node::TS_WORLD == (int)WorldEntity::World); 62 62 63 RegisterAbstractClass(WorldEntity).inheritsFrom(Class(BaseObject)).inheritsFrom(Class(Synchronisable)); 64 63 65 /** 64 66 @brief … … 66 68 All the default values are being set here. 67 69 */ 68 WorldEntity::WorldEntity( BaseObject* creator) : BaseObject(creator), Synchronisable(creator)70 WorldEntity::WorldEntity(Context* context) : BaseObject(context), Synchronisable(context) 69 71 { 70 72 RegisterObject(WorldEntity); … … 92 94 this->bPhysicsActiveSynchronised_ = false; 93 95 this->bPhysicsActiveBeforeAttaching_ = false; 94 this->collisionShape_ = new WorldEntityCollisionShape(this); 96 this->collisionShape_ = new WorldEntityCollisionShape(this->getContext()); 97 this->collisionShape_->setWorldEntityOwner(this); 95 98 this->collisionType_ = None; 96 99 this->collisionTypeSynchronised_ = None; -
code/trunk/src/orxonox/worldentities/WorldEntity.h
r7910 r9667 90 90 91 91 public: 92 WorldEntity( BaseObject* creator);92 WorldEntity(Context* context); 93 93 virtual ~WorldEntity(); 94 94 -
code/trunk/src/orxonox/worldentities/pawns/Destroyer.cc
r5929 r9667 34 34 namespace orxonox 35 35 { 36 CreateFactory(Destroyer);36 RegisterClass(Destroyer); 37 37 38 Destroyer::Destroyer( BaseObject* creator) : SpaceShip(creator)38 Destroyer::Destroyer(Context* context) : SpaceShip(context) 39 39 { 40 40 RegisterObject(Destroyer); -
code/trunk/src/orxonox/worldentities/pawns/Destroyer.h
r5781 r9667 39 39 { 40 40 public: 41 Destroyer( BaseObject* creator);41 Destroyer(Context* context); 42 42 virtual ~Destroyer() {}; 43 43 -
code/trunk/src/orxonox/worldentities/pawns/FpsPlayer.cc
r9016 r9667 38 38 39 39 #include "core/CoreIncludes.h" 40 #include "core/ ConfigValueIncludes.h"40 #include "core/config/ConfigValueIncludes.h" 41 41 #include "core/Template.h" 42 42 #include "core/XMLPort.h" … … 53 53 const float orientationGain_ = 100; 54 54 const float jumpValue_ = 300; 55 CreateFactory(FpsPlayer);56 57 FpsPlayer::FpsPlayer( BaseObject* creator) : Pawn(creator)55 RegisterClass(FpsPlayer); 56 57 FpsPlayer::FpsPlayer(Context* context) : Pawn(context) 58 58 { 59 59 RegisterObject(FpsPlayer); -
code/trunk/src/orxonox/worldentities/pawns/FpsPlayer.h
r9016 r9667 43 43 { 44 44 public: 45 FpsPlayer( BaseObject* creator);45 FpsPlayer(Context* context); 46 46 virtual ~FpsPlayer(); 47 47 -
code/trunk/src/orxonox/worldentities/pawns/Pawn.cc
r9666 r9667 51 51 namespace orxonox 52 52 { 53 CreateFactory(Pawn);54 55 Pawn::Pawn( BaseObject* creator)56 : ControllableEntity(c reator)57 , RadarViewable( creator, static_cast<WorldEntity*>(this))53 RegisterClass(Pawn); 54 55 Pawn::Pawn(Context* context) 56 : ControllableEntity(context) 57 , RadarViewable(this, static_cast<WorldEntity*>(this)) 58 58 { 59 59 RegisterObject(Pawn); … … 86 86 if (GameMode::isMaster()) 87 87 { 88 this->weaponSystem_ = new WeaponSystem(this );88 this->weaponSystem_ = new WeaponSystem(this->getContext()); 89 89 this->weaponSystem_->setPawn(this); 90 90 } … … 299 299 if (!this->spawnparticlesource_.empty()) 300 300 { 301 ParticleSpawner* effect = new ParticleSpawner(this->getC reator());301 ParticleSpawner* effect = new ParticleSpawner(this->getContext()); 302 302 effect->setPosition(this->getPosition()); 303 303 effect->setOrientation(this->getOrientation()); … … 365 365 this->setDestroyWhenPlayerLeft(false); 366 366 367 BigExplosion* chunk = new BigExplosion(this->getC reator());367 BigExplosion* chunk = new BigExplosion(this->getContext()); 368 368 chunk->setPosition(this->getPosition()); 369 369 … … 373 373 // play death effect 374 374 { 375 ParticleSpawner* effect = new ParticleSpawner(this->getC reator());375 ParticleSpawner* effect = new ParticleSpawner(this->getContext()); 376 376 effect->setPosition(this->getPosition()); 377 377 effect->setOrientation(this->getOrientation()); … … 381 381 } 382 382 { 383 ParticleSpawner* effect = new ParticleSpawner(this->getC reator());383 ParticleSpawner* effect = new ParticleSpawner(this->getContext()); 384 384 effect->setPosition(this->getPosition()); 385 385 effect->setOrientation(this->getOrientation()); … … 389 389 } 390 390 { 391 ParticleSpawner* effect = new ParticleSpawner(this->getC reator());391 ParticleSpawner* effect = new ParticleSpawner(this->getContext()); 392 392 effect->setPosition(this->getPosition()); 393 393 effect->setOrientation(this->getOrientation()); … … 398 398 for (unsigned int i = 0; i < this->numexplosionchunks_; ++i) 399 399 { 400 ExplosionChunk* chunk = new ExplosionChunk(this->getC reator());400 ExplosionChunk* chunk = new ExplosionChunk(this->getContext()); 401 401 chunk->setPosition(this->getPosition()); 402 402 } -
code/trunk/src/orxonox/worldentities/pawns/Pawn.h
r9625 r9667 45 45 46 46 public: 47 Pawn( BaseObject* creator);47 Pawn(Context* context); 48 48 virtual ~Pawn(); 49 49 -
code/trunk/src/orxonox/worldentities/pawns/SpaceShip.cc
r9348 r9667 32 32 33 33 #include "core/CoreIncludes.h" 34 #include "core/ ConfigValueIncludes.h"34 #include "core/config/ConfigValueIncludes.h" 35 35 #include "core/Template.h" 36 36 #include "core/XMLPort.h" … … 46 46 namespace orxonox 47 47 { 48 CreateFactory(SpaceShip);49 50 SpaceShip::SpaceShip( BaseObject* creator) : Pawn(creator), boostBlur_(NULL)48 RegisterClass(SpaceShip); 49 50 SpaceShip::SpaceShip(Context* context) : Pawn(context), boostBlur_(NULL) 51 51 { 52 52 RegisterObject(SpaceShip); … … 96 96 97 97 if (this->boostBlur_) 98 this->boostBlur_->destroy();98 delete this->boostBlur_; 99 99 } 100 100 } … … 447 447 if (!this->bEnableMotionBlur_ && this->boostBlur_ != NULL) 448 448 { 449 this->boostBlur_->destroy();449 delete this->boostBlur_; 450 450 this->boostBlur_ = NULL; 451 451 } -
code/trunk/src/orxonox/worldentities/pawns/SpaceShip.h
r8727 r9667 88 88 { 89 89 public: 90 SpaceShip( BaseObject* creator);90 SpaceShip(Context* context); 91 91 virtual ~SpaceShip(); 92 92 -
code/trunk/src/orxonox/worldentities/pawns/Spectator.cc
r7863 r9667 31 31 #include "util/Convert.h" 32 32 #include "core/CoreIncludes.h" 33 #include "core/ ConfigValueIncludes.h"33 #include "core/config/ConfigValueIncludes.h" 34 34 #include "core/GameMode.h" 35 35 #include "core/command/CommandExecutor.h" … … 45 45 extern const std::string __CC_suicide_name; 46 46 47 CreateFactory(Spectator);48 49 Spectator::Spectator( BaseObject* creator) : ControllableEntity(creator)47 RegisterClass(Spectator); 48 49 Spectator::Spectator(Context* context) : ControllableEntity(context) 50 50 { 51 51 RegisterObject(Spectator); -
code/trunk/src/orxonox/worldentities/pawns/Spectator.h
r7862 r9667 40 40 { 41 41 public: 42 Spectator( BaseObject* creator);42 Spectator(Context* context); 43 43 virtual ~Spectator(); 44 44 -
code/trunk/src/orxonox/worldentities/pawns/TeamBaseMatchBase.cc
r5929 r9667 37 37 namespace orxonox 38 38 { 39 CreateFactory(TeamBaseMatchBase);39 RegisterClass(TeamBaseMatchBase); 40 40 41 TeamBaseMatchBase::TeamBaseMatchBase( BaseObject* creator) : Pawn(creator)41 TeamBaseMatchBase::TeamBaseMatchBase(Context* context) : Pawn(context) 42 42 { 43 43 RegisterObject(TeamBaseMatchBase); -
code/trunk/src/orxonox/worldentities/pawns/TeamBaseMatchBase.h
r5781 r9667 50 50 { 51 51 public: 52 TeamBaseMatchBase( BaseObject* creator);52 TeamBaseMatchBase(Context* context); 53 53 54 54 // if class closes, close everything
Note: See TracChangeset
for help on using the changeset viewer.