void CAISensorMgr::Load(ILTMessage_Read *pMsg) { LOAD_COBJECT(m_pAI, CAI); int nSensorCount = 0; LOAD_INT(nSensorCount); {for (int n = 0; n < nSensorCount; ++n) { EnumAISensorType eSensor; LOAD_INT_CAST(eSensor, EnumAISensorType); CAISensorAbstract* pSensor = AI_FACTORY_NEW_Sensor( eSensor ); pSensor->Load(pMsg); m_lstAISensors.push_back(pSensor); }} LOAD_bool(m_bSensorDeleted); LOAD_INT(m_iSensorToUpdate); LOAD_bool(m_bDoneProcessingStimuli); LOAD_TIME( m_fStimulusListNewIterationTime ); int nProcessedStimuli = 0; LOAD_INT(nProcessedStimuli); {for (int n = 0; n < nProcessedStimuli; ++n) { EnumAIStimulusID eStimulusID; LOAD_INT_CAST(eStimulusID, EnumAIStimulusID); m_lstProcessedStimuli.push_back(eStimulusID); }} LOAD_INT(m_cIntersectSegmentCount); }
void CAIGoalMgr::Load(ILTMessage_Read *pMsg) { LOAD_COBJECT(m_pAI, CAI); int nGoals = 0; LOAD_INT(nGoals); for (int i = 0; i < nGoals; ++i) { EnumAIGoalType eGoalClass; LOAD_INT_CAST(eGoalClass, EnumAIGoalType); CAIGoalAbstract* pGoal = AI_FACTORY_NEW_Goal(eGoalClass); pGoal->Load(pMsg); m_lstGoals.push_back(pGoal); } EnumAIGoalType eCurrentGoalType; LOAD_INT_CAST(eCurrentGoalType, EnumAIGoalType); m_pCurGoal = FindGoalByType(eCurrentGoalType); std::string strGoalSet; LOAD_STDSTRING( strGoalSet ); m_iGoalSet = g_pAIDB->GetAIGoalSetRecordID( strGoalSet.c_str() ); LOAD_DOUBLE(m_fGoalSetTime); }
void CAICentralKnowledgeRecord::Load(ILTMessage_Read *pMsg) { LOAD_DWORD_CAST( m_eKnowledgeType, EnumAICentralKnowledgeType ); LOAD_COBJECT( m_pAI, ILTBaseClass ); m_hAI = (m_pAI) ? m_pAI->m_hObject : LTNULL; LOAD_COBJECT( m_pKnowledgeTarget, ILTBaseClass ); m_hKnowledgeTarget= (m_pKnowledgeTarget) ? m_pKnowledgeTarget->m_hObject : LTNULL; LOAD_BOOL( m_bLinkKnowledge ); LOAD_BOOL( m_bKnowledgeDataIsTime ); if( m_bKnowledgeDataIsTime ) { LOAD_TIME( m_fKnowledgeData ); } else { LOAD_FLOAT( m_fKnowledgeData ); } }
void CAISensorAbstract::Load(ILTMessage_Read *pMsg) { LOAD_INT_CAST(m_eSensorType, EnumAISensorType); LOAD_DOUBLE(m_fNextSensorUpdateTime); LOAD_INT(m_cSensorRefCount); LOAD_COBJECT(m_pAI, CAI); m_pSensorRecord = g_pAIDB->GetAISensorRecord( m_eSensorType ); }
void AIRegion::Load(ILTMessage_Read *pMsg) { LOAD_HSTRING(m_hstrName); LOAD_DWORD(m_cSearchNodes); LOAD_DWORD(m_cSearchers); LOAD_DWORD(m_cPostSearchMsgs); uint32 cVolumes; LOAD_DWORD(cVolumes); m_lstVolumes.resize(cVolumes); for ( uint32 iVolume=0; iVolume < cVolumes ; ++iVolume ) { LOAD_COBJECT( m_lstVolumes[iVolume], AIVolume ); } for ( uint32 iNode = 0 ; iNode < kMaxSearchNodes ; iNode++ ) { LOAD_COBJECT(m_apSearchNodes[iNode], AINodeSearch); } for ( uint32 iPostSearchMsg = 0 ; iPostSearchMsg < kMaxPostSearchMsgs ; iPostSearchMsg++ ) { LOAD_HSTRING(m_ahstrPostSearchMsgs[iPostSearchMsg]); } LOAD_VECTOR(m_vExtentsMin); LOAD_VECTOR(m_vExtentsMax); // Permission sets m_bPSets[0] = pMsg->Readuint8(); m_bPSets[1] = pMsg->Readuint8(); m_bPSets[2] = pMsg->Readuint8(); m_bPSets[3] = pMsg->Readuint8(); m_bPSets[4] = pMsg->Readuint8(); m_bPSets[5] = pMsg->Readuint8(); m_bPSets[6] = pMsg->Readuint8(); m_bPSets[7] = pMsg->Readuint8(); }
void CAIPlan::Load(ILTMessage_Read *pMsg) { int nSteps = 0; LOAD_INT(nSteps); m_lstAIPlanSteps.reserve(nSteps); for (int i = 0; i < nSteps; ++i) { CAIPlanStep* pPlanStep = AI_FACTORY_NEW( CAIPlanStep ); pPlanStep->wsWorldState.Load(pMsg); LOAD_INT_CAST(pPlanStep->eAIAction, EnumAIActionType); m_lstAIPlanSteps.push_back(pPlanStep); } LOAD_INT(m_iPlanStep); LOAD_COBJECT(m_pAI, CAI); LOAD_TIME(m_fPlanActivationTime); }
void CAIMovement::Load(ILTMessage_Read *pMsg) { m_stackAnimations.Load(pMsg, FnLoadAnimationProp); LOAD_DWORD_CAST(m_eState, State); LOAD_BOOL(m_bUnderwater); LOAD_VECTOR(m_vDest); LOAD_COBJECT(m_pDestVolume, AIVolume); LOAD_VECTOR(m_vLastValidVolumePos); LOAD_BOOL(m_bClimbing); LOAD_BOOL(m_bFaceDest); LOAD_FLOAT(m_fSetSpeed); LOAD_BOOL(m_bIgnoreVolumes); LOAD_DWORD_CAST(m_eLastMovementType, EnumAnimMovement); LOAD_FLOAT(m_fAnimRate); LOAD_BOOL(m_bMovementLocked); LOAD_BOOL(m_bRotationLocked); LOAD_BOOL(m_bNoDynamicPathfinding); LOAD_BOOL(m_bMoved); LOAD_BOOL(m_bNewPathSet); LOAD_VECTOR(m_vBoundPts[0]); LOAD_VECTOR(m_vBoundPts[1]); LOAD_VECTOR(m_vBoundPts[2]); LOAD_DWORD(m_cBoundPts); LOAD_DWORD(m_iBoundPt); LOAD_BOOL(m_bDoParabola); LOAD_VECTOR(m_vParabolaOrigin); LOAD_FLOAT(m_fParabolaPeakDist); LOAD_FLOAT(m_fParabolaPeakHeight); LOAD_FLOAT(m_fParabola_a); LOAD_BOOL(m_bParabolaPeaked); // If we're loading from a transition, then our positional information is invalid. if( g_pGameServerShell->GetLGFlags( ) == LOAD_TRANSITION ) { m_bMovementLocked = LTFALSE; m_bRotationLocked = LTFALSE; m_bMoved = LTFALSE; Clear( ); } }
void CAIPathKnowledgeMgr::Load(ILTMessage_Read *pMsg) { uint32 cKnowledge; LOAD_DWORD(cKnowledge); AIVolume *pVolume; CAIPathMgr::EnumPathBuildStatus eStatus; for( uint32 iKnowledge=0; iKnowledge < cKnowledge; ++iKnowledge ) { LOAD_COBJECT( pVolume, AIVolume ); LOAD_DWORD_CAST( eStatus, CAIPathMgr::EnumPathBuildStatus ); m_mapPathKnowledge.insert( AIPATH_KNOWLEDGE_MAP::value_type( pVolume, eStatus ) ); } LOAD_DWORD( m_nPathKnowledgeIndex ); }
void AISpatialNeighbor::Load(ILTMessage_Read *pMsg) { LOAD_COBJECT(m_pVolume, AISpatialRepresentation); LOAD_VECTOR(m_vConnectionPos); LOAD_VECTOR(m_avConnectionEndpoints[0]); LOAD_VECTOR(m_avConnectionEndpoints[1]); LOAD_VECTOR(m_vConnectionMidpoint); LOAD_VECTOR(m_vConnectionPerpDir); LOAD_VECTOR(m_vConnectionDir); LOAD_FLOAT(m_fConnectionLength); LOAD_DWORD(m_cGates); m_vecfGateOccupancy.resize(m_cGates); for ( uint32 iGate = 0 ; iGate < m_cGates ; iGate++ ) { LOAD_FLOAT(m_vecfGateOccupancy[iGate]); } LOAD_DWORD_CAST(m_eVolumeConnectionType, VolumeConnectionType); LOAD_DWORD_CAST(m_eVolumeConnectionLocation, VolumeConnectionLocation); }