当前位置: 首页>>代码示例>>C++>>正文


C++ TSerialize::GetSerializationTarget方法代码示例

本文整理汇总了C++中TSerialize::GetSerializationTarget方法的典型用法代码示例。如果您正苦于以下问题:C++ TSerialize::GetSerializationTarget方法的具体用法?C++ TSerialize::GetSerializationTarget怎么用?C++ TSerialize::GetSerializationTarget使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在TSerialize的用法示例。


在下文中一共展示了TSerialize::GetSerializationTarget方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: Serialize

//------------------------------------------------------------------------
void CVehicleMovementHelicopter::Serialize(TSerialize ser, EEntityAspects aspects)
{
	CVehicleMovementBase::Serialize(ser, aspects);

	if((ser.GetSerializationTarget() == eST_Network) &&(aspects & eEA_GameClientDynamic))
	{
		m_netActionSync.Serialize(ser, aspects);
	}
	else if(ser.GetSerializationTarget() != eST_Network)
	{
		ser.Value("enginePower", m_enginePower);
		ser.Value("timeOnTheGround", m_timeOnTheGround);
		ser.Value("lastDir", m_lastDir);
		ser.Value("desiredHeight", m_desiredHeight);
		ser.Value("vehicleVolume",m_vehicleVolume);
		ser.Value("turbulence", m_turbulence);

		ser.Value("steeringDamage",m_steeringDamage);
		ser.Value("noHoveringTimer",m_noHoveringTimer);
		ser.Value("relaxTimer",m_relaxTimer);
		ser.Value("desiredRoll",m_desiredRoll);
		ser.Value("desiredPitch",m_desiredPitch);

		if(ser.IsReading())
			m_isTouchingGround = m_timeOnTheGround > 0.0f;
	}
};
开发者ID:Hellraiser666,项目名称:CryGame,代码行数:28,代码来源:VehicleMovementHelicopter.cpp

示例2: FullSerialize

//------------------------------------------------------------------------
void CProjectile::FullSerialize(TSerialize ser)
{
	assert(ser.GetSerializationTarget() != eST_Network);

	ser.Value("Remote", m_remote);
	// m_tracerpath should be serialized but the template-template stuff doesn't work under VS2005
	ser.Value("Owner", m_ownerId, 'eid');
	ser.Value("Weapon", m_weaponId, 'eid');
	ser.Value("TrailEffect", m_trailEffectId);
	ser.Value("TrailSound", m_trailSoundId);
	ser.Value("WhizSound", m_whizSoundId);
	ser.Value("Damage", m_damage);
	ser.Value("Destroying", m_destroying);
	ser.Value("LastPos", m_last);
	ser.Value("InitialPos", m_initial_pos);
	ser.Value("ScaledEffectSignaled", m_scaledEffectSignaled);
	ser.Value("HitListener", m_hitListener);
	ser.Value("HitPoints", m_hitPoints);

	bool wasVisible = false;
	if(ser.IsWriting())
		wasVisible = (GetEntity()->GetSlotFlags(0)&(ENTITY_SLOT_RENDER))?true:false;
	ser.Value("Visibility", wasVisible);
	if(ser.IsReading())
	{
		if(wasVisible)
			GetEntity()->SetSlotFlags(0, GetEntity()->GetSlotFlags(0)|ENTITY_SLOT_RENDER);
		else
			GetEntity()->SetSlotFlags(0, GetEntity()->GetSlotFlags(0)&(~ENTITY_SLOT_RENDER));
		InitWithAI();
	}
}
开发者ID:mrwonko,项目名称:CrysisVR,代码行数:33,代码来源:Projectile.cpp

示例3: Serialize

//------------------------------------------------------------------------
void CVehicleDamageBehaviorExplosion::Serialize(TSerialize ser, EEntityAspects aspects)
{
  if (ser.GetSerializationTarget() != eST_Network)
  {
    ser.Value("exploded", m_exploded);
  }
}
开发者ID:AiYong,项目名称:CryGame,代码行数:8,代码来源:VehicleDamageBehaviorExplosion.cpp

示例4: Serialize

void CVehicleMovementMPVTOL::Serialize(TSerialize ser, EEntityAspects aspects)
{
    CVTOLVehicleManager* pVTOLManager = g_pGame->GetGameRules()->GetVTOLVehicleManager();

    if(pVTOLManager && ser.GetSerializationTarget()==eST_Network)
    {
        // Don't call CVehicleMovementHelicopter::Serialize();
        CVehicleMovementBase::Serialize(ser, aspects);
        if( (aspects&k_vtolPathUpdate)!=0 )
        {
            SVTOLPathPosParams data(m_pathing.pathingData);

            // Serialize.
            data.Serialize(ser);

            // Apply results.
            if(ser.IsReading() && !gEnv->bServer)
            {
                ReceivedServerPathingData(data);
            }
        }
    }
    else
    {
        BaseClass::Serialize(ser, aspects);
    }

}
开发者ID:Kufusonic,项目名称:Work-in-Progress-Sonic-Fangame,代码行数:28,代码来源:VehicleMovementMPVTOL.cpp

示例5: Serialize

void SGrabStats::Serialize(TSerialize ser)
{
	assert(ser.GetSerializationTarget() != eST_Network);

	if(ser.BeginOptionalGroup("SGrabStats", true))
	{
		//when reading, reset the structure first.
		if(ser.IsReading())
			Reset();

		ser.Value("grabId", grabId);
		ser.Value("dropId", dropId);
		ser.Value("lHoldPos", lHoldPos);
		ser.Value("throwVector", throwVector);
		ser.Value("additionalRotation", additionalRotation);

		ser.Value("limbNum", limbNum);

		for(int i=0; i < limbNum; ++i)
		{
			char limbName[64];
			_snprintf(limbName, 64, "limbId%d", i);

			ser.Value(limbName, limbId[i]);
		}

		ser.Value("resetFlagsDelay", resetFlagsDelay);
		ser.Value("grabDelay", grabDelay);
		ser.Value("throwDelay", throwDelay);
		ser.Value("maxDelay", maxDelay);
		ser.Value("followSpeed", followSpeed);
		ser.Value("useIKRotation", useIKRotation);
		ser.Value("collisionFlags", collisionFlags);
		ser.Value("usingAnimation", usingAnimation);
		ser.Value("usingAnimationForGrab", usingAnimationForGrab);
		ser.Value("usingAnimationForDrop", usingAnimationForDrop);
		ser.ValueChar("carryAnimGraphInput", (char *)carryAnimGraphInput, s_maxAGInputNameLen);
		ser.ValueChar("grabAnimGraphSignal", (char *)grabAnimGraphSignal, s_maxAGInputNameLen);
		ser.ValueChar("dropAnimGraphSignal", (char *)dropAnimGraphSignal, s_maxAGInputNameLen);

		ser.Value("IKActive", IKActive);
		ser.Value("releaseIKTime", releaseIKTime);
		ser.Value("followBoneID", followBoneID);
		ser.Value("followBoneWPos", followBoneWPos);
		ser.Value("grabbedObjOfs", grabbedObjOfs);

		ser.Value("readIkInaccuracyCorrection", readIkInaccuracyCorrection);
		ser.Value("ikInaccuracyCorrection", ikInaccuracyCorrection);

		ser.Value("origRotation", origRotation);
		ser.Value("origEndBoneWorldRotTrans", origEndBoneWorldRot.t);
		ser.Value("origEndBoneWorldRotQuat", origEndBoneWorldRot.q);
		ser.Value("origRotationsValid", origRotationsValid);

		ser.Value("entityGrabSpot", entityGrabSpot);
		ser.Value("boneGrabOffset", boneGrabOffset);

		ser.EndGroup();
	}
}
开发者ID:super-nova,项目名称:NovaRepo,代码行数:60,代码来源:GrabHandler.cpp

示例6: Serialize

//------------------------------------------------------------------------
void CPlant::Serialize(TSerialize ser)
{
	if (ser.GetSerializationTarget()!=eST_Network)
	{
		ser.Value("projectiles", m_projectiles);
	}
}
开发者ID:Xydrel,项目名称:Infected,代码行数:8,代码来源:Plant.cpp

示例7: Serialize

//------------------------------------------------------------------------
void CVehicleDamageBehaviorDetachPart::Serialize(TSerialize ser, EEntityAspects aspects)
{
	if (ser.GetSerializationTarget() != eST_Network)
	{
    EntityId detachedId = m_detachedEntityId;
		ser.Value("m_detachedEntityId", detachedId);
		
		if (ser.IsReading() && m_detachedEntityId != detachedId)
		{
      if (detachedId)
      {
        m_detachedEntityId = detachedId;
        
        if (IEntity* pDetachedEntity = gEnv->pEntitySystem->GetEntity(m_detachedEntityId))
        {
          if (CVehiclePartBase* pPart = (CVehiclePartBase*)m_pVehicle->GetPart(m_partName.c_str()))
            MovePartToTheNewEntity(pDetachedEntity, pPart);
        }        
      }		
      else
      {        
        Reset();                
      }
		}
	}
}
开发者ID:aronarts,项目名称:FireNET,代码行数:27,代码来源:VehicleDamageBehaviorDetachPart.cpp

示例8: Serialize

//------------------------------------------------------------------------
void CNetworkMovementStdBoat::Serialize(TSerialize ser, EEntityAspects aspects)
{
	if(ser.GetSerializationTarget()==eST_Network && aspects&CONTROLLED_ASPECT)
	{
		ser.Value("pedal", m_pedal, 'vPed');
		ser.Value("steer", m_steer, 'vStr');
		ser.Value("boost", m_boost, 'bool');
	}
}
开发者ID:Hellraiser666,项目名称:CryGame,代码行数:10,代码来源:VehicleMovementStdBoat.cpp

示例9:

void CVehicleMovementAmphibiousT<Wheeled>::Serialize(TSerialize ser, EEntityAspects aspects) 
{
	Wheeled::Serialize(ser, aspects);  

	if (ser.GetSerializationTarget() != eST_Network)
	{
		m_boat.Serialize(ser, aspects);
	}
}
开发者ID:Adi0927,项目名称:alecmercer-origins,代码行数:9,代码来源:VehicleMovementAmphibious.cpp

示例10: Serialize

//------------------------------------------------------------------------
void CVehicleViewSteer::Serialize(TSerialize serialize, EEntityAspects aspects)
{
	CVehicleViewBase::Serialize(serialize, aspects);

	if (serialize.GetSerializationTarget() != eST_Network)
	{
		serialize.Value("position", m_position);
	}
}
开发者ID:joewan,项目名称:pycmake,代码行数:10,代码来源:VehicleViewSteer.cpp

示例11: FullSerialize

//------------------------------------------------------------------------
void CFists::FullSerialize(TSerialize ser)
{
	CWeapon::FullSerialize(ser);

	if(ser.GetSerializationTarget() != eST_Network)
	{
		ser.Value("underWater", m_underWater);
		ser.Value("inFreeFall", m_inFreeFall);
		ser.Value("m_timeOut", m_timeOut);
	}
}
开发者ID:AiYong,项目名称:CryGame,代码行数:12,代码来源:Fists.cpp

示例12: Serialize

//------------------------------------------------------------------------
void CVehicleDamageBehaviorBlowTire::Serialize(TSerialize ser, EEntityAspects aspects)
{
  if (ser.GetSerializationTarget() != eST_Network)
  {
		bool bActive = m_isActive;

    ser.Value("isActive", bActive);
    ser.Value("component", m_component);
   		
		if (ser.IsReading())	
			Activate(bActive);    		
  }
}
开发者ID:danielasun,项目名称:dbho-GameSDK,代码行数:14,代码来源:VehicleDamageBehaviorTire.cpp

示例13: Serialize

void CBaseGrabHandler::Serialize(TSerialize ser)
{
	assert(ser.GetSerializationTarget() != eST_Network);

	if (ser.BeginOptionalGroup("CBaseGrabHandler", true))
	{
		m_grabStats.Serialize(ser);

		// NOTE Apr 11, 2007: <pvl> for reading, m_pActor has already been taken
		// care of in the constructor.
		
		ser.EndGroup();
	}
}
开发者ID:AiYong,项目名称:CryGame,代码行数:14,代码来源:GrabHandler.cpp

示例14: Serialize

//------------------------------------------------------------------------
void CVehiclePartTread::Serialize(TSerialize ser, EEntityAspects aspects)
{
	float damageRatio = m_damageRatio;

	CVehiclePartBase::Serialize(ser, aspects);

	if(ser.GetSerializationTarget() != eST_Network)
	{	
		if (ser.IsReading())
		{
			if (damageRatio != m_damageRatio)
				SetDamageRatio(m_damageRatio);
		}
	}
}
开发者ID:amrhead,项目名称:eaascode,代码行数:16,代码来源:VehiclePartTread.cpp

示例15: Serialize

void CTriggerProxy::Serialize( TSerialize ser )
{
	if (ser.GetSerializationTarget() != eST_Network)
	{
		if (ser.BeginOptionalGroup("TriggerProxy",true))
		{
			ser.Value("BoxMin",m_aabb.min);
			ser.Value("BoxMax",m_aabb.max);
			ser.EndGroup();
		}
		
		if (ser.IsReading())
			OnMove();
	}
}
开发者ID:NightOwlsEntertainment,项目名称:PetBox_A_Journey_to_Conquer_Elementary_Algebra,代码行数:15,代码来源:TriggerProxy.cpp


注:本文中的TSerialize::GetSerializationTarget方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。