Changeset 6524 for code/trunk/src/orxonox
- Timestamp:
- Mar 15, 2010, 3:27:09 PM (15 years ago)
- Location:
- code/trunk
- Files:
-
- 20 deleted
- 11 edited
- 5 copied
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:mergeinfo changed
-
code/trunk/src/orxonox/CMakeLists.txt
r6417 r6524 58 58 MoodManager.h 59 59 controllers/HumanController.h 60 pickup/BaseItem.h61 pickup/PickupInventory.h62 60 sound/SoundManager.h 63 61 DEFINE_SYMBOL -
code/trunk/src/orxonox/OrxonoxPrereqs.h
r6417 r6524 117 117 class GametypeMessageListener; 118 118 class NotificationListener; 119 class Pickupable; 120 class PickupCarrier; 119 121 class PlayerTrigger; 120 122 class RadarListener; … … 133 135 class OrxonoxOverlay; 134 136 class OverlayGroup; 135 137 136 138 // pickup 137 class BaseItem; 138 class DroppedItem; 139 class EquipmentItem; 140 class ModifierPickup; 141 class PassiveItem; 142 class PickupCollection; 143 class PickupInventory; 144 class PickupSpawner; 145 class UsableItem; 146 // pickup, items 147 class HealthImmediate; 148 class HealthUsable; 149 class Jump; 139 class PickupIdentifier; 150 140 151 141 //sound -
code/trunk/src/orxonox/interfaces/CMakeLists.txt
r5781 r6524 1 1 ADD_SOURCE_FILES(ORXONOX_SRC_FILES 2 2 InterfaceCompilation.cc 3 Pickupable.cc 3 4 RadarViewable.cc 4 5 ) -
code/trunk/src/orxonox/interfaces/InterfaceCompilation.cc
r5929 r6524 34 34 35 35 #include "GametypeMessageListener.h" 36 #include "PickupCarrier.h" 36 37 #include "PlayerTrigger.h" 37 38 #include "RadarListener.h" … … 51 52 RegisterRootObject(GametypeMessageListener); 52 53 } 54 55 //---------------------------- 56 // PickupCarrier 57 //---------------------------- 58 PickupCarrier::PickupCarrier() 59 { 60 RegisterRootObject(PickupCarrier); 61 62 } 63 64 PickupCarrier::~PickupCarrier() 65 { 66 for(std::set<Pickupable*>::iterator it = this->pickups_.begin(); it != this->pickups_.end(); it++) 67 { 68 (*it)->destroy(); 69 } 70 71 this->pickups_.clear(); 72 } 53 73 74 //---------------------------- 75 // PlayerTrigger 76 //---------------------------- 77 PlayerTrigger::PlayerTrigger() 78 { 79 RegisterRootObject(PlayerTrigger); 80 81 this->player_ = NULL; 82 this->isForPlayer_ = true; 83 } 84 54 85 //---------------------------- 55 86 // RadarListener … … 83 114 RegisterRootObject(NotificationListener); 84 115 } 85 86 //----------------------------87 // PlayerTrigger88 //----------------------------89 PlayerTrigger::PlayerTrigger()90 {91 RegisterRootObject(PlayerTrigger);92 93 this->player_ = NULL;94 this->isForPlayer_ = true;95 }96 116 } -
code/trunk/src/orxonox/items/Engine.cc
r5929 r6524 35 35 #include "Scene.h" 36 36 #include "worldentities/pawns/SpaceShip.h" 37 #include "pickup/ModifierType.h" 37 //TODO: Remove. 38 //#include "pickup/ModifierType.h" 38 39 #include "tools/Shader.h" 39 40 … … 193 194 } 194 195 195 this->ship_->setAcceleration(this->ship_->getPickups().processModifiers(ModifierType::Acceleration, this->ship_->getOrientation() * acceleration, false)); 196 //TODO: Correct? 197 this->ship_->setAcceleration(this->ship_->getOrientation() * acceleration); 196 198 197 199 if (!this->ship_->getPermanentBoost()) -
code/trunk/src/orxonox/pickup/CMakeLists.txt
r5781 r6524 1 1 ADD_SOURCE_FILES(ORXONOX_SRC_FILES 2 BaseItem.cc 3 DroppedItem.cc 4 EquipmentItem.cc 5 ModifierPickup.cc 6 PassiveItem.cc 7 PickupCollection.cc 8 PickupInventory.cc 9 PickupSpawner.cc 10 UsableItem.cc 2 PickupIdentifier.cc 11 3 ) 12 4 13 ADD_SUBDIRECTORY(items) -
code/trunk/src/orxonox/worldentities/WorldEntity.cc
r6501 r6524 81 81 this->node_->setPosition(Vector3::ZERO); 82 82 this->node_->setOrientation(Quaternion::IDENTITY); 83 84 // Activity and visibility memory. 85 this->bActiveMem_ = true; 86 this->bVisibleMem_ = true; 83 87 84 88 … … 201 205 registerVariable(this->parentID_, VariableDirection::ToClient, new NetworkCallback<WorldEntity>(this, &WorldEntity::networkcallback_parentChanged)); 202 206 } 207 208 /** 209 @brief 210 When the activity is changed, it is changed for all attached objects as well. 211 */ 212 void WorldEntity::changedActivity(void) 213 { 214 SUPER(WorldEntity, changedActivity); 215 216 for (std::set<WorldEntity*>::const_iterator it = this->getAttachedObjects().begin(); it != this->getAttachedObjects().end(); it++) 217 { 218 if(!this->isActive()) 219 { 220 (*it)->bActiveMem_ = (*it)->isActive(); 221 (*it)->setActive(this->isActive()); 222 } 223 else 224 { 225 (*it)->setActive((*it)->bActiveMem_); 226 } 227 } 228 } 229 230 /** 231 @brief 232 When the visibility is changed, it is changed for all attached objects as well. 233 */ 234 void WorldEntity::changedVisibility(void) 235 { 236 SUPER(WorldEntity, changedVisibility); 237 238 for (std::set<WorldEntity*>::const_iterator it = this->getAttachedObjects().begin(); it != this->getAttachedObjects().end(); it++) 239 { 240 if(!this->isVisible()) 241 { 242 (*it)->bVisibleMem_ = (*it)->isVisible(); 243 (*it)->setVisible(this->isVisible()); 244 } 245 else 246 { 247 (*it)->setVisible((*it)->bVisibleMem_); 248 } 249 } 250 } 203 251 204 252 /** -
code/trunk/src/orxonox/worldentities/WorldEntity.h
r6501 r6524 105 105 static const Vector3 DOWN; 106 106 static const Vector3 UP; 107 108 virtual void changedActivity(void); 109 virtual void changedVisibility(void); 107 110 108 111 virtual void setPosition(const Vector3& position) = 0; … … 231 234 std::set<WorldEntity*> children_; 232 235 bool bDeleteWithParent_; 236 237 bool bActiveMem_; 238 bool bVisibleMem_; 233 239 234 240 -
code/trunk/src/orxonox/worldentities/pawns/Pawn.cc
r6417 r6524 71 71 this->aimPosition_ = Vector3::ZERO; 72 72 73 this->getPickups().setOwner(this); 73 //TODO: Remove. 74 //this->getPickups().setOwner(this); 74 75 75 76 if (GameMode::isMaster()) … … 296 297 } 297 298 298 void Pawn::dropItems() 299 { 300 this->getPickups().clear(); 301 } 299 //TODO: Remove. 300 // void Pawn::dropItems() 301 // { 302 // this->getPickups().clear(); 303 // } 302 304 303 305 -
code/trunk/src/orxonox/worldentities/pawns/Pawn.h
r6417 r6524 33 33 34 34 #include <string> 35 #include "interfaces/PickupCarrier.h" 35 36 #include "interfaces/RadarViewable.h" 36 37 #include "worldentities/ControllableEntity.h" 37 #include "pickup/PickupCollection.h"38 38 39 39 namespace orxonox 40 40 { 41 class _OrxonoxExport Pawn : public ControllableEntity, public RadarViewable 41 class _OrxonoxExport Pawn : public ControllableEntity, public RadarViewable, public PickupCarrier 42 42 { 43 43 friend class WeaponSystem; … … 109 109 { return this->numexplosionchunks_; } 110 110 111 virtual void dropItems(); 112 inline PickupCollection& getPickups() 113 { return this->pickups_; } 114 virtual void useItem() 115 { this->pickups_.useItem(); } 111 //TODO: Remove. 112 // virtual void dropItems(); 113 // inline PickupCollection& getPickups() 114 // { return this->pickups_; } 115 // virtual void useItem() 116 // { this->pickups_.useItem(); } 116 117 117 118 virtual void startLocalHumanControl(); … … 135 136 bool bAlive_; 136 137 137 PickupCollection pickups_; 138 //TODO: Remove. 139 //PickupCollection pickups_; 140 virtual std::list<PickupCarrier*>* getCarrierChildren(void) 141 { return new std::list<PickupCarrier*>(); } 142 virtual PickupCarrier* getCarrierParent(void) 143 { return NULL; } 144 virtual const Vector3& getCarrierPosition(void) 145 { return this->getWorldPosition(); }; 138 146 139 147 float health_;
Note: See TracChangeset
for help on using the changeset viewer.