Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10550 in orxonox.OLD for trunk/src/world_entities/npcs


Ignore:
Timestamp:
Jan 31, 2007, 6:33:43 AM (18 years ago)
Author:
patrick
Message:

mounting points now read also weapons

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/world_entities/npcs/npc.cc

    r10549 r10550  
    8181  this->registerObject(this, NPC::_objectList);
    8282
    83   this->toList(OM_GROUP_00);
     83  this->toList(OM_GROUP_01);
    8484  this->bAIEnabled = false;
    8585
     
    318318    return;
    319319
    320   LOAD_PARAM_START_CYCLE(root, element);
    321   {
    322     PRINTF(0)("got weapon: %s\n", element->Value());
    323     BaseObject* obj = Factory::fabricate(element);
    324     if( obj != NULL && obj->isA( Weapon::staticClassID()))
    325     {
    326       Weapon* w = dynamic_cast<Weapon*>(obj);
    327       PRINTF(0)("created a weapon\n");
    328       int preferedSlot = w->getPreferedSlot();
    329       int preferedSide = w->getPreferedSide();
    330 
    331       this->addWeapon( w, preferedSide, preferedSlot);
    332     }
    333   }
    334   LOAD_PARAM_END_CYCLE(element);
     320//   LOAD_PARAM_START_CYCLE(root, element);
     321//   {
     322// //     PRINTF(0)("got weapon: %s\n", element->Value());
     323//     BaseObject* obj = Factory::fabricate(element);
     324//     if( obj != NULL && obj->isA( Weapon::staticClassID()))
     325//     {
     326//       Weapon* w = dynamic_cast<Weapon*>(obj);
     327// //       PRINTF(0)("created a weapon\n");
     328//       int preferedSlot = w->getPreferedSlot();
     329//       int preferedSide = w->getPreferedSide();
     330//
     331//       this->addWeapon( w, preferedSide, preferedSlot);
     332//     }
     333//   }
     334//   LOAD_PARAM_END_CYCLE(element);
    335335}
    336336
     
    411411        this->getWeaponManager().setSlotPosition(slot, (*it).second->getCenter());
    412412        this->getWeaponManager().setSlotDirection(slot, ws->getRelDir());
    413         PRINTF(0)("setting slot %i\n", slot);
    414         (*it).second->getCenter().debug();
     413//         PRINTF(0)("setting slot %i\n", slot);
     414//         (*it).second->getCenter().debug();
    415415      }
    416416    }
     
    423423  if (this->bFire)
    424424  {
    425     std::cout << "fire..\n";
    426425    weaponMan.fire();
    427426  }
Note: See TracChangeset for help on using the changeset viewer.