Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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


Ignore:
Timestamp:
Jan 28, 2007, 3:06:13 PM (18 years ago)
Author:
patrick
Message:

weapon now added to the main model

File:
1 edited

Legend:

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

    r10440 r10443  
    185185    if( obj != NULL && obj->isA( Weapon::staticClassID()))
    186186    {
     187      Weapon* w = dynamic_cast<Weapon*>(obj);
    187188      PRINTF(0)("created a weapon\n");
     189      int preferedSlot = w->getPreferedSlot();
     190      int preferedSide = w->getPreferedSide();
     191
     192      this->addWeapon( w, preferedSide, preferedSlot);
    188193    }
    189194  }
     
    210215  {
    211216    if (weapon != NULL)
    212       PRINTF(2)("Unable to add Weapon (%s::%s) to %s::%s\n",
     217      PRINTF(1)("Unable to add Weapon (%s::%s) to %s::%s\n",
    213218                weapon->getClassCName(), weapon->getCName(), this->getClassCName(), this->getCName());
    214219    else
    215       PRINTF(2)("No weapon defined\n");
     220      PRINTF(1)("No weapon defined\n");
    216221    return false;
    217222
Note: See TracChangeset for help on using the changeset viewer.