Example #1
0
void Controller::Save(ILTMessage_Write *pMsg)
{
	FadeState *pState;
    uint32 i;

	GameBaseLite::Save( pMsg );

    SAVE_BOOL(m_bFirstUpdate);

    SAVE_DWORD((uint32)m_State);

	// Write FLICKER vars.
	SAVE_TIME(m_fNextFlickerTime);
	SAVE_FLOAT(m_fIntervalMin);
	SAVE_FLOAT(m_fIntervalMax);
	SAVE_DWORD(m_FlickerCounter);
	SAVE_CHARSTRING(m_FlickerMsg);

	// Write FADE vars.
	SAVE_TIME(m_fStartTime);
	SAVE_FLOAT(m_fDuration);
    SAVE_DWORD((uint32)m_WaveType);
    SAVE_DWORD((uint32)m_ParamType);
	m_DestValue.Save(pMsg);

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

		pState->m_StartVal.Save(pMsg);
		SAVE_HOBJECT(pState->m_hTarget);
		SAVE_CHARSTRING( pState->m_ObjectName );
	}
}
void CAIHumanStateAttackProne::Save(ILTMessage_Write *pMsg)
{
	super::Save(pMsg);

	m_pStrategyShoot->Save(pMsg);
	SAVE_TIME( m_fStayProneTime );
	SAVE_TIME( m_fLastFiredTime );
	SAVE_FLOAT( m_fHalfMinDistSqr );
}
Example #3
0
void CDeathScene::Save(ILTMessage_Write *pMsg)
{
    if ( !pMsg || !g_pLTServer ) return;

	SAVE_DWORD(m_eCharacterDeath);
	SAVE_HOBJECT(m_hSceneObject);
	SAVE_FLOAT(m_fNoiseVolume);
    SAVE_TIME(m_fNoiseTime);
    SAVE_TIME(m_fLastPainTime);
    SAVE_FLOAT(m_fLastPainVolume);
	SAVE_BOOL(m_bWasPlayer);
	
	m_pObjectRelationMgr->Save(pMsg);
}
void AINavMeshLinkAbstract::Save(ILTMessage_Write *pMsg)
{
	SAVE_STDSTRING(m_strName);

	SAVE_INT(m_eNMLinkID);
	SAVE_INT(m_eNMPolyID);

	std::string strSmartObject;
	strSmartObject = g_pAIDB->GetAISmartObjectRecordName( (ENUM_AISmartObjectID)m_nSmartObjectID );
	SAVE_STDSTRING( strSmartObject );

	SAVE_bool(m_bLinkActive);
	SAVE_bool(m_bLinkEnabled);
	SAVE_bool(m_bTraversalTimedOut);
	SAVE_TIME(m_fNextTraversalTime);
	SAVE_TIME(m_fNextPreferredTime);
	SAVE_FLOAT(m_fPreferredDelay);
	SAVE_DWORD(m_eEnabledAwarenessMod);
	SAVE_DWORD(m_eMinEnabledAwareness);
	SAVE_DWORD(m_eMaxEnabledAwareness);
	SAVE_DWORD(m_eMinActiveAwareness);
	SAVE_DWORD(m_eMaxActiveAwareness);

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

	SAVE_VECTOR(m_vLinkEdgeA0);
	SAVE_VECTOR(m_vLinkEdgeA1);
	SAVE_VECTOR(m_vMidPtLinkEdgeA);

	SAVE_VECTOR(m_vLinkEdgeB0);
	SAVE_VECTOR(m_vLinkEdgeB1);
	SAVE_VECTOR(m_vMidPtLinkEdgeB);

	SAVE_VECTOR(m_vLinkDirXZ);
	SAVE_FLOAT(m_fLinkDistXZ);

	SAVE_FLOAT(m_fEntryOffsetDistA);
	SAVE_FLOAT(m_fEntryOffsetDistB);	

	SAVE_FLOAT(m_fExitOffsetDistA);
	SAVE_FLOAT(m_fExitOffsetDistB);	

	SAVE_FLOAT(m_fFloorTop);
	SAVE_FLOAT(m_fFloorBottom);

	SAVE_HOBJECT(m_hReservingAI);
}
//----------------------------------------------------------------------------
//              
//	ROUTINE:	CAIHumanStrategyShootStream::Save()
//              
//	PURPOSE:	
//              
//----------------------------------------------------------------------------
/*virtual*/ void CAIHumanStrategyShootStream::Save(ILTMessage_Write *pMsg)
{
	CAIHumanStrategyShoot::Save(pMsg);

	SAVE_BOOL(m_bFiringStream);
	SAVE_TIME(m_flStreamTime);
}
void CAIGoalFollowFootprint::Save(ILTMessage_Write *pMsg)
{
	super::Save(pMsg);

	SAVE_VECTOR(m_vStimulusPos);
	SAVE_TIME(m_fStimulationTime);
}
Example #7
0
void CAISensorStatusCheck::Save(ILTMessage_Write *pMsg)
{
	super::Save(pMsg);
	SAVE_TIME( m_fStatusCheckTime );
	SAVE_DWORD( m_eStimulusIDToCheck );
	SAVE_HOBJECT( m_hAlly );
}
//----------------------------------------------------------------------------
//              
//	ROUTINE:	CAIHumanStateResurrecting::Save()
//              
//	PURPOSE:	
//              
//----------------------------------------------------------------------------
/*virtual*/ void CAIHumanStateResurrecting::Save(ILTMessage_Write *pMsg)
{
	CAIHumanState::Save(pMsg);
	SAVE_TIME(m_fResurrectCompleteTime);
	SAVE_FLOAT(m_fResurrectCompleteDuration);
	SAVE_BOOL(m_bEntryCanDistruct);
}
void CAIGoalAbstractStimulated::Save(ILTMessage_Write *pMsg)
{
	super::Save(pMsg);

	SAVE_DWORD(m_eSenseType);
	SAVE_HOBJECT(m_hStimulusSource);
	SAVE_HOBJECT(m_hStimulusTarget);
	SAVE_TIME(m_fStimulusTime);
	SAVE_BYTE(m_eOnRelationChangeAction);
}
Example #10
0
void CAIActivityAbstract::Save(ILTMessage_Write *pMsg)
{
	SAVE_INT(m_eActStatus);

	SAVE_INT(m_nActivityPriority);

	SAVE_FLOAT(m_fActivityUpdateRate);
	SAVE_TIME(m_fNextActivityUpdateTime);
	SAVE_TIME(m_fActivityActivateTime);
	SAVE_TIME(m_fActivityTimeOut);
	SAVE_TIME(m_fActivityExpirationTime);

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

	// Don't save:
	// m_pSquad;
}
Example #11
0
void SpinningWorldModel::OnSave( ILTMessage_Write *pMsg, uint32 dwSaveFlags )
{
	if( !pMsg ) return;

	// Send to base class

	ActiveWorldModel::OnSave( pMsg, dwSaveFlags );

	SAVE_VECTOR( m_vVelocity );
	SAVE_VECTOR( m_vFinalVelocity );
	SAVE_BYTE( m_bUpdateSpin );
	SAVE_TIME( m_fLastTime );
}
Example #12
0
//----------------------------------------------------------------------------
//              
//	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);
}
Example #13
0
void CAIWeaponAbstract::Save(ILTMessage_Write *pMsg)
{
	HOBJECT hOwner = m_pWeapon->GetObject();
	ASSERT(IsAI(hOwner));

	SAVE_HOBJECT(hOwner);
	SAVE_HRECORD( m_pWeapon->GetWeaponRecord() );
	SAVE_STDSTRING(m_szFireSocketName);
	SAVE_INT(m_eFiringState);
	SAVE_DWORD(m_iAnimRandomSeed);
	SAVE_TIME(m_fRandomSeedSelectionTime);
	SAVE_FLOAT(m_flWeaponContextInaccuracyScalar);
	SAVE_DWORD(m_hWeaponSocket);
	SAVE_bool(m_bCanDropWeapon);
}
void CAIGoalAbstractUseObject::Save(ILTMessage_Write *pMsg)
{
	super::Save(pMsg);

	SAVE_HOBJECT(m_hNodeUseObject);
	SAVE_HOBJECT(m_hLastNodeUseObject);
	SAVE_TIME(m_fStimTime);
	SAVE_DWORD(m_eWeaponPosition);
	SAVE_BOOL(m_bRequireBareHands);
	SAVE_BOOL(m_bAllowDialogue);
	SAVE_BOOL(m_bTurnOnLights);
	SAVE_BOOL(m_bTurnOffLights);
	SAVE_BOOL(m_bHolstered);
	SAVE_BOOL(m_bLockedNode);
	SAVE_BOOL(m_bPlayedSpecialDeathAnim);
}
Example #15
0
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 );
	}
}
Example #16
0
void PlayerVehicle::Save(ILTMessage_Write *pMsg)
{
	if (!pMsg) return;

	SAVE_VECTOR(m_vOriginalPos);
	SAVE_VECTOR(m_vOriginalDims);
	SAVE_ROTATION(m_rOriginalRot);
 	SAVE_FLOAT(m_fRespawnTime);
	SAVE_BYTE((uint8)m_ePPhysicsModel);
	SAVE_bool( m_bLocked );
	SAVE_bool( m_bRidden );
	SAVE_HSTRING( m_hstrLockedCommand );
	SAVE_DWORD(m_dwSavedFlags);
	SAVE_TIME( m_fLastRideTime );
	SAVE_bool( m_bVirgin );

	m_RespawnTimer.Save(pMsg);
}
Example #17
0
void Camera::Save(ILTMessage_Write *pMsg, uint32 dwSaveFlags)
{
	if (!pMsg) return;

	SAVE_INT		( sm_nActiveCamera );
	SAVE_bool		( m_bOn );
	SAVE_bool		( m_bIsListener );
	SAVE_bool		( m_bAllowPlayerMovement );
	SAVE_bool		( m_bOneTime );
	SAVE_BYTE		( m_nCameraType);
	SAVE_bool		( m_bStartActive );
	SAVE_FLOAT		( m_fActiveTime );
	SAVE_TIME		( m_fTurnOffTime );
	SAVE_bool		( m_bCanSkip );
	SAVE_bool		( m_bOnSkipCleanupOnly );
	SAVE_STDSTRING	( m_sCleanupCmd );
	SAVE_FLOAT		( m_fFovY );
	SAVE_FLOAT		( m_fFovAspectScale );
}
void AISenseRecord::Save(ILTMessage_Write *pMsg)
{
	SAVE_DWORD(eSenseType);
	SAVE_DWORD(pAIBM_Last_Stimulus ? pAIBM_Last_Stimulus->eSenseType : kStim_InvalidType);
	SAVE_HOBJECT(hLastStimulusSource);
	SAVE_HOBJECT(hLastStimulusTarget);
	SAVE_DWORD(eLastTargetMatchID);
	SAVE_VECTOR(vLastStimulusPos);
	SAVE_VECTOR(vLastStimulusDir);
	SAVE_DWORD(nLastStimulusAlarmLevel);
	SAVE_DWORD(eLastStimulusID);
	SAVE_FLOAT(fSenseDistance);
	SAVE_FLOAT(fSenseDistanceSqr);
	SAVE_FLOAT(fCurStimulation);
	SAVE_FLOAT(fMaxStimulation);
	SAVE_FLOAT(fReactionDelayTimer);
	SAVE_FLOAT(fReactionDelayTime);
	SAVE_TIME(fLastStimulationTime);
	SAVE_DWORD(nCycle);
	SAVE_BYTE(cFalseStimulation);
	SAVE_INT(ptSightGrid.x);
	SAVE_INT(ptSightGrid.y);
}
Example #19
0
//----------------------------------------------------------------------------
//              
//	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);
}
Example #20
0
void AINodeValidatorExpiration::Save( ILTMessage_Write *pMsg )
{
	SAVE_FLOAT(m_fMinExpiration);
	SAVE_FLOAT(m_fMaxExpiration);
	SAVE_TIME(m_fExpirationTime);
}
void CAIGoalAttackRangedDynamic::Save(ILTMessage_Write *pMsg)
{
	super::Save(pMsg);

	SAVE_TIME( m_fMoveTime );
}