Changeset 4332 in orxonox.OLD for orxonox/branches/physics/src/command_node.cc
- Timestamp:
- May 27, 2005, 7:14:55 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/physics/src/command_node.cc
r4178 r4332 24 24 #include "list.h" 25 25 #include "orxonox.h" 26 #include "p_node.h" 26 27 27 28 #include <stdio.h> … … 37 38 CommandNode::CommandNode (int ID) 38 39 { 39 this->bound = new tList< WorldEntity>();40 this->bound = new tList<PNode>(); 40 41 this->aliases = NULL; 41 42 this->netID = ID; … … 54 55 this->bLocalInput = true; 55 56 this->netID = 0; 56 this->bound = new tList< WorldEntity>();57 this->bound = new tList<PNode>(); 57 58 this->bEnabled = true; 58 59 this->world = NULL; … … 194 195 \param entity: Pointer to the entity to bind 195 196 */ 196 void CommandNode::bind ( WorldEntity* entity)197 void CommandNode::bind (PNode* entity) 197 198 { 198 199 bound->add (entity); … … 203 204 \param entity: Pointer to the entity to relese 204 205 */ 205 void CommandNode::unbind ( WorldEntity* entity)206 void CommandNode::unbind (PNode* entity) 206 207 { 207 208 bound->remove (entity); … … 264 265 cmd.xrel = event.motion.xrel; 265 266 cmd.yrel = event.motion.yrel; 267 if( strlen (cmd.cmd) > 0) relay(&cmd); 266 268 break; 267 269 case SDL_MOUSEBUTTONUP: … … 308 310 if( this->world->command(cmd)) return; 309 311 310 tIterator< WorldEntity>* iterator = bound->getIterator();311 WorldEntity* entity = iterator->nextElement();312 tIterator<PNode>* iterator = bound->getIterator(); 313 PNode* entity = iterator->nextElement(); 312 314 while( entity != NULL) 313 315 { 314 entity->command (cmd); /*no absorbtion of command! strange*/316 ((WorldEntity*)entity)->command (cmd); /*no absorbtion of command! strange*/ 315 317 entity = iterator->nextElement(); 316 318 }
Note: See TracChangeset
for help on using the changeset viewer.