Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9186 in orxonox.OLD for branches/presentation/src


Ignore:
Timestamp:
Jul 5, 2006, 7:21:25 AM (18 years ago)
Author:
patrick
Message:

muchos debugos inofromationos

Location:
branches/presentation/src
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • branches/presentation/src/defs/class_id.h

    r9185 r9186  
    191191  CL_CRANE                      =    0x00000316,
    192192  CL_BRAKING_WALL               =    0X00000317,
     193  CL_AIMING_SYSTEM              =    0x00000318,
    193194
    194195  // Playables
     
    221222  CL_FPS_SNIPER_RIFLE           =    0x000003a7,
    222223  CL_FPS_LASER_RIFLE            =    0x000003a8,
    223   CL_AIMING_SYSTEM              =    0x000003a9,
    224224
    225225  // Projectiles
  • branches/presentation/src/lib/collision_reaction/collision_handle.cc

    r9130 r9186  
    230230  for(; it < this->targetList.end(); it++)
    231231  {
     232    if(collisionEvent->getEntityB()->isA(CL_AIMING_SYSTEM))
     233    {
     234       PRINTF(0)("I am: %s colliding with: %s\n", owner->getClassName(), collisionEvent->getEntityB()->getClassName(), *it);
     235       if( collisionEvent->getEntityA() == this->owner) {
     236         PRINTF(0)("I am owner -> I am: %s colliding with: %s is a %i filter?\n", owner->getClassName(),
     237         collisionEvent->getEntityB()->getClassName(), *it);
     238         if( collisionEvent->getEntityB()->isA((ClassID)(*it))) {
     239           PRINTF(0)("I am owner -> I am: %s colliding with: %s is a %i filter ok\n", owner->getClassName(),
     240           collisionEvent->getEntityB()->getClassName(), *it);
     241            }
     242       }
     243       else {
     244         PRINTF(0)("I am not owner -> I am: %s colliding with: %s is a %i filter?\n", owner->getClassName(),
     245         collisionEvent->getEntityB()->getClassName(), *it);
     246         if( collisionEvent->getEntityA()->isA((ClassID)(*it))) {
     247           PRINTF(0)("I'm not owner -> I am: %s colliding with: %s is a %i filter ok\n", owner->getClassName(),
     248           collisionEvent->getEntityA()->getClassName(), *it);
     249            }
     250       }
     251
     252    }
     253
    232254    if( collisionEvent->getEntityA() == this->owner) {
    233255      if( collisionEvent->getEntityB()->isA((ClassID)(*it))) {
     
    257279  for(; it < this->targetList.end(); it++)
    258280  {
     281
     282    if(collision->getEntityB()->isA(CL_AIMING_SYSTEM))
     283    {
     284      PRINTF(0)("I am: %s colliding with: %s\n", owner->getClassName(), collision->getEntityB()->getClassName(), *it);
     285      if( collision->getEntityA() == this->owner) {
     286        PRINTF(0)("I am owner -> I am: %s colliding with: %s is a %i filter?\n", owner->getClassName(),
     287        collision->getEntityB()->getClassName(), *it);
     288        if( collision->getEntityB()->isA((ClassID)(*it))) {
     289          PRINTF(0)("I am owner -> I am: %s colliding with: %s is a %i filter ok\n", owner->getClassName(),
     290          collision->getEntityB()->getClassName(), *it);
     291        }
     292      }
     293      else {
     294        PRINTF(0)("I'm not owner -> I am: %s colliding with: %s is a %i filter?\n", owner->getClassName(),
     295        collision->getEntityB()->getClassName(), *it);
     296        if( collision->getEntityA()->isA((ClassID)(*it))) {
     297          PRINTF(0)("I'm not owner -> I am: %s colliding with: %s is a %i filter ok\n", owner->getClassName(),
     298          collision->getEntityA()->getClassName(), *it);
     299        }
     300      }
     301    }
     302
    259303    if( collision->getEntityA() == this->owner) {
    260       if( collision->getEntityA()->isA((ClassID)(*it)))
     304      if( collision->getEntityB()->isA((ClassID)(*it)))
    261305        return true; }
    262306      else {
    263         if( collision->getEntityB()->isA((ClassID)(*it)))
     307        if( collision->getEntityA()->isA((ClassID)(*it)))
    264308          return true; }
    265309  }
  • branches/presentation/src/world_entities/creatures/fps_player.cc

    r9185 r9186  
    140140
    141141  this->getWeaponManager().setParentNode(&this->cameraNode);
    142   this->getWeaponManager().getParentNode()->setParentMode(PNODE_ROTATE_AND_MOVE);
    143142  this->cameraNode.addNodeFlags(PNODE_PROHIBIT_CHILD_DELETE);
    144143
     
    239238
    240239      State::getCameraNode()->setParentMode(PNODE_ROTATE_AND_MOVE);
     240      this->cameraNode.setParentMode(PNODE_ROTATE_AND_MOVE);
     241      this->getWeaponManager().getParentNode()->setParentMode(PNODE_ROTATE_AND_MOVE);
    241242
    242243
     
    244245      this->getWeaponManager().setSlotPosition(1, Vector(5.0, box->halfLength[1] * f, 0.0));
    245246
    246       this->aimingSystem->toList(/*OM_LIST(this->getOMListNumber() + 1)*/ OM_COMMON);
     247      this->aimingSystem->toList(/*OM_LIST(this->getOMListNumber() + 1)*/ OM_GROUP_01);
    247248    }
    248249  }
  • branches/presentation/src/world_entities/npcs/generic_npc.cc

    r9162 r9186  
    8282{
    8383  this->setClassID(CL_GENERIC_NPC, "GenericNPC");
     84
    8485  this->toList(OM_GROUP_00);
    8586
  • branches/presentation/src/world_entities/weapons/aiming_system.cc

    r9185 r9186  
    3535 */
    3636AimingSystem::AimingSystem (WorldEntity* entity)
     37  : WorldEntity()
    3738{
    3839  this->owner = entity;
     
    6162
    6263  // registering default reactions:
     64  this->unsubscribeReaction(CREngine::CR_OBJECT_DAMAGE);
    6365  this->subscribeReaction(CREngine::CR_OBJECT_DAMAGE, CL_WORLD_ENTITY);
    6466
     
    120122
    121123  PRINTF(0)("hit hit hit, got: %s\n", killer->getClassName());
     124  printf("aimingsystem: hit()\n");
    122125}
    123126
  • branches/presentation/src/world_entities/weapons/aiming_system.h

    r9172 r9186  
    3333  void setRange(float range){this->range = range;};
    3434
    35   void hit(float damage, WorldEntity* killer);
     35  virtual void hit(float damage, WorldEntity* killer);
     36  virtual void destroy(WorldEntity* entity) {}
    3637
    3738  virtual void tick(float dt);
  • branches/presentation/src/world_entities/world_entity.cc

    r9168 r9186  
    414414bool WorldEntity::registerCollision(WorldEntity* entityA, WorldEntity* entityB, BoundingVolume* bvA, BoundingVolume* bvB)
    415415{
     416  PRINTF(5)("registering collision of type: %s vs %s\n", entityA->getClassName(), entityB->getClassName());
    416417  // is there any handler listening?
    417418  if( !this->bReactive)
Note: See TracChangeset for help on using the changeset viewer.