Exemplo n.º 1
0
void LightningData::unpackData(BitStream* stream)
{
   Parent::unpackData(stream);

   U32 i;
   for (i = 0; i < MaxThunders; i++)
      sfxRead( stream, &thunderSounds[ i ] );
   for (i = 0; i < MaxTextures; i++) {
      strikeTextureNames[i] = stream->readSTString();
   }

   sfxRead( stream, &strikeSound );
}
Exemplo n.º 2
0
void ProximityMineData::unpackData( BitStream* stream )
{
   Parent::unpackData(stream);

   stream->read( &armingDelay );
   sfxRead( stream, &armingSound );

   stream->read( &autoTriggerDelay );
   triggerOnOwner = stream->readFlag();
   stream->read( &triggerRadius );
   stream->read( &triggerSpeed );
   stream->read( &triggerDelay );
   sfxRead( stream, &triggerSound );
}
Exemplo n.º 3
0
void ProjectileData::unpackData(BitStream* stream)
{
   Parent::unpackData(stream);

   projectileShapeName = stream->readSTString();

   faceViewer = stream->readFlag();
   if(stream->readFlag())
   {
      stream->read(&scale.x);
      stream->read(&scale.y);
      stream->read(&scale.z);
   }
   else
      scale.set(1,1,1);

   if (stream->readFlag())
      particleEmitterId = stream->readRangedU32(DataBlockObjectIdFirst, DataBlockObjectIdLast);

   if (stream->readFlag())
      particleWaterEmitterId = stream->readRangedU32(DataBlockObjectIdFirst, DataBlockObjectIdLast);

   if (stream->readFlag())
      explosionId = stream->readRangedU32(DataBlockObjectIdFirst, DataBlockObjectIdLast);

   if (stream->readFlag())
      waterExplosionId = stream->readRangedU32(DataBlockObjectIdFirst, DataBlockObjectIdLast);
   
   if (stream->readFlag())
      splashId = stream->readRangedU32(DataBlockObjectIdFirst, DataBlockObjectIdLast);

   if (stream->readFlag())
      decalId = stream->readRangedU32(DataBlockObjectIdFirst, DataBlockObjectIdLast);
   
   sfxRead( stream, &sound );

   if (stream->readFlag())
      lightDescId = stream->readRangedU32(DataBlockObjectIdFirst, DataBlockObjectIdLast);
   
   // [tom, 3/21/2007] See comment in packData()
//    lifetime = stream->readRangedU32(0, Projectile::MaxLivingTicks);
//    armingDelay = stream->readRangedU32(0, Projectile::MaxLivingTicks);
//    fadeDelay = stream->readRangedU32(0, Projectile::MaxLivingTicks);

   stream->read(&impactForce);

   stream->read(&lifetime);
   stream->read(&armingDelay);
   stream->read(&fadeDelay);

   isBallistic = stream->readFlag();
   if(isBallistic)
   {
      stream->read(&gravityMod);
      stream->read(&bounceElasticity);
      stream->read(&bounceFriction);
   }
}
Exemplo n.º 4
0
void SFXTrack::unpackData( BitStream* stream )
{
   Parent::unpackData( stream );
   
   sfxRead( stream, &mDescription );

   for( U32 i = 0; i < MaxNumParameters; ++ i )
      if( stream->readFlag() )
         mParameters[ i ] = stream->readSTString();
      else
         mParameters[ i ] = NULL;
}
void SFXPlayList::unpackData( BitStream* stream )
{
   Parent::unpackData( stream );
   
   mRandomMode          = ( ERandomMode ) stream->readInt( NUM_RANDOM_MODE_BITS );
   mLoopMode            = ( ELoopMode ) stream->readInt( NUM_LOOP_MODE_BITS );
   mNumSlotsToPlay      = stream->readInt( NUM_SLOTS_TO_PLAY_BITS );
   
   FOR_EACH_SLOT mSlots.mReplayMode[ i ]     = ( EReplayMode ) stream->readInt( NUM_REPLAY_MODE_BITS );
   FOR_EACH_SLOT mSlots.mTransitionIn[ i ]   = ( ETransitionMode ) stream->readInt( NUM_TRANSITION_MODE_BITS );
   FOR_EACH_SLOT mSlots.mTransitionOut[ i ]  = ( ETransitionMode ) stream->readInt( NUM_TRANSITION_MODE_BITS );
   FOR_EACH_SLOT mSlots.mStateMode[ i ]      = ( EStateMode ) stream->readInt( NUM_STATE_MODE_BITS );
      
   FOR_EACH_SLOT stream->read( &mSlots.mFadeTimeIn.mValue[ i ] );
   FOR_EACH_SLOT stream->read( &mSlots.mFadeTimeIn.mVariance[ i ][ 0 ] );
   FOR_EACH_SLOT stream->read( &mSlots.mFadeTimeIn.mVariance[ i ][ 1 ] );
   FOR_EACH_SLOT stream->read( &mSlots.mFadeTimeOut.mValue[ i ] );
   FOR_EACH_SLOT stream->read( &mSlots.mFadeTimeOut.mVariance[ i ][ 0 ] );
   FOR_EACH_SLOT stream->read( &mSlots.mFadeTimeOut.mVariance[ i ][ 1 ] );
   FOR_EACH_SLOT stream->read( &mSlots.mDelayTimeIn.mValue[ i ] );
   FOR_EACH_SLOT stream->read( &mSlots.mDelayTimeIn.mVariance[ i ][ 0 ] );
   FOR_EACH_SLOT stream->read( &mSlots.mDelayTimeIn.mVariance[ i ][ 1 ] );
   FOR_EACH_SLOT stream->read( &mSlots.mDelayTimeOut.mValue[ i ] );
   FOR_EACH_SLOT stream->read( &mSlots.mDelayTimeOut.mVariance[ i ][ 0 ] );
   FOR_EACH_SLOT stream->read( &mSlots.mDelayTimeOut.mVariance[ i ][ 1 ] );
   FOR_EACH_SLOT stream->read( &mSlots.mVolumeScale.mValue[ i ] );
   FOR_EACH_SLOT stream->read( &mSlots.mVolumeScale.mVariance[ i ][ 0 ] );
   FOR_EACH_SLOT stream->read( &mSlots.mVolumeScale.mVariance[ i ][ 1 ] );
   FOR_EACH_SLOT stream->read( &mSlots.mPitchScale.mValue[ i ] );
   FOR_EACH_SLOT stream->read( &mSlots.mPitchScale.mVariance[ i ][ 0 ] );
   FOR_EACH_SLOT stream->read( &mSlots.mPitchScale.mVariance[ i ][ 1 ] );
   FOR_EACH_SLOT stream->read( &mSlots.mRepeatCount[ i ] );
      
   FOR_EACH_SLOT sfxRead( stream, &mSlots.mState[ i ] );
   FOR_EACH_SLOT sfxRead( stream, &mSlots.mTrack[ i ] );
   
   #undef FOR_EACH_SLOT
}