Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6728 in orxonox.OLD


Ignore:
Timestamp:
Jan 25, 2006, 6:02:36 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: now Weapons get Loaded on pickup

Location:
trunk/src/world_entities/weapons
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/world_entities/weapons/weapon.cc

    r6700 r6728  
    126126}
    127127
     128
    128129/**
    129130 * sets the Projectile to use for this weapon.
     
    156157}
    157158
     159
    158160/**
    159161 * @see bool Weapon::setProjectile(ClassID projectile)
     
    175177}
    176178
     179
    177180/**
    178181 * prepares Projectiles of the Weapon
     
    186189    PRINTF(2)("unable to create %d projectile for Weapon %s (%s)\n", count, this->getName(), this->getClassName());
    187190}
     191
    188192
    189193/**
     
    218222  this->emissionPoint.setRelCoor(point);
    219223}
     224
    220225
    221226/**
     
    247252}
    248253
     254
    249255/**
    250256 * creates/returns an Animation3D for a certain State.
     
    325331}
    326332
     333
    327334/**
    328335 * adds energy to the Weapon
     
    345352  }
    346353}
     354
    347355
    348356////////////////////////////////////////////////////////////
     
    519527    this->animation[state]->replay();
    520528
    521   this->stateDuration = this->times[state] + this->stateDuration;
     529  this->stateDuration += this->times[state];
    522530  this->currentState = state;
    523531}
  • trunk/src/world_entities/weapons/weapon_manager.cc

    r6714 r6728  
    272272    this->parent->addChild(weapon);
    273273  }
     274  if(configID == this->currentConfigID)
     275    this->currentSlotConfig[slotID].nextWeapon = weapon;
    274276  PRINTF(3)("Added a new Weapon (%s::%s) to the WeaponManager: config %i/ slot %i\n", weapon->getClassName(), weapon->getName(), configID, slotID);
    275277  return true;
Note: See TracChangeset for help on using the changeset viewer.