Exemplo n.º 1
0
void Controller::Load(ILTMessage_Read *pMsg)
{
	FadeState *pState;
    uint32 i;

	GameBaseLite::Load( pMsg );

	LOAD_BOOL(m_bFirstUpdate);

	LOAD_DWORD_CAST(m_State, CState);

	// Read FLICKER vars.
	LOAD_TIME(m_fNextFlickerTime);
	LOAD_FLOAT(m_fIntervalMin);
	LOAD_FLOAT(m_fIntervalMax);
	LOAD_DWORD(m_FlickerCounter);
	m_FlickerMsg[0] = 0;
	LOAD_CHARSTRING(m_FlickerMsg, sizeof(m_FlickerMsg));

	// Read FADE vars.
	LOAD_TIME(m_fStartTime);
	LOAD_FLOAT(m_fDuration);
	LOAD_DWORD_CAST(m_WaveType, WaveType);
	LOAD_DWORD_CAST(m_ParamType, ParamType);
	m_DestValue.Load(pMsg);

	for(i=0; i < MAX_CONTROLLER_TARGETS; i++)
	{
		pState = &m_Fades[i];

		pState->m_StartVal.Load(pMsg);
		LOAD_HOBJECT(pState->m_hTarget);
		LOAD_CHARSTRING( pState->m_ObjectName, ARRAY_LEN( pState->m_ObjectName ));
	}
}
Exemplo n.º 2
0
void CAIHumanStateAttackProne::Load(ILTMessage_Read *pMsg)
{
	super::Load(pMsg);

	m_pStrategyShoot->Load(pMsg);
	LOAD_TIME( m_fStayProneTime );
	LOAD_TIME( m_fLastFiredTime );
	LOAD_FLOAT( m_fHalfMinDistSqr );
}
Exemplo n.º 3
0
void AINavMeshLinkAbstract::Load(ILTMessage_Read *pMsg)
{
	LOAD_STDSTRING(m_strName);

	LOAD_INT_CAST(m_eNMLinkID, ENUM_NMLinkID);
	LOAD_INT_CAST(m_eNMPolyID, ENUM_NMPolyID);

	std::string strSmartObject;
	LOAD_STDSTRING( strSmartObject );
	m_nSmartObjectID = g_pAIDB->GetAISmartObjectRecordID( strSmartObject.c_str() );

	LOAD_bool(m_bLinkActive);
	LOAD_bool(m_bLinkEnabled);
	LOAD_bool(m_bTraversalTimedOut);
	LOAD_TIME(m_fNextTraversalTime);
	LOAD_TIME(m_fNextPreferredTime);
	LOAD_FLOAT(m_fPreferredDelay);
	LOAD_DWORD_CAST(m_eEnabledAwarenessMod, EnumAIAwarenessMod);
	LOAD_DWORD_CAST(m_eMinEnabledAwareness, EnumAIAwareness);
	LOAD_DWORD_CAST(m_eMaxEnabledAwareness, EnumAIAwareness);
	LOAD_DWORD_CAST(m_eMinActiveAwareness, EnumAIAwareness);
	LOAD_DWORD_CAST(m_eMaxActiveAwareness, EnumAIAwareness);

	// Don't load:
	// m_cLinkBounds
	// m_pvLinkBounds;

	LOAD_VECTOR(m_vLinkEdgeA0);
	LOAD_VECTOR(m_vLinkEdgeA1);
	LOAD_VECTOR(m_vMidPtLinkEdgeA);

	LOAD_VECTOR(m_vLinkEdgeB0);
	LOAD_VECTOR(m_vLinkEdgeB1);
	LOAD_VECTOR(m_vMidPtLinkEdgeB);

	LOAD_VECTOR(m_vLinkDirXZ);
	LOAD_FLOAT(m_fLinkDistXZ);

	LOAD_FLOAT(m_fEntryOffsetDistA);
	LOAD_FLOAT(m_fEntryOffsetDistB);

	LOAD_FLOAT(m_fExitOffsetDistA);
	LOAD_FLOAT(m_fExitOffsetDistB);

	LOAD_FLOAT(m_fFloorTop);
	LOAD_FLOAT(m_fFloorBottom);

	LOAD_HOBJECT(m_hReservingAI);

	if( g_pAINavMesh )
	{
		g_pAINavMesh->AddAINavMeshLink( this );
	}
}
Exemplo n.º 4
0
void CDeathScene::Load(ILTMessage_Read *pMsg)
{
    if ( !pMsg || !g_pLTServer ) return;

    LOAD_DWORD_CAST(m_eCharacterDeath, CharacterDeath);
	LOAD_HOBJECT(m_hSceneObject);
    LOAD_FLOAT(m_fNoiseVolume);
    LOAD_TIME(m_fNoiseTime);
    LOAD_TIME(m_fLastPainTime);
    LOAD_FLOAT(m_fLastPainVolume);
	LOAD_BOOL(m_bWasPlayer);

	m_pObjectRelationMgr->Load(pMsg);
}
//----------------------------------------------------------------------------
//              
//	ROUTINE:	CAIHumanStrategyShootStream::Load()
//              
//	PURPOSE:	
//              
//----------------------------------------------------------------------------
/*virtual*/ void CAIHumanStrategyShootStream::Load(ILTMessage_Read *pMsg)
{
	CAIHumanStrategyShoot::Load(pMsg);

	LOAD_BOOL(m_bFiringStream);
	LOAD_TIME(m_flStreamTime);
}
Exemplo n.º 6
0
void AISenseRecord::Load(ILTMessage_Read *pMsg)
{
	LOAD_DWORD_CAST(eSenseType, EnumAISenseType);

	EnumAIStimulusType eStimulus;
	LOAD_DWORD_CAST(eStimulus, EnumAIStimulusType);
	if(eStimulus != kStim_InvalidType)
	{
		pAIBM_Last_Stimulus = g_pAIButeMgr->GetStimulus(eStimulus);
	}

	LOAD_HOBJECT(hLastStimulusSource);
	LOAD_HOBJECT(hLastStimulusTarget);
	LOAD_DWORD_CAST(eLastTargetMatchID, EnumAITargetMatchID);
	LOAD_VECTOR(vLastStimulusPos);
	LOAD_VECTOR(vLastStimulusDir);
	LOAD_DWORD(nLastStimulusAlarmLevel);
	LOAD_DWORD_CAST(eLastStimulusID, EnumAIStimulusID);
	LOAD_FLOAT(fSenseDistance);
	LOAD_FLOAT(fSenseDistanceSqr);
	LOAD_FLOAT(fCurStimulation);
	LOAD_FLOAT(fMaxStimulation);
	LOAD_FLOAT(fReactionDelayTimer);
	LOAD_FLOAT(fReactionDelayTime);
	LOAD_TIME(fLastStimulationTime);
	LOAD_DWORD(nCycle);
	LOAD_BYTE(cFalseStimulation);
	LOAD_INT(ptSightGrid.x);
	LOAD_INT(ptSightGrid.y);
}
Exemplo n.º 7
0
void CAIWeaponAbstract::Load(ILTMessage_Read *pMsg)
{
	HOBJECT hOwner = NULL;
	HWEAPON hWeapon = NULL;

	LOAD_HOBJECT(hOwner);
	LOAD_HRECORD( hWeapon, g_pWeaponDB->GetWeaponsCategory() );
	LOAD_STDSTRING(m_szFireSocketName);
	LOAD_INT_CAST(m_eFiringState, ENUM_AIFiringState);
	LOAD_DWORD(m_iAnimRandomSeed);
	LOAD_TIME(m_fRandomSeedSelectionTime);
	LOAD_FLOAT(m_flWeaponContextInaccuracyScalar);
	LOAD_DWORD(m_hWeaponSocket);
	LOAD_bool(m_bCanDropWeapon);

	ASSERT(IsAI(hOwner));
	CAI* pAI = (CAI*)g_pLTServer->HandleToObject(hOwner);

	ASSERT(pAI->GetArsenal());
	if (pAI)
	{
		ASSERT(pAI->GetArsenal());
		if (CArsenal* pArsenal = pAI->GetArsenal())
		{
			m_pWeapon = pArsenal->GetWeapon(hWeapon);
		}
	}

	if( m_pWeapon )
	{
		m_pAIWeaponRecord = AIWeaponUtils::GetAIWeaponRecord( 
			m_pWeapon->GetWeaponRecord(), 
			pAI->GetAIBlackBoard()->GetBBAIWeaponOverrideSet() );
	}
}
Exemplo n.º 8
0
void CAIGoalFollowFootprint::Load(ILTMessage_Read *pMsg)
{
	super::Load(pMsg);

	LOAD_VECTOR(m_vStimulusPos);
	LOAD_TIME(m_fStimulationTime);
}
Exemplo n.º 9
0
void CAISensorStatusCheck::Load(ILTMessage_Read *pMsg)
{
	super::Load(pMsg);
	LOAD_TIME( m_fStatusCheckTime );
	LOAD_DWORD_CAST( m_eStimulusIDToCheck, EnumAIStimulusID );
	LOAD_HOBJECT( m_hAlly );
}
Exemplo n.º 10
0
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);
}
Exemplo n.º 11
0
//----------------------------------------------------------------------------
//              
//	ROUTINE:	CAIHumanStateResurrecting::Load()
//              
//	PURPOSE:	
//              
//----------------------------------------------------------------------------
/*virtual*/ void CAIHumanStateResurrecting::Load(ILTMessage_Read *pMsg)
{
	CAIHumanState::Load(pMsg);
	LOAD_TIME(m_fResurrectCompleteTime);
	LOAD_FLOAT(m_fResurrectCompleteDuration);
	LOAD_BOOL(m_bEntryCanDistruct);
}
Exemplo n.º 12
0
void CAIGoalAbstractStimulated::Load(ILTMessage_Read *pMsg)
{
	super::Load(pMsg);

	LOAD_DWORD_CAST(m_eSenseType, EnumAISenseType);
	LOAD_HOBJECT(m_hStimulusSource);
	LOAD_HOBJECT(m_hStimulusTarget);
	LOAD_TIME(m_fStimulusTime);
	LOAD_BYTE_CAST(m_eOnRelationChangeAction, RelationReactions);
}
Exemplo n.º 13
0
void CAIActivityAbstract::Load(ILTMessage_Read *pMsg)
{
	LOAD_INT_CAST(m_eActStatus, ENUM_AIACTIVITY_STATUS);

	LOAD_INT(m_nActivityPriority);

	LOAD_FLOAT(m_fActivityUpdateRate);
	LOAD_TIME(m_fNextActivityUpdateTime);
	LOAD_TIME(m_fActivityActivateTime);
	LOAD_TIME(m_fActivityTimeOut);
	LOAD_TIME(m_fActivityExpirationTime);

	LOAD_INT(m_cPotentialParticipants);
	for (int i = 0; i < MAX_PARTICIPANTS; ++i)
	{
		LOAD_HOBJECT(m_aPotentialParticipants[i]);
	}

	m_pSquad = 0;
}
Exemplo n.º 14
0
void SpinningWorldModel::OnLoad( ILTMessage_Read *pMsg, uint32 dwSaveFlags )
{
	if( !pMsg ) return;

	// Send to base class

	ActiveWorldModel::OnLoad( pMsg, dwSaveFlags );

	LOAD_VECTOR( m_vVelocity );
	LOAD_VECTOR( m_vFinalVelocity );
	LOAD_BYTE( m_bUpdateSpin );
	LOAD_TIME( m_fLastTime );
}
Exemplo n.º 15
0
void CAIGoalAbstractUseObject::Load(ILTMessage_Read *pMsg)
{
	super::Load(pMsg);

	LOAD_HOBJECT(m_hNodeUseObject);	
	LOAD_HOBJECT(m_hLastNodeUseObject);
	LOAD_TIME(m_fStimTime);
	LOAD_DWORD_CAST(m_eWeaponPosition, EnumAnimProp);
	LOAD_BOOL(m_bRequireBareHands);
	LOAD_BOOL(m_bAllowDialogue);
	LOAD_BOOL(m_bTurnOnLights);
	LOAD_BOOL(m_bTurnOffLights);
	LOAD_BOOL(m_bHolstered);
	LOAD_BOOL(m_bLockedNode);
	LOAD_BOOL(m_bPlayedSpecialDeathAnim);
}
Exemplo n.º 16
0
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);
}
Exemplo n.º 17
0
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 );
	}
}
Exemplo n.º 18
0
void PlayerVehicle::Load(ILTMessage_Read *pMsg)
{
	if (!pMsg) return;

	LOAD_VECTOR(m_vOriginalPos);
	LOAD_VECTOR(m_vOriginalDims);
	LOAD_ROTATION(m_rOriginalRot);
 	LOAD_FLOAT(m_fRespawnTime);
	LOAD_BYTE_CAST(m_ePPhysicsModel, PlayerPhysicsModel);
	LOAD_bool( m_bLocked );
	LOAD_bool( m_bRidden );
	LOAD_HSTRING( m_hstrLockedCommand );
	LOAD_DWORD(m_dwSavedFlags);
	LOAD_TIME( m_fLastRideTime );
	LOAD_bool( m_bVirgin );

	m_RespawnTimer.Load(pMsg);
}
Exemplo n.º 19
0
void Camera::Load(ILTMessage_Read *pMsg, uint32 dwLoadFlags)
{
	if (!pMsg) return;

	LOAD_INT		( sm_nActiveCamera );
	LOAD_bool		( m_bOn );
	LOAD_bool		( m_bIsListener );
	LOAD_bool		( m_bAllowPlayerMovement );
	LOAD_bool		( m_bOneTime );
	LOAD_BYTE		( m_nCameraType);
	LOAD_bool		( m_bStartActive );
	LOAD_FLOAT		( m_fActiveTime );
	LOAD_TIME		( m_fTurnOffTime );
	LOAD_bool		( m_bCanSkip );
	LOAD_bool		( m_bOnSkipCleanupOnly );
	LOAD_STDSTRING	( m_sCleanupCmd );
	LOAD_FLOAT		( m_fFovY );
	LOAD_FLOAT		( m_fFovAspectScale );
}
Exemplo n.º 20
0
void AINodeValidatorExpiration::Load( ILTMessage_Read *pMsg )
{
	LOAD_FLOAT(m_fMinExpiration);
	LOAD_FLOAT(m_fMaxExpiration);
	LOAD_TIME(m_fExpirationTime);
}
Exemplo n.º 21
0
void CAIGoalAttackRangedDynamic::Load(ILTMessage_Read *pMsg)
{
	super::Load(pMsg);

	LOAD_TIME( m_fMoveTime );
}