Changeset 9629 for code/branches/core6/src/orxonox/worldentities
- Timestamp:
- Aug 9, 2013, 9:26:46 PM (11 years ago)
- Location:
- code/branches/core6/src/orxonox/worldentities
- Files:
-
- 36 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/core6/src/orxonox/worldentities/BigExplosion.cc
r9589 r9629 43 43 CreateFactory(BigExplosion); 44 44 45 BigExplosion::BigExplosion( BaseObject* creator) : StaticEntity(creator)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); -
code/branches/core6/src/orxonox/worldentities/BigExplosion.h
r7176 r9629 40 40 { 41 41 public: 42 BigExplosion( BaseObject* creator);42 BigExplosion(Context* context); 43 43 virtual ~BigExplosion(); 44 44 -
code/branches/core6/src/orxonox/worldentities/CameraPosition.cc
r8706 r9629 37 37 CreateFactory(CameraPosition); 38 38 39 CameraPosition::CameraPosition( BaseObject* creator) : StaticEntity(creator)39 CameraPosition::CameraPosition(Context* context) : StaticEntity(context) 40 40 { 41 41 RegisterObject(CameraPosition); -
code/branches/core6/src/orxonox/worldentities/CameraPosition.h
r5781 r9629 38 38 { 39 39 public: 40 CameraPosition( BaseObject* creator);40 CameraPosition(Context* context); 41 41 virtual ~CameraPosition(); 42 42 -
code/branches/core6/src/orxonox/worldentities/ControllableEntity.cc
r9558 r9629 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/branches/core6/src/orxonox/worldentities/ControllableEntity.h
r9348 r9629 44 44 45 45 public: 46 ControllableEntity( BaseObject* creator);46 ControllableEntity(Context* context); 47 47 virtual ~ControllableEntity(); 48 48 -
code/branches/core6/src/orxonox/worldentities/Drone.cc
r7163 r9629 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/branches/core6/src/orxonox/worldentities/Drone.h
r7163 r9629 47 47 { 48 48 public: 49 Drone( BaseObject* creator);49 Drone(Context* context); 50 50 virtual ~Drone(); 51 51 -
code/branches/core6/src/orxonox/worldentities/EffectContainer.cc
r6417 r9629 42 42 CreateFactory(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/branches/core6/src/orxonox/worldentities/EffectContainer.h
r6417 r9629 40 40 { 41 41 public: 42 EffectContainer( BaseObject* creator);42 EffectContainer(Context* context); 43 43 virtual ~EffectContainer(); 44 44 -
code/branches/core6/src/orxonox/worldentities/ExplosionChunk.cc
r9589 r9629 40 40 CreateFactory(ExplosionChunk); 41 41 42 ExplosionChunk::ExplosionChunk( BaseObject* creator) : MovableEntity(creator)42 ExplosionChunk::ExplosionChunk(Context* context) : MovableEntity(context) 43 43 { 44 44 RegisterObject(ExplosionChunk); -
code/branches/core6/src/orxonox/worldentities/ExplosionChunk.h
r7163 r9629 40 40 { 41 41 public: 42 ExplosionChunk( BaseObject* creator);42 ExplosionChunk(Context* context); 43 43 virtual ~ExplosionChunk(); 44 44 -
code/branches/core6/src/orxonox/worldentities/MobileEntity.cc
r8858 r9629 39 39 namespace orxonox 40 40 { 41 MobileEntity::MobileEntity( BaseObject* creator) : WorldEntity(creator)41 MobileEntity::MobileEntity(Context* context) : WorldEntity(context) 42 42 { 43 43 RegisterObject(MobileEntity); -
code/branches/core6/src/orxonox/worldentities/MobileEntity.h
r8727 r9629 41 41 { 42 42 public: 43 MobileEntity( BaseObject* creator);43 MobileEntity(Context* context); 44 44 virtual ~MobileEntity(); 45 45 -
code/branches/core6/src/orxonox/worldentities/MovableEntity.cc
r7284 r9629 43 43 CreateFactory(MovableEntity); 44 44 45 MovableEntity::MovableEntity( BaseObject* creator) : MobileEntity(creator)45 MovableEntity::MovableEntity(Context* context) : MobileEntity(context) 46 46 { 47 47 RegisterObject(MovableEntity); -
code/branches/core6/src/orxonox/worldentities/MovableEntity.h
r7163 r9629 43 43 { 44 44 public: 45 MovableEntity( BaseObject* creator);45 MovableEntity(Context* context); 46 46 virtual ~MovableEntity(); 47 47 -
code/branches/core6/src/orxonox/worldentities/SpawnPoint.cc
r8858 r9629 39 39 CreateFactory(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/branches/core6/src/orxonox/worldentities/SpawnPoint.h
r9563 r9629 41 41 { 42 42 public: 43 SpawnPoint( BaseObject* creator);43 SpawnPoint(Context* context); 44 44 virtual ~SpawnPoint() {} 45 45 -
code/branches/core6/src/orxonox/worldentities/StaticEntity.cc
r8858 r9629 39 39 CreateFactory(StaticEntity); 40 40 41 StaticEntity::StaticEntity( BaseObject* creator) : WorldEntity(creator)41 StaticEntity::StaticEntity(Context* context) : WorldEntity(context) 42 42 { 43 43 RegisterObject(StaticEntity); -
code/branches/core6/src/orxonox/worldentities/StaticEntity.h
r7163 r9629 39 39 { 40 40 public: 41 StaticEntity( BaseObject* creator);41 StaticEntity(Context* context); 42 42 virtual ~StaticEntity(); 43 43 -
code/branches/core6/src/orxonox/worldentities/TeamSpawnPoint.cc
r5781 r9629 36 36 CreateFactory(TeamSpawnPoint); 37 37 38 TeamSpawnPoint::TeamSpawnPoint( BaseObject* creator) : SpawnPoint(creator)38 TeamSpawnPoint::TeamSpawnPoint(Context* context) : SpawnPoint(context) 39 39 { 40 40 RegisterObject(TeamSpawnPoint); -
code/branches/core6/src/orxonox/worldentities/TeamSpawnPoint.h
r5781 r9629 40 40 { 41 41 public: 42 TeamSpawnPoint( BaseObject* creator);42 TeamSpawnPoint(Context* context); 43 43 virtual ~TeamSpawnPoint() {} 44 44 -
code/branches/core6/src/orxonox/worldentities/WorldEntity.cc
r9612 r9629 66 66 All the default values are being set here. 67 67 */ 68 WorldEntity::WorldEntity( BaseObject* creator) : BaseObject(creator), Synchronisable(creator)68 WorldEntity::WorldEntity(Context* context) : BaseObject(context), Synchronisable(context) 69 69 { 70 70 RegisterObject(WorldEntity); … … 92 92 this->bPhysicsActiveSynchronised_ = false; 93 93 this->bPhysicsActiveBeforeAttaching_ = false; 94 this->collisionShape_ = new WorldEntityCollisionShape(this );94 this->collisionShape_ = new WorldEntityCollisionShape(this->getContext()); 95 95 this->collisionShape_->setWorldEntityOwner(this); 96 96 this->collisionType_ = None; -
code/branches/core6/src/orxonox/worldentities/WorldEntity.h
r7910 r9629 90 90 91 91 public: 92 WorldEntity( BaseObject* creator);92 WorldEntity(Context* context); 93 93 virtual ~WorldEntity(); 94 94 -
code/branches/core6/src/orxonox/worldentities/pawns/Destroyer.cc
r5929 r9629 36 36 CreateFactory(Destroyer); 37 37 38 Destroyer::Destroyer( BaseObject* creator) : SpaceShip(creator)38 Destroyer::Destroyer(Context* context) : SpaceShip(context) 39 39 { 40 40 RegisterObject(Destroyer); -
code/branches/core6/src/orxonox/worldentities/pawns/Destroyer.h
r5781 r9629 39 39 { 40 40 public: 41 Destroyer( BaseObject* creator);41 Destroyer(Context* context); 42 42 virtual ~Destroyer() {}; 43 43 -
code/branches/core6/src/orxonox/worldentities/pawns/FpsPlayer.cc
r9558 r9629 55 55 CreateFactory(FpsPlayer); 56 56 57 FpsPlayer::FpsPlayer( BaseObject* creator) : Pawn(creator)57 FpsPlayer::FpsPlayer(Context* context) : Pawn(context) 58 58 { 59 59 RegisterObject(FpsPlayer); -
code/branches/core6/src/orxonox/worldentities/pawns/FpsPlayer.h
r9016 r9629 43 43 { 44 44 public: 45 FpsPlayer( BaseObject* creator);45 FpsPlayer(Context* context); 46 46 virtual ~FpsPlayer(); 47 47 -
code/branches/core6/src/orxonox/worldentities/pawns/Pawn.cc
r9554 r9629 51 51 CreateFactory(Pawn); 52 52 53 Pawn::Pawn( BaseObject* creator)54 : ControllableEntity(c reator)55 , RadarViewable( creator, static_cast<WorldEntity*>(this))53 Pawn::Pawn(Context* context) 54 : ControllableEntity(context) 55 , RadarViewable(this, static_cast<WorldEntity*>(this)) 56 56 { 57 57 RegisterObject(Pawn); … … 84 84 if (GameMode::isMaster()) 85 85 { 86 this->weaponSystem_ = new WeaponSystem(this );86 this->weaponSystem_ = new WeaponSystem(this->getContext()); 87 87 this->weaponSystem_->setPawn(this); 88 88 } … … 297 297 if (!this->spawnparticlesource_.empty()) 298 298 { 299 ParticleSpawner* effect = new ParticleSpawner(this->getC reator());299 ParticleSpawner* effect = new ParticleSpawner(this->getContext()); 300 300 effect->setPosition(this->getPosition()); 301 301 effect->setOrientation(this->getOrientation()); … … 334 334 this->setDestroyWhenPlayerLeft(false); 335 335 336 BigExplosion* chunk = new BigExplosion(this->getC reator());336 BigExplosion* chunk = new BigExplosion(this->getContext()); 337 337 chunk->setPosition(this->getPosition()); 338 338 … … 342 342 // play death effect 343 343 { 344 ParticleSpawner* effect = new ParticleSpawner(this->getC reator());344 ParticleSpawner* effect = new ParticleSpawner(this->getContext()); 345 345 effect->setPosition(this->getPosition()); 346 346 effect->setOrientation(this->getOrientation()); … … 350 350 } 351 351 { 352 ParticleSpawner* effect = new ParticleSpawner(this->getC reator());352 ParticleSpawner* effect = new ParticleSpawner(this->getContext()); 353 353 effect->setPosition(this->getPosition()); 354 354 effect->setOrientation(this->getOrientation()); … … 358 358 } 359 359 { 360 ParticleSpawner* effect = new ParticleSpawner(this->getC reator());360 ParticleSpawner* effect = new ParticleSpawner(this->getContext()); 361 361 effect->setPosition(this->getPosition()); 362 362 effect->setOrientation(this->getOrientation()); … … 367 367 for (unsigned int i = 0; i < this->numexplosionchunks_; ++i) 368 368 { 369 ExplosionChunk* chunk = new ExplosionChunk(this->getC reator());369 ExplosionChunk* chunk = new ExplosionChunk(this->getContext()); 370 370 chunk->setPosition(this->getPosition()); 371 371 } -
code/branches/core6/src/orxonox/worldentities/pawns/Pawn.h
r9348 r9629 45 45 46 46 public: 47 Pawn( BaseObject* creator);47 Pawn(Context* context); 48 48 virtual ~Pawn(); 49 49 -
code/branches/core6/src/orxonox/worldentities/pawns/SpaceShip.cc
r9589 r9629 48 48 CreateFactory(SpaceShip); 49 49 50 SpaceShip::SpaceShip( BaseObject* creator) : Pawn(creator), boostBlur_(NULL)50 SpaceShip::SpaceShip(Context* context) : Pawn(context), boostBlur_(NULL) 51 51 { 52 52 RegisterObject(SpaceShip); -
code/branches/core6/src/orxonox/worldentities/pawns/SpaceShip.h
r8727 r9629 88 88 { 89 89 public: 90 SpaceShip( BaseObject* creator);90 SpaceShip(Context* context); 91 91 virtual ~SpaceShip(); 92 92 -
code/branches/core6/src/orxonox/worldentities/pawns/Spectator.cc
r9558 r9629 47 47 CreateFactory(Spectator); 48 48 49 Spectator::Spectator( BaseObject* creator) : ControllableEntity(creator)49 Spectator::Spectator(Context* context) : ControllableEntity(context) 50 50 { 51 51 RegisterObject(Spectator); -
code/branches/core6/src/orxonox/worldentities/pawns/Spectator.h
r7862 r9629 40 40 { 41 41 public: 42 Spectator( BaseObject* creator);42 Spectator(Context* context); 43 43 virtual ~Spectator(); 44 44 -
code/branches/core6/src/orxonox/worldentities/pawns/TeamBaseMatchBase.cc
r5929 r9629 39 39 CreateFactory(TeamBaseMatchBase); 40 40 41 TeamBaseMatchBase::TeamBaseMatchBase( BaseObject* creator) : Pawn(creator)41 TeamBaseMatchBase::TeamBaseMatchBase(Context* context) : Pawn(context) 42 42 { 43 43 RegisterObject(TeamBaseMatchBase); -
code/branches/core6/src/orxonox/worldentities/pawns/TeamBaseMatchBase.h
r5781 r9629 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.