Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4332 in orxonox.OLD for orxonox/branches/physics/src/command_node.cc


Ignore:
Timestamp:
May 27, 2005, 7:14:55 PM (19 years ago)
Author:
bensch
Message:

orxonox/branches/physics: merged the trunk back to the physics-branche
merged with command:
svn merge -r 4301:HEAD trunk/ branches/physics/
little conflict in particle-system resolved easily

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/branches/physics/src/command_node.cc

    r4178 r4332  
    2424#include "list.h"
    2525#include "orxonox.h"
     26#include "p_node.h"
    2627
    2728#include <stdio.h>
     
    3738CommandNode::CommandNode (int ID)
    3839{
    39   this->bound = new tList<WorldEntity>();
     40  this->bound = new tList<PNode>();
    4041  this->aliases = NULL;
    4142  this->netID = ID;
     
    5455  this->bLocalInput = true;
    5556  this->netID = 0;
    56   this->bound = new tList<WorldEntity>();
     57  this->bound = new tList<PNode>();
    5758  this->bEnabled = true;
    5859  this->world = NULL;
     
    194195   \param entity: Pointer to the entity to bind
    195196*/
    196 void CommandNode::bind (WorldEntity* entity)
     197void CommandNode::bind (PNode* entity)
    197198{
    198199  bound->add (entity);
     
    203204   \param entity: Pointer to the entity to relese
    204205*/
    205 void CommandNode::unbind (WorldEntity* entity)
     206void CommandNode::unbind (PNode* entity)
    206207{
    207208  bound->remove (entity);
     
    264265          cmd.xrel = event.motion.xrel;
    265266          cmd.yrel = event.motion.yrel;
     267          if( strlen (cmd.cmd) > 0) relay(&cmd);
    266268          break;
    267269        case SDL_MOUSEBUTTONUP:
     
    308310  if( this->world->command(cmd)) return;
    309311
    310   tIterator<WorldEntity>* iterator = bound->getIterator();
    311   WorldEntity* entity = iterator->nextElement();
     312  tIterator<PNode>* iterator = bound->getIterator();
     313  PNode* entity = iterator->nextElement();
    312314  while( entity != NULL)
    313315    {
    314       entity->command (cmd); /*no absorbtion of command! strange*/
     316      ((WorldEntity*)entity)->command (cmd); /*no absorbtion of command! strange*/
    315317      entity = iterator->nextElement();
    316318    }
Note: See TracChangeset for help on using the changeset viewer.