Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5382 in orxonox.OLD for trunk/src/world_entities


Ignore:
Timestamp:
Oct 15, 2005, 8:22:30 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: fixed a reparenting bug
made the naming more compliant

Location:
trunk/src/world_entities
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/world_entities/camera.cc

    r5357 r5382  
    120120    case VIEW_NORMAL:
    121121      this->toFovy = 60.0;
    122       this->softReparent("TrackNode");
    123       this->target->softReparent("TrackNode");
     122      this->setParentSoft("TrackNode");
     123      this->target->setParentSoft("TrackNode");
    124124      this->setRelCoorSoft(-10, 5, 0);
    125125      this->target->setRelCoorSoft(0,0,0);
     
    131131
    132132      if (!strcmp(this->target->getParent()->getName(), "Player"))
    133         this->target->softReparent("TrackNode");
     133        this->target->setParentSoft("TrackNode");
    134134      else
    135         this->target->softReparent("Player");
     135        this->target->setParentSoft("Player");
    136136      this->getParent()->debug(0);
    137137
    138138//      this->setParent("main-Turret");
    139139//      this->setParentMode(PNODE_ALL);
    140 //      this->target->softReparent("Player");
     140//      this->target->setParentSoft("Player");
    141141
    142142      break;
    143143    case VIEW_FRONT:
    144144      this->toFovy = 120.0;
    145        this->softReparent("Player");
    146        this->target->softReparent("Player");
     145       this->setParentSoft("Player");
     146       this->target->setParentSoft("Player");
    147147       this->setRelCoorSoft(4, 0, 0, 5);
    148148       this->target->setRelCoorSoft(Vector(10,0,0), 5);
     
    151151    case VIEW_LEFT:
    152152      this->toFovy = 90;
    153       this->softReparent("TrackNode");
    154       this->target->softReparent("TrackNode");
     153      this->setParentSoft("TrackNode");
     154      this->target->setParentSoft("TrackNode");
    155155      this->setRelCoorSoft(0, 1, -10, .5);
    156156      this->target->setRelCoorSoft(0,0,0);
     
    158158    case VIEW_RIGHT:
    159159      this->toFovy = 90;
    160       this->softReparent("TrackNode");
    161       this->target->softReparent("TrackNode");
     160      this->setParentSoft("TrackNode");
     161      this->target->setParentSoft("TrackNode");
    162162      this->setRelCoorSoft(Vector(0, 1, 10));
    163163      this->target->setRelCoorSoft(0,0,0);
     
    165165    case VIEW_TOP:
    166166      this->toFovy= 120;
    167       this->softReparent("TrackNode");
    168       this->target->softReparent("TrackNode");
     167      this->setParentSoft("TrackNode");
     168      this->target->setParentSoft("TrackNode");
    169169      this->setRelCoorSoft(Vector(0, 10, 0));
    170170      this->target->setRelCoorSoft(0,0,0);
     
    215215  // switching back to Modeling Matrix
    216216  glMatrixMode (GL_MODELVIEW);
    217 //  this->target->getParent()->getParent()->debugDraw(0, 2, Vector(1,0,0));
     217  this->target->getParent()->getParent()->debugDraw(0, 2, Vector(1,0,0));
    218218}
    219219
  • trunk/src/world_entities/weapons/test_gun.cc

    r5357 r5382  
    6262  Animation3D* animation3 = this->getAnimation(WS_DEACTIVATING, this);
    6363  //parent->addChild(this->objectComponent1, PNODE_ALL);
    64   this->addChild(this->objectComponent1, PNODE_ALL);
     64  this->addChild(this->objectComponent1);
    6565
    6666  animation1->setInfinity(ANIM_INF_CONSTANT);
Note: See TracChangeset for help on using the changeset viewer.