Changeset 9602 in orxonox.OLD
- Timestamp:
- Jul 29, 2006, 10:46:19 AM (18 years ago)
- Location:
- branches/proxy/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/proxy/src/lib/network/proxy/proxy_control.cc
r9600 r9602 277 277 if( SharedNetworkData::getInstance()->isClient()) 278 278 { 279 PRINTF( 1)("I am client, got no right to force reconnection\n");279 PRINTF(0)("I am client, got no right to force reconnection\n"); 280 280 return; 281 281 } -
branches/proxy/src/world_entities/npcs/space_turret.cc
r9235 r9602 74 74 this->weaponHolder[0].setParent(this); 75 75 this->weaponHolder[1].setParent(this); 76 77 this->wLeftHandle = registerVarId( new SynchronizeableString( &this->wLeft, &this->wLeft, "weapon-left" ) ); 78 this->wRightHandle = registerVarId( new SynchronizeableString( &this->wRight, &this->wRight, "weapon-right" ) ); 79 76 80 } 77 81 … … 98 102 if (this->left) 99 103 { 104 this->wLeft = element->Value(); 105 100 106 this->left->setParent(this); 101 107 this->left->toList(this->getOMListNumber()); … … 110 116 if (this->right) 111 117 { 118 this->wRight = element->Value(); 119 112 120 this->right->setParent(this); 113 121 this->right->toList(this->getOMListNumber()); … … 117 125 } 118 126 } 127 128 129 /** 130 * sets the left weapon called from net sync 131 * @param wLeft the left weapon string 132 */ 133 void SpaceTurret::setWeaponLeft(const std::string& wLeft) 134 { 135 136 } 137 138 /** 139 * sets the left weapon called from net sync 140 * @param wRught the right weapon string 141 */ 142 void SpaceTurret::setWeaponRight(const std::string& wRight) 143 {} 119 144 120 145 /** … … 198 223 199 224 } 225 226 227 228 /** 229 * handler for changes on registred vars 230 * @param id id's which changed 231 */ 232 void SpaceTurret::varChangeHandler( std::list< int > & id ) 233 { 234 if ( std::find( id.begin(), id.end(), this->wLeftHandle ) != id.end()) 235 { 236 this->setWeaponLeft(this->wLeft); 237 } 238 239 if ( std::find( id.begin(), id.end(), this->wRightHandle ) != id.end() ) 240 { 241 this->setWeaponRight(this->wRight); 242 } 243 244 245 WorldEntity::varChangeHandler( id ); 246 } 247 -
branches/proxy/src/world_entities/npcs/space_turret.h
r9235 r9602 8 8 9 9 #include "npcs/npc.h" 10 11 #include <string> 12 #include <list> 13 10 14 11 15 class Weapon; … … 20 24 21 25 virtual void loadParams(const TiXmlElement* root); 26 virtual void varChangeHandler( std::list< int > & id ); 27 28 29 void setWeaponLeft(const std::string& wLeft); 30 void setWeaponRight(const std::string& wRight); 22 31 23 32 virtual void postSpawn (); … … 36 45 PNode weaponHolder[2]; 37 46 Weapon *left, *right; 47 48 std::string wLeft; 49 std::string wRight; 50 int wLeftHandle; 51 int wRightHandle; 38 52 }; 39 53
Note: See TracChangeset
for help on using the changeset viewer.