Changeset 2860 in orxonox.OLD for orxonox/branches/dave/src/command_node.cc
- Timestamp:
- Nov 15, 2004, 11:13:21 PM (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/dave/src/command_node.cc
r2636 r2860 11 11 ### File Specific: 12 12 main-programmer: Christian Meyer 13 co-programmer: ...13 co-programmer: Patrick Boenzli 14 14 */ 15 15 … … 33 33 CommandNode::CommandNode (int ID) 34 34 { 35 bound = new List <WorldEntity>();35 bound = new List(); 36 36 aliases = NULL; 37 37 netID = ID; … … 48 48 bLocalInput = true; 49 49 netID = 0; 50 bound = new List <WorldEntity>();50 bound = new List(); 51 51 load_bindings (filename); 52 52 } … … 59 59 if( aliases != NULL) free (aliases); 60 60 if( bound != NULL) delete bound; 61 } 62 63 64 void CommandNode::reset() 65 { 66 this->bound->clear(); 61 67 } 62 68 … … 123 129 void CommandNode::bind (WorldEntity* entity) 124 130 { 125 bound->add (entity , LIST_ADD_NEXT, true);131 bound->add (entity); 126 132 } 127 133 … … 132 138 void CommandNode::unbind (WorldEntity* entity) 133 139 { 134 bound->remove (entity , LIST_FIND_FW);140 bound->remove (entity); 135 141 } 136 142 … … 214 220 } 215 221 222 216 223 void CommandNode::process_network () 217 224 { … … 219 226 } 220 227 228 221 229 void CommandNode::relay (Command* cmd) 222 230 { 223 //printf("CommandNode|relay()\n");224 List<WorldEntity>* plist = bound;225 231 226 232 Orxonox *orx = Orxonox::getInstance(); … … 231 237 if( bLocalInput) send_over_network (cmd); 232 238 233 while( (plist = plist->get_next()) != NULL) 234 { 235 plist->get_object()->command (cmd); 236 } 237 } 239 WorldEntity* entity = bound->enumerate(); 240 while( entity != NULL) 241 { 242 entity->command (cmd); 243 entity = bound->nextElement(); 244 } 245 } 246 238 247 239 248 /**
Note: See TracChangeset
for help on using the changeset viewer.