Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jan 10, 2007, 5:33:19 PM (18 years ago)
Author:
nicolasc
Message:

bump

Location:
branches/playability/src/world_entities/weapons
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/playability/src/world_entities/weapons/spike_launcher.cc

    r10217 r10224  
    219219  float x, y, z;
    220220  for (int i = 0; i < this->spikes;i++){
    221 
     221    printf("%i ", i);
    222222    x = m[0][0] * this->launcher[i].x + m[0][1] * this->launcher[i].y + m[0][2] * this->launcher[i].z;
    223223    y = m[1][0] * this->launcher[i].x + m[1][1] * this->launcher[i].y + m[1][2] * this->launcher[i].z;
     
    229229    this->launcher[i] = Vector (x, y, z);
    230230  }
     231  printf("\n");
    231232
    232233  for( int i = 0; i < 3 ; i++)
     
    241242  updateFireDir(VECTOR_RAND(1), 20);
    242243
    243   printf("fireing spikes\n");
     244  printf("firing spikes\n");
    244245  Projectile* pj = NULL;
    245246  for (int i = 0; i < this->spikes; i++)
     
    250251
    251252//     pj->setVelocity(this->getVelocity()+(this->getAbsDir().apply(Vector(1,0,0))*115.0 + VECTOR_RAND(10)));
    252     pj->setVelocity(this->launcher[i] * 300.0);
     253    pj->setVelocity(this->launcher[i].getNormalized() * 300.0);
    253254
    254255    pj->setParent(PNode::getNullParent());
    255256    pj->setAbsCoor(this->getAbsCoor() + this->launcher[i] * this->size);
    256 //     Quaternion q;
    257 //     pj->setRelDir(q.lookAt(Vector(), this->launcher[i], VECTOR_RAND(1)));
    258     pj->setRelDir(90, this->launcher[i].x, this->launcher[i].y, this->launcher[i].z);
    259 
    260     pj->toList(this->getOMListNumber());
     257    Quaternion q;
     258    pj->setRelDir(q.lookAt(Vector(), this->launcher[i], VECTOR_RAND(1)));
     259//     pj->setRelDir(90, this->launcher[i].x, this->launcher[i].y, this->launcher[i].z);
     260
     261/*    pj->toList(this->getOMListNumber());*/
    261262    pj->activate();
    262263  }
  • branches/playability/src/world_entities/weapons/spike_thrower.cc

    r10196 r10224  
    157157  pj->setVelocity(this->getAbsDir().apply(Vector(1,0,0))*150);
    158158  pj->setAbsCoor(this->getEmissionPoint());
     159  pj->toList(this->getOMListNumber());
    159160
    160161  pj->setAbsDir(this->getAbsDir());
  • branches/playability/src/world_entities/weapons/weapon_manager.cc

    r10132 r10224  
    431431void WeaponManager::fire()
    432432{
     433  printf("firing WM: ");
    433434  Weapon* firingWeapon;
    434435  for(int i = 0; i < this->slotCount; i++)
    435436  {
     437    printf("%i ", i);
    436438          firingWeapon = this->currentSlotConfig[i].currentWeapon;
    437439      if( firingWeapon != NULL && firingWeapon->getCurrentState() == WS_SHOOTING) continue;
    438440          if( firingWeapon != NULL) firingWeapon->requestAction(WA_SHOOT);
    439441  }
    440 
     442  printf("\n");
    441443  /*
    442444        this->crosshair->setRotationSpeed(500);
Note: See TracChangeset for help on using the changeset viewer.