void CAICentralKnowledgeRecord::Save(ILTMessage_Write *pMsg) { SAVE_DWORD( m_eKnowledgeType ); SAVE_COBJECT( m_pAI ); SAVE_COBJECT( m_pKnowledgeTarget ); SAVE_BOOL( m_bLinkKnowledge ); SAVE_BOOL( m_bKnowledgeDataIsTime ); if( m_bKnowledgeDataIsTime ) { SAVE_TIME( m_fKnowledgeData ); } else { SAVE_FLOAT( m_fKnowledgeData ); } }
void CAIMovement::Save(ILTMessage_Write *pMsg) { m_stackAnimations.Save(pMsg, FnSaveAnimationProp); SAVE_DWORD(m_eState); SAVE_BOOL(m_bUnderwater); SAVE_VECTOR(m_vDest); SAVE_COBJECT(m_pDestVolume); SAVE_VECTOR(m_vLastValidVolumePos); SAVE_BOOL(m_bClimbing); SAVE_BOOL(m_bFaceDest); SAVE_FLOAT(m_fSetSpeed); SAVE_BOOL(m_bIgnoreVolumes); SAVE_DWORD(m_eLastMovementType); SAVE_FLOAT(m_fAnimRate); SAVE_BOOL(m_bMovementLocked); SAVE_BOOL(m_bRotationLocked); SAVE_BOOL(m_bNoDynamicPathfinding); SAVE_BOOL(m_bMoved); SAVE_BOOL(m_bNewPathSet); SAVE_VECTOR(m_vBoundPts[0]); SAVE_VECTOR(m_vBoundPts[1]); SAVE_VECTOR(m_vBoundPts[2]); SAVE_DWORD(m_cBoundPts); SAVE_DWORD(m_iBoundPt); SAVE_BOOL(m_bDoParabola); SAVE_VECTOR(m_vParabolaOrigin); SAVE_FLOAT(m_fParabolaPeakDist); SAVE_FLOAT(m_fParabolaPeakHeight); SAVE_FLOAT(m_fParabola_a); SAVE_BOOL(m_bParabolaPeaked); }
void CAISensorAbstract::Save(ILTMessage_Write *pMsg) { SAVE_INT(m_eSensorType); SAVE_DOUBLE(m_fNextSensorUpdateTime); SAVE_INT(m_cSensorRefCount); SAVE_COBJECT(m_pAI); // Don't save, manually restore: // m_pSensorTemplate }
void CAIPathKnowledgeMgr::Save(ILTMessage_Write *pMsg) { AIPATH_KNOWLEDGE_MAP::iterator it; SAVE_DWORD( m_mapPathKnowledge.size() ); for( it = m_mapPathKnowledge.begin(); it != m_mapPathKnowledge.end(); ++it ) { SAVE_COBJECT( it->first ); SAVE_DWORD( it->second ); } SAVE_DWORD( m_nPathKnowledgeIndex ); }
void AIRegion::Save(ILTMessage_Write *pMsg) { SAVE_HSTRING(m_hstrName); SAVE_DWORD(m_cSearchNodes); SAVE_DWORD(m_cSearchers); SAVE_DWORD(m_cPostSearchMsgs); SAVE_DWORD(m_lstVolumes.size()); AIVolume* pVolume; AIREGION_VOLUME_LIST::iterator it; for ( it = m_lstVolumes.begin() ; it != m_lstVolumes.end() ; ++it ) { pVolume = *it; SAVE_COBJECT(pVolume); } for ( uint32 iNode = 0 ; iNode < kMaxSearchNodes ; iNode++ ) { SAVE_COBJECT(m_apSearchNodes[iNode]); } for ( uint32 iPostSearchMsg = 0 ; iPostSearchMsg < kMaxPostSearchMsgs ; iPostSearchMsg++ ) { SAVE_HSTRING(m_ahstrPostSearchMsgs[iPostSearchMsg]); } SAVE_VECTOR(m_vExtentsMin); SAVE_VECTOR(m_vExtentsMax); // Permission sets pMsg->Writeuint8(m_bPSets[0]); pMsg->Writeuint8(m_bPSets[1]); pMsg->Writeuint8(m_bPSets[2]); pMsg->Writeuint8(m_bPSets[3]); pMsg->Writeuint8(m_bPSets[4]); pMsg->Writeuint8(m_bPSets[5]); pMsg->Writeuint8(m_bPSets[6]); pMsg->Writeuint8(m_bPSets[7]); }
//---------------------------------------------------------------------------- // // ROUTINE: CAIPlan::Save/Load // // PURPOSE: Handle saving and restoring the CAIPlan // //---------------------------------------------------------------------------- void CAIPlan::Save(ILTMessage_Write *pMsg) { int nSteps = m_lstAIPlanSteps.size(); SAVE_INT(nSteps); for (int i = 0; i < nSteps; ++i) { m_lstAIPlanSteps[i]->wsWorldState.Save(pMsg); SAVE_INT(m_lstAIPlanSteps[i]->eAIAction); } SAVE_INT(m_iPlanStep); SAVE_COBJECT(m_pAI); SAVE_TIME(m_fPlanActivationTime); }
void CAIGoalMgr::Save(ILTMessage_Write *pMsg) { SAVE_COBJECT(m_pAI); SAVE_INT(m_lstGoals.size()); for (std::size_t i = 0; i < m_lstGoals.size(); ++i) { SAVE_INT(m_lstGoals[i]->GetGoalClassType()); m_lstGoals[i]->Save(pMsg); } SAVE_INT(m_pCurGoal ? m_pCurGoal->GetGoalType() : kGoal_InvalidType); std::string strGoalSet; strGoalSet = g_pAIDB->GetAIGoalSetRecordName( (ENUM_AIGoalSetID)m_iGoalSet ); SAVE_STDSTRING( strGoalSet ); SAVE_DOUBLE(m_fGoalSetTime); }
void AISpatialNeighbor::Save(ILTMessage_Write *pMsg) { SAVE_COBJECT(m_pVolume); SAVE_VECTOR(m_vConnectionPos); SAVE_VECTOR(m_avConnectionEndpoints[0]); SAVE_VECTOR(m_avConnectionEndpoints[1]); SAVE_VECTOR(m_vConnectionMidpoint); SAVE_VECTOR(m_vConnectionPerpDir); SAVE_VECTOR(m_vConnectionDir); SAVE_FLOAT(m_fConnectionLength); SAVE_DWORD(m_cGates); for ( uint32 iGate = 0 ; iGate < m_cGates ; iGate++ ) { SAVE_FLOAT(m_vecfGateOccupancy[iGate]); } SAVE_DWORD(m_eVolumeConnectionType); SAVE_DWORD(m_eVolumeConnectionLocation); }
//---------------------------------------------------------------------------- // // ROUTINE: CAISensorMgr::Save/Load // // PURPOSE: Handle saving and restoring the CAISensorMgr and all of its // sensors. // //---------------------------------------------------------------------------- void CAISensorMgr::Save(ILTMessage_Write *pMsg) { SAVE_COBJECT(m_pAI); SAVE_INT(m_lstAISensors.size()); {for (std::size_t n = 0; n < m_lstAISensors.size(); ++n) { SAVE_INT(m_lstAISensors[n]->GetSensorClassType()); m_lstAISensors[n]->Save(pMsg); }} SAVE_bool(m_bSensorDeleted); SAVE_INT(m_iSensorToUpdate); SAVE_bool(m_bDoneProcessingStimuli); SAVE_TIME( m_fStimulusListNewIterationTime ); SAVE_INT(m_lstProcessedStimuli.size()); {for (std::size_t n = 0; n < m_lstProcessedStimuli.size(); ++n) { SAVE_INT(m_lstProcessedStimuli.size()); }} SAVE_INT(m_cIntersectSegmentCount); }