Changeset 6493 in orxonox.OLD for branches/network/src/story_entities
- Timestamp:
- Jan 11, 2006, 5:06:43 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/network/src/story_entities/multi_player_world_data.cc
r6466 r6493 160 160 } 161 161 } 162 else if( !strcmp( element->Value(), "SpaceShip")) /// FIXME it is not said to be a SpaceShip163 {164 BaseObject* created = NetworkGameManager::getInstance()->createEntity(element);165 if( created != NULL )166 PRINTF(1)("Created a %s: %s (%8.u)\n", created->getClassName(), created->getName(), created->getLeafClassID());167 else168 PRINTF(1)("MultiPlayerWorld: could not create this entity\n");169 }170 162 element = element->NextSiblingElement(); 163 171 164 172 165 glmis->step(); … … 174 167 } 175 168 176 177 /* create a Player */ 178 this->localPlayer = new Player(); 179 // Playable* playable; 180 // const std::list<BaseObject*>* playableList = ClassList::getList(CL_PLAYABLE); 181 // assert( playableList != NULL); 182 // 183 // if (playableList != NULL) 184 // { 185 // playable = dynamic_cast<Playable*>(playableList->front()); 186 // this->localPlayer->setControllable(playable); 187 // } 169 if( NetworkManager::getInstance()->isGameServer()) 170 { 171 this->localPlayer = new Player(); 172 State::setPlayer(this->localPlayer); 173 174 Playable* playable; 175 const std::list<BaseObject*>* playableList = ClassList::getList(CL_PLAYABLE); 176 assert( playableList != NULL); 177 178 if (playableList != NULL) 179 { 180 playable = dynamic_cast<Playable*>(playableList->front()); 181 this->localPlayer->setControllable(playable); 182 } 183 } 184 else 185 { 186 /* create a Player */ 187 this->localPlayer = new Player(); 188 State::setPlayer(this->localPlayer); 189 } 190 188 191 189 192 /* init the pnode tree */
Note: See TracChangeset
for help on using the changeset viewer.