Changeset 3239 for code/branches/core4/src/orxonox/objects
- Timestamp:
- Jun 28, 2009, 2:45:37 PM (15 years ago)
- Location:
- code/branches/core4/src/orxonox/objects
- Files:
-
- 26 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/core4/src/orxonox/objects/Level.cc
r3223 r3239 121 121 std::cout << "Load Gametype: " << this->gametype_ << std::endl; 122 122 123 Gametype* rootgametype = orxonox_cast<Gametype >(identifier->fabricate(this));123 Gametype* rootgametype = orxonox_cast<Gametype*>(identifier->fabricate(this)); 124 124 this->setGametype(rootgametype); 125 125 -
code/branches/core4/src/orxonox/objects/Scene.cc
r3223 r3239 326 326 // get the WorldEntity pointers 327 327 WorldEntity* object0 = (WorldEntity*)colObj0->getUserPointer(); 328 assert(orxonox_cast<WorldEntity >(object0));328 assert(orxonox_cast<WorldEntity*>(object0)); 329 329 WorldEntity* object1 = (WorldEntity*)colObj1->getUserPointer(); 330 assert(orxonox_cast<WorldEntity >(object1));330 assert(orxonox_cast<WorldEntity*>(object1)); 331 331 332 332 // false means that bullet will assume we didn't modify the contact -
code/branches/core4/src/orxonox/objects/collisionshapes/CollisionShape.cc
r3223 r3239 85 85 // Parent can either be a WorldEntity or a CompoundCollisionShape. The reason is that the 86 86 // internal collision shape (which is compound) of a WE doesn't get synchronised. 87 CompoundCollisionShape* parentCCS = orxonox_cast<CompoundCollisionShape >(parent);87 CompoundCollisionShape* parentCCS = orxonox_cast<CompoundCollisionShape*>(parent); 88 88 if (parentCCS) 89 89 parentCCS->attach(this); 90 90 else 91 91 { 92 WorldEntity* parentWE = orxonox_cast<WorldEntity >(parent);92 WorldEntity* parentWE = orxonox_cast<WorldEntity*>(parent); 93 93 if (parentWE) 94 94 parentWE->attachCollisionShape(this); … … 103 103 this->parent_ = newParent; 104 104 105 WorldEntityCollisionShape* parentWECCS = orxonox_cast<WorldEntityCollisionShape >(newParent);105 WorldEntityCollisionShape* parentWECCS = orxonox_cast<WorldEntityCollisionShape*>(newParent); 106 106 if (parentWECCS) 107 107 this->parentID_ = parentWECCS->getWorldEntityOwner()->getObjectID(); -
code/branches/core4/src/orxonox/objects/controllers/ArtificialController.cc
r3223 r3239 181 181 if (entity1->getXMLController()) 182 182 { 183 WaypointPatrolController* wpc = orxonox_cast<WaypointPatrolController >(entity1->getXMLController());183 WaypointPatrolController* wpc = orxonox_cast<WaypointPatrolController*>(entity1->getXMLController()); 184 184 if (wpc) 185 185 team1 = wpc->getTeam(); … … 187 187 if (entity2->getXMLController()) 188 188 { 189 WaypointPatrolController* wpc = orxonox_cast<WaypointPatrolController >(entity2->getXMLController());189 WaypointPatrolController* wpc = orxonox_cast<WaypointPatrolController*>(entity2->getXMLController()); 190 190 if (wpc) 191 191 team2 = wpc->getTeam(); 192 192 } 193 193 194 TeamDeathmatch* tdm = orxonox_cast<TeamDeathmatch >(gametype);194 TeamDeathmatch* tdm = orxonox_cast<TeamDeathmatch*>(gametype); 195 195 if (tdm) 196 196 { … … 203 203 204 204 TeamBaseMatchBase* base = 0; 205 base = orxonox_cast<TeamBaseMatchBase >(entity1);205 base = orxonox_cast<TeamBaseMatchBase*>(entity1); 206 206 if (base) 207 207 { … … 219 219 } 220 220 } 221 base = orxonox_cast<TeamBaseMatchBase >(entity2);221 base = orxonox_cast<TeamBaseMatchBase*>(entity2); 222 222 if (base) 223 223 { -
code/branches/core4/src/orxonox/objects/controllers/HumanController.cc
r3223 r3239 161 161 if (HumanController::localController_s && HumanController::localController_s->controllableEntity_) 162 162 { 163 Pawn* pawn = orxonox_cast<Pawn >(HumanController::localController_s->controllableEntity_);163 Pawn* pawn = orxonox_cast<Pawn*>(HumanController::localController_s->controllableEntity_); 164 164 if (pawn) 165 165 pawn->kill(); … … 196 196 { 197 197 if (HumanController::localController_s) 198 return orxonox_cast<Pawn >(HumanController::localController_s->getControllableEntity());198 return orxonox_cast<Pawn*>(HumanController::localController_s->getControllableEntity()); 199 199 else 200 200 return NULL; -
code/branches/core4/src/orxonox/objects/gametypes/Pong.cc
r3223 r3239 144 144 if (player && player->getController() && player->getController()->isA(Class(PongAI))) 145 145 { 146 PongAI* ai = orxonox_cast<PongAI >(player->getController());146 PongAI* ai = orxonox_cast<PongAI*>(player->getController()); 147 147 ai->setPongBall(this->ball_); 148 148 } -
code/branches/core4/src/orxonox/objects/gametypes/TeamBaseMatch.cc
r3223 r3239 54 54 bool TeamBaseMatch::allowPawnDeath(Pawn* victim, Pawn* originator) 55 55 { 56 TeamBaseMatchBase* base = orxonox_cast<TeamBaseMatchBase >(victim);56 TeamBaseMatchBase* base = orxonox_cast<TeamBaseMatchBase*>(victim); 57 57 if (base) 58 58 { … … 87 87 bool TeamBaseMatch::allowPawnDamage(Pawn* victim, Pawn* originator) 88 88 { 89 TeamBaseMatchBase* base = orxonox_cast<TeamBaseMatchBase >(victim);89 TeamBaseMatchBase* base = orxonox_cast<TeamBaseMatchBase*>(victim); 90 90 if (base) 91 91 { -
code/branches/core4/src/orxonox/objects/gametypes/TeamDeathmatch.cc
r3223 r3239 126 126 if ((*it)->isA(Class(TeamSpawnPoint))) 127 127 { 128 TeamSpawnPoint* tsp = orxonox_cast<TeamSpawnPoint >(*it);128 TeamSpawnPoint* tsp = orxonox_cast<TeamSpawnPoint*>(*it); 129 129 if (tsp && (int)tsp->getTeamNumber() != desiredTeamNr) 130 130 { … … 171 171 if ((*it)->isA(Class(TeamColourable))) 172 172 { 173 TeamColourable* tc = orxonox_cast<TeamColourable >(*it);173 TeamColourable* tc = orxonox_cast<TeamColourable*>(*it); 174 174 tc->setTeamColour(this->teamcolours_[it_player->second]); 175 175 } -
code/branches/core4/src/orxonox/objects/infos/PlayerInfo.cc
r3223 r3239 186 186 { 187 187 Synchronisable* temp = Synchronisable::getSynchronisable(this->controllableEntityID_); 188 ControllableEntity* entity = orxonox_cast<ControllableEntity >(temp);188 ControllableEntity* entity = orxonox_cast<ControllableEntity*>(temp); 189 189 this->startControl(entity); 190 190 } … … 199 199 if (this->gtinfoID_ != OBJECTID_UNKNOWN) 200 200 { 201 this->gtinfo_ = orxonox_cast<GametypeInfo >(Synchronisable::getSynchronisable(this->gtinfoID_));201 this->gtinfo_ = orxonox_cast<GametypeInfo*>(Synchronisable::getSynchronisable(this->gtinfoID_)); 202 202 203 203 if (!this->gtinfo_) -
code/branches/core4/src/orxonox/objects/items/Engine.cc
r3223 r3239 138 138 Synchronisable* object = Synchronisable::getSynchronisable(this->shipID_); 139 139 if (object) 140 this->addToSpaceShip(orxonox_cast<SpaceShip >(object));140 this->addToSpaceShip(orxonox_cast<SpaceShip*>(object)); 141 141 } 142 142 } -
code/branches/core4/src/orxonox/objects/pickup/PickupCollection.cc
r3223 r3239 66 66 Identifier* ident = Class(UsableItem); 67 67 if(this->currentUsable_ == NULL && item->isA(ident)) 68 this->currentUsable_ = orxonox_cast<UsableItem >(item);68 this->currentUsable_ = orxonox_cast<UsableItem*>(item); 69 69 70 70 this->items_.insert( std::pair<std::string, BaseItem*> (item->getPickupIdentifier(), item) ); … … 336 336 { 337 337 if ((*it).second->isA(ident)) 338 ret.push_back(orxonox_cast<EquipmentItem >((*it).second));338 ret.push_back(orxonox_cast<EquipmentItem*>((*it).second)); 339 339 } 340 340 … … 353 353 { 354 354 if ((*it).second->isA(ident)) 355 ret.push_back(orxonox_cast<PassiveItem >((*it).second));355 ret.push_back(orxonox_cast<PassiveItem*>((*it).second)); 356 356 } 357 357 … … 370 370 { 371 371 if ((*it).second->isA(ident)) 372 ret.push_back(orxonox_cast<UsableItem >((*it).second));372 ret.push_back(orxonox_cast<UsableItem*>((*it).second)); 373 373 } 374 374 -
code/branches/core4/src/orxonox/objects/pickup/PickupSpawner.cc
r3223 r3239 86 86 // = less delays while running 87 87 BaseObject* newObject = this->itemTemplate_->getBaseclassIdentifier()->fabricate(this); 88 BaseItem* asItem = orxonox_cast<BaseItem >(newObject);88 BaseItem* asItem = orxonox_cast<BaseItem*>(newObject); 89 89 if (asItem) 90 90 { … … 154 154 { 155 155 BaseObject* newObject = this->itemTemplate_->getBaseclassIdentifier()->fabricate(this); 156 BaseItem* asItem = orxonox_cast<BaseItem >(newObject);156 BaseItem* asItem = orxonox_cast<BaseItem*>(newObject); 157 157 if (asItem) 158 158 { -
code/branches/core4/src/orxonox/objects/quest/QuestManager.cc
r3223 r3239 239 239 return NULL; 240 240 } 241 player = orxonox_cast<PlayerInfo >(obj);241 player = orxonox_cast<PlayerInfo*>(obj); 242 242 243 243 QuestContainer* root = NULL; -
code/branches/core4/src/orxonox/objects/weaponsystem/projectiles/Projectile.cc
r3223 r3239 126 126 dmg = this->owner_->getPickups().processModifiers(ModifierType::Damage, dmg, false); 127 127 128 Pawn* victim = orxonox_cast<Pawn >(otherObject);128 Pawn* victim = orxonox_cast<Pawn*>(otherObject); 129 129 if (victim) 130 130 victim->damage(dmg, this->owner_); -
code/branches/core4/src/orxonox/objects/worldentities/Attacher.cc
r3223 r3239 111 111 return; 112 112 113 WorldEntity* entity = orxonox_cast<WorldEntity >(object);113 WorldEntity* entity = orxonox_cast<WorldEntity*>(object); 114 114 if (entity && entity->getName() == this->targetname_) 115 115 { -
code/branches/core4/src/orxonox/objects/worldentities/BigExplosion.cc
r3223 r3239 99 99 Identifier* idDE1 = Class(MovableEntity); 100 100 BaseObject* oDE1 = idDE1->fabricate(this); 101 this->debrisEntity1_ = orxonox_cast<MovableEntity >(oDE1);101 this->debrisEntity1_ = orxonox_cast<MovableEntity*>(oDE1); 102 102 103 103 Identifier* idDE2 = Class(MovableEntity); 104 104 BaseObject* oDE2 = idDE2->fabricate(this); 105 this->debrisEntity2_ = orxonox_cast<MovableEntity >(oDE2);105 this->debrisEntity2_ = orxonox_cast<MovableEntity*>(oDE2); 106 106 107 107 Identifier* idDE3 = Class(MovableEntity); 108 108 BaseObject* oDE3 = idDE3 ->fabricate(this); 109 this->debrisEntity3_ = orxonox_cast<MovableEntity >(oDE3);109 this->debrisEntity3_ = orxonox_cast<MovableEntity*>(oDE3); 110 110 111 111 Identifier* idDE4 = Class(MovableEntity); 112 112 BaseObject* oDE4 = idDE4->fabricate(this); 113 this->debrisEntity4_ = orxonox_cast<MovableEntity >(oDE4);113 this->debrisEntity4_ = orxonox_cast<MovableEntity*>(oDE4); 114 114 115 115 Identifier* idD1 = Class(Model); 116 116 BaseObject* oD1 = idD1->fabricate(this); 117 this->debris1_ = orxonox_cast<Model >(oD1);117 this->debris1_ = orxonox_cast<Model*>(oD1); 118 118 119 119 Identifier* idD2 = Class(Model); 120 120 BaseObject* oD2 = idD2->fabricate(this); 121 this->debris2_ = orxonox_cast<Model >(oD2);121 this->debris2_ = orxonox_cast<Model*>(oD2); 122 122 123 123 Identifier* idD3 = Class(Model); 124 124 BaseObject* oD3 = idD3->fabricate(this); 125 this->debris3_ = orxonox_cast<Model >(oD3);125 this->debris3_ = orxonox_cast<Model*>(oD3); 126 126 127 127 Identifier* idD4 = Class(Model); 128 128 BaseObject* oD4 = idD4->fabricate(this); 129 this->debris4_ = orxonox_cast<Model >(oD4);129 this->debris4_ = orxonox_cast<Model*>(oD4); 130 130 131 131 Identifier* id6 = Class(StaticEntity); 132 132 BaseObject* object4 = id6->fabricate(this); 133 this->explosion_ = orxonox_cast<StaticEntity >(object4);133 this->explosion_ = orxonox_cast<StaticEntity*>(object4); 134 134 135 135 this->debrisSmoke1_ = new ParticleInterface(this->getScene()->getSceneManager(), "Orxonox/smoke7", this->LOD_); … … 202 202 Identifier* idf1 = Class(Model); 203 203 BaseObject* obj1 = idf1->fabricate(this); 204 Model* part1 = orxonox_cast<Model >(obj1);204 Model* part1 = orxonox_cast<Model*>(obj1); 205 205 206 206 207 207 Identifier* idf2 = Class(Model); 208 208 BaseObject* obj2 = idf2->fabricate(this); 209 Model* part2 = orxonox_cast<Model >(obj2);209 Model* part2 = orxonox_cast<Model*>(obj2); 210 210 211 211 Identifier* idf3 = Class(MovableEntity); 212 212 BaseObject* obj3 = idf3->fabricate(this); 213 MovableEntity* partEntity1 = orxonox_cast<MovableEntity >(obj3);213 MovableEntity* partEntity1 = orxonox_cast<MovableEntity*>(obj3); 214 214 215 215 Identifier* idf4 = Class(MovableEntity); 216 216 BaseObject* obj4 = idf4->fabricate(this); 217 MovableEntity* partEntity2 = orxonox_cast<MovableEntity >(obj4);217 MovableEntity* partEntity2 = orxonox_cast<MovableEntity*>(obj4); 218 218 219 219 partEntity1->setVelocity(Vector3(rnd(-1, 1), rnd(-1, 1), rnd(-1, 1))*rnd(10,100)); -
code/branches/core4/src/orxonox/objects/worldentities/ControllableEntity.cc
r3223 r3239 267 267 if (this->playerID_ != OBJECTID_UNKNOWN) 268 268 { 269 this->player_ = orxonox_cast<PlayerInfo >(Synchronisable::getSynchronisable(this->playerID_));269 this->player_ = orxonox_cast<PlayerInfo*>(Synchronisable::getSynchronisable(this->playerID_)); 270 270 if (this->player_ && (this->player_->getControllableEntity() != this)) 271 271 this->player_->startControl(this); -
code/branches/core4/src/orxonox/objects/worldentities/MovableEntity.cc
r3223 r3239 76 76 if (GameMode::isMaster() && enableCollisionDamage_) 77 77 { 78 Pawn* victim = orxonox_cast<Pawn >(otherObject);78 Pawn* victim = orxonox_cast<Pawn*>(otherObject); 79 79 if (victim) 80 80 { -
code/branches/core4/src/orxonox/objects/worldentities/PongBall.cc
r3223 r3239 231 231 this->bat_ = new PongBat*[2]; 232 232 if (this->batID_[0] != OBJECTID_UNKNOWN) 233 this->bat_[0] = orxonox_cast<PongBat >(Synchronisable::getSynchronisable(this->batID_[0]));233 this->bat_[0] = orxonox_cast<PongBat*>(Synchronisable::getSynchronisable(this->batID_[0])); 234 234 if (this->batID_[1] != OBJECTID_UNKNOWN) 235 this->bat_[1] = orxonox_cast<PongBat >(Synchronisable::getSynchronisable(this->batID_[1]));235 this->bat_[1] = orxonox_cast<PongBat*>(Synchronisable::getSynchronisable(this->batID_[1])); 236 236 } 237 237 } -
code/branches/core4/src/orxonox/objects/worldentities/PongCenterpoint.cc
r3223 r3239 73 73 if (this->getGametype() && this->getGametype()->isA(Class(Pong))) 74 74 { 75 Pong* pong_gametype = orxonox_cast<Pong >(this->getGametype());75 Pong* pong_gametype = orxonox_cast<Pong*>(this->getGametype()); 76 76 pong_gametype->setCenterpoint(this); 77 77 } -
code/branches/core4/src/orxonox/objects/worldentities/WorldEntity.cc
r3223 r3239 210 210 if (this->parentID_ != OBJECTID_UNKNOWN) 211 211 { 212 WorldEntity* parent = orxonox_cast<WorldEntity >(Synchronisable::getSynchronisable(this->parentID_));212 WorldEntity* parent = orxonox_cast<WorldEntity*>(Synchronisable::getSynchronisable(this->parentID_)); 213 213 if (parent) 214 214 this->attachToParent(parent); -
code/branches/core4/src/orxonox/objects/worldentities/pawns/Destroyer.cc
r3223 r3239 40 40 RegisterObject(Destroyer); 41 41 42 UnderAttack* gametype = orxonox_cast<UnderAttack >(this->getGametype());42 UnderAttack* gametype = orxonox_cast<UnderAttack*>(this->getGametype()); 43 43 if (gametype) 44 44 { -
code/branches/core4/src/orxonox/objects/worldentities/pawns/SpaceShip.cc
r3223 r3239 198 198 { 199 199 BaseObject* object = identifier->fabricate(this); 200 this->engine_ = orxonox_cast<Engine >(object);200 this->engine_ = orxonox_cast<Engine*>(object); 201 201 202 202 if (this->engine_) -
code/branches/core4/src/orxonox/objects/worldentities/pawns/TeamBaseMatchBase.cc
r3223 r3239 45 45 this->state_ = BaseState::uncontrolled; 46 46 47 TeamBaseMatch* gametype = orxonox_cast<TeamBaseMatch >(this->getGametype());47 TeamBaseMatch* gametype = orxonox_cast<TeamBaseMatch*>(this->getGametype()); 48 48 if (gametype) 49 49 { … … 58 58 this->fireEvent(); 59 59 60 TeamDeathmatch* gametype = orxonox_cast<TeamDeathmatch >(this->getGametype());60 TeamDeathmatch* gametype = orxonox_cast<TeamDeathmatch*>(this->getGametype()); 61 61 if (!gametype) 62 62 return; … … 84 84 if ((*it)->isA(Class(TeamColourable))) 85 85 { 86 TeamColourable* tc = orxonox_cast<TeamColourable >(*it);86 TeamColourable* tc = orxonox_cast<TeamColourable*>(*it); 87 87 tc->setTeamColour(colour); 88 88 } -
code/branches/core4/src/orxonox/objects/worldentities/triggers/CheckPoint.cc
r3223 r3239 85 85 DistanceTrigger::triggered(bIsTriggered); 86 86 87 Asteroids* gametype = orxonox_cast<Asteroids >(this->getGametype());87 Asteroids* gametype = orxonox_cast<Asteroids*>(this->getGametype()); 88 88 if (gametype) 89 89 { -
code/branches/core4/src/orxonox/objects/worldentities/triggers/DistanceTrigger.cc
r3223 r3239 120 120 for (ClassTreeMaskObjectIterator it = this->targetMask_.begin(); it != this->targetMask_.end(); ++it) 121 121 { 122 WorldEntity* entity = orxonox_cast<WorldEntity >(*it);122 WorldEntity* entity = orxonox_cast<WorldEntity*>(*it); 123 123 if (!entity) 124 124 continue; … … 131 131 if(this->isForPlayer()) 132 132 { 133 Pawn* player = orxonox_cast<Pawn >(entity);133 Pawn* player = orxonox_cast<Pawn*>(entity); 134 134 this->setTriggeringPlayer(player); 135 135 }
Note: See TracChangeset
for help on using the changeset viewer.