Changeset 3681 in orxonox.OLD for orxonox/branches/textEngine/src/command_node.cc
- Timestamp:
- Mar 30, 2005, 9:02:23 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/textEngine/src/command_node.cc
r3236 r3681 14 14 */ 15 15 16 #define DEBUG_SPECIAL_MODULE DEBUG_MODULE_COMMAND_NODE 16 17 17 18 #include "command_node.h" … … 21 22 #include "game_loader.h" 22 23 #include "world.h" 24 #include "list.h" 25 #include "orxonox.h" 23 26 24 27 #include <stdio.h> … … 112 115 FILE* stream; 113 116 114 printf("Loading key bindings from %s\n", filename);117 PRINTF(4)("Loading key bindings from %s\n", filename); 115 118 116 119 if( filename == NULL) filename = DEFAULT_KEYBIND_FILE; … … 127 130 if( parser.getSection ("Bindings") == -1) 128 131 { 129 printf("Could not find key bindings in %s\n", filename);132 PRINTF(1)("Could not find key bindings in %s\n", filename); 130 133 return; 131 134 } … … 145 148 { 146 149 case 0: 147 printf("Key binding %d(%s) set to %s\n", index[1], SDLKToKeyname( index[1]), valuebuf);150 PRINTF(4)("Key binding %d(%s) set to %s\n", index[1], SDLKToKeyname( index[1]), valuebuf); 148 151 strcpy (aliases->keys[index[1]], valuebuf); 149 152 break; 150 153 case 1: 151 printf("Button binding %d(%s) set to %s\n", index[1], SDLBToButtonname( index[1]), valuebuf);154 PRINTF(4)("Button binding %d(%s) set to %s\n", index[1], SDLBToButtonname( index[1]), valuebuf); 152 155 strcpy (aliases->buttons[index[1]], valuebuf); 153 156 break; … … 214 217 while( SDL_PollEvent (&event)) 215 218 { 219 PRINTF(3)("CommandNode::processLocal() =========================got Event\n"); 216 220 memset (cmd.cmd, 0, CMD_LENGHT); 217 221 switch( event.type) … … 267 271 void CommandNode::relay (Command* cmd) 268 272 { 269 270 273 Orxonox *orx = Orxonox::getInstance(); 271 274 if( orx->systemCommand (cmd)) return; … … 278 281 if( this->world->command(cmd)) return; 279 282 280 WorldEntity* entity = bound->enumerate(); 283 tIterator<WorldEntity>* iterator = bound->getIterator(); 284 WorldEntity* entity = iterator->nextElement(); 281 285 while( entity != NULL) 282 286 { 283 entity->command (cmd); 284 entity = bound->nextElement(); 285 } 287 entity->command (cmd); /*no absorbtion of command! strange*/ 288 entity = iterator->nextElement(); 289 } 290 delete iterator; 286 291 } 287 292
Note: See TracChangeset
for help on using the changeset viewer.