void CAISense::Save(HMESSAGEWRITE hWrite)
{
	SAVE_HOBJECT(m_hObject);
	SAVE_BOOL(m_bEnabled);
	SAVE_FLOAT(m_fDistance);
	SAVE_FLOAT(m_fDistanceSqr);
	SAVE_BOOL(m_bUpdated);
	SAVE_DWORD(m_soOutcome);
	SAVE_HOBJECT(m_hStimulus);
	SAVE_VECTOR(m_vStimulusPosition);
	SAVE_FLOAT(m_fStimulation);
	SAVE_FLOAT(m_fStimulationIncreaseRateAlert);
	SAVE_FLOAT(m_fStimulationDecreaseRateAlert);
	SAVE_FLOAT(m_fStimulationIncreaseRateUnalert);
	SAVE_FLOAT(m_fStimulationDecreaseRateUnalert);
	SAVE_FLOAT(m_fStimulationTime);
	SAVE_RANGE(m_rngStimulationThreshhold);
	SAVE_BOOL(m_bStimulationPartial);
	SAVE_BOOL(m_bStimulationFull);
	SAVE_BOOL(m_bIncreasedStimulation);
	SAVE_DWORD(m_cFalseStimulation);
	SAVE_DWORD(m_nFalseStimulationLimit);
	SAVE_BOOL(m_bReacting);
	SAVE_FLOAT(m_fReactionDelay);
	SAVE_FLOAT(m_fReactionDelayTimer);
	SAVE_FLOAT(m_fTimestamp);
}
Пример #2
0
void SecurityCamera::Save(ILTMessage_Write *pMsg)
{
	if (!pMsg) return;

	m_LightTimer.Save(pMsg);

	SAVE_VECTOR(m_vPos);

	SAVE_HOBJECT(m_hDisablerModel);
    SAVE_HOBJECT(m_hLight);

	SAVE_DWORD(m_eState);
    SAVE_DWORD(m_ePreviousState);

    SAVE_FLOAT(m_fYaw);
    SAVE_FLOAT(m_fYaw1);
    SAVE_FLOAT(m_fYaw2);
    SAVE_FLOAT(m_fYawSpeed);
    SAVE_FLOAT(m_fYaw1PauseTime);
    SAVE_FLOAT(m_fYaw2PauseTime);
    SAVE_FLOAT(m_fYawPauseTimer);

    SAVE_FLOAT(m_fSoundRadius);

    SAVE_BOOL(m_bDisabled);
    SAVE_BOOL(m_bTripped);
    SAVE_BYTE((uint8)m_eLightColor);
}
Пример #3
0
void CAIGoalUseSmartObject::Save(ILTMessage_Write *pMsg)
{
	super::Save(pMsg);

	SAVE_HOBJECT(m_hNode);
	SAVE_HOBJECT(m_hNodeBest);
}
Пример #4
0
void CAIGoalStalk::Save(ILTMessage_Write *pMsg)
{
	super::Save(pMsg);

	SAVE_VECTOR(m_vPendingStalkingPosition);
	SAVE_HOBJECT(m_hPendingStalkingNode);
	SAVE_HOBJECT(m_hStalkingNode);
	SAVE_HOBJECT(m_hPreviousStalkingNode);
}
Пример #5
0
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);
}
Пример #6
0
void CAIGoalGoto::Save(ILTMessage_Write *pMsg)
{
	super::Save(pMsg);

	SAVE_DWORD( m_NodeCurrent.eFactID );
	SAVE_HOBJECT( m_NodeCurrent.hNode );
	SAVE_bool( m_NodeCurrent.bTaskIsScripted );

	SAVE_DWORD( m_NodePending.eFactID );
	SAVE_HOBJECT( m_NodePending.hNode );
	SAVE_bool( m_NodePending.bTaskIsScripted );
}
Пример #7
0
void Body::Save(HMESSAGEWRITE hWrite, uint32 dwSaveFlags)
{
	if (!hWrite) return;

	LTAnimTracker* pTracker = LTNULL;
	if ( (LT_OK == g_pModelLT->GetMainTracker(m_hObject, pTracker)) && pTracker )
	{
		uint32 dwTime;
		g_pModelLT->GetCurAnimTime(pTracker, dwTime);
		SAVE_DWORD(dwTime);
	}
	else
	{
		SAVE_DWORD(0);
	}

	SAVE_DWORD(m_eBodyStatePrevious);
	SAVE_HOBJECT(m_hHitBox);
	SAVE_VECTOR(m_vColor);
	SAVE_VECTOR(m_vDeathDir);
	SAVE_FLOAT(m_fStartTime);
	SAVE_FLOAT(m_fLifetime);
	SAVE_BOOL(m_bFirstUpdate);
	SAVE_BYTE(m_eModelId);
	SAVE_BYTE(m_eModelSkeleton);
	SAVE_BYTE(m_eDeathType);
	SAVE_BYTE(m_eDamageType);
	SAVE_BYTE(m_eModelStyle);
	SAVE_DWORD(m_eBodyState);
	SAVE_HOBJECT(m_hChecker);
	SAVE_HOBJECT(m_hWeaponItem);

	if ( m_pState )
	{
		m_pState->Save(hWrite);
	}

	SAVE_BOOL(!!m_pAttachments);
	if ( m_pAttachments )
	{
		SAVE_DWORD(m_pAttachments->GetType());
	}

	SAVE_INT(m_cSpears);

	for ( uint32 iSpear = 0 ; iSpear < kMaxSpears ; iSpear++ )
	{
		SAVE_HOBJECT(m_ahSpears[iSpear]);
	}

	m_DeathScene.Save(hWrite);
}
Пример #8
0
void CAIGoalGuard::Save(ILTMessage_Write *pMsg)
{
	super::Save(pMsg);

	SAVE_HOBJECT( m_hGuardNode );
	SAVE_BOOL( m_bInRadius );
}
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);
}
void Breakable::Save(HMESSAGEWRITE hWrite)
{
	if (!hWrite) return;

	SAVE_HOBJECT(m_hBreakObj);
	SAVE_BOOL(m_bStarted);
	SAVE_BOOL(m_bFalling);
	SAVE_BOOL(m_bDestroyOnImpact);
	SAVE_BOOL(m_bDestroyAfterBreak);
	SAVE_BOOL(m_bCrushObjects);
	SAVE_BOOL(m_bTouchActivate);
	SAVE_FLOAT(m_fBreakTime);
	SAVE_FLOAT(m_fBreakSoundRadius);
	SAVE_FLOAT(m_fImpactSoundRadius);
	SAVE_FLOAT(m_fRotVel);
	SAVE_HSTRING(m_hstrBreakSound);
	SAVE_HSTRING(m_hstrImpactSound);
	SAVE_VECTOR(m_vStartingPitchYawRoll);
	SAVE_VECTOR(m_vPitchYawRoll);
	SAVE_VECTOR(m_vTotalDelta);
	SAVE_VECTOR(m_vDelta);
	SAVE_VECTOR(m_vSign);
	SAVE_VECTOR(m_vFinalPos);
	SAVE_VECTOR(m_vShakeAmount);
	SAVE_VECTOR(m_vAdjust);
	SAVE_VECTOR(m_vVel);

	m_BreakTimer.Save(hWrite);
}
Пример #11
0
void CAISensorStatusCheck::Save(ILTMessage_Write *pMsg)
{
	super::Save(pMsg);
	SAVE_TIME( m_fStatusCheckTime );
	SAVE_DWORD( m_eStimulusIDToCheck );
	SAVE_HOBJECT( m_hAlly );
}
Пример #12
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 );
	}
}
Пример #13
0
void AINodeGuard::Save(ILTMessage_Write *pMsg)
{
	super::Save(pMsg);

	// Save guarded node names.

	HSTRING hstrNodeName;
	HSTRING_LIST::iterator hstr_it;
	SAVE_DWORD( m_lstGuardedNodeNames.size() );
	for ( hstr_it = m_lstGuardedNodeNames.begin(); hstr_it != m_lstGuardedNodeNames.end(); ++hstr_it )
	{
		hstrNodeName = *hstr_it;
		SAVE_HSTRING( hstrNodeName );
	}

	// Save guarded nodes.

	HOBJECT hNode;
	HOBJECT_LIST::iterator h_it;
	SAVE_DWORD( m_lstGuardedNodes.size() );
	for ( h_it = m_lstGuardedNodes.begin(); h_it != m_lstGuardedNodes.end(); ++h_it )
	{
		hNode = *h_it;
		SAVE_HOBJECT( hNode );
	}
}
Пример #14
0
void CAISensorPassTarget::Save(ILTMessage_Write *pMsg)
{
	super::Save( pMsg );

	SAVE_bool( m_bHoldingPosition );
	SAVE_HOBJECT( m_hVerifiedNode );
}
Пример #15
0
void CAIGoalPatrol::Save(ILTMessage_Write *pMsg)
{
	super::Save(pMsg);

	SAVE_HOBJECT( m_hPatrolNode );
	SAVE_DWORD( m_eAwareness );
}
void CAISenseRecord::Save(HMESSAGEWRITE hWrite)
{
	SAVE_HOBJECT(m_hObject);
	SAVE_DWORD(m_stType);
	SAVE_DWORD(m_soOutcome);
	SAVE_FLOAT(m_fTimestamp);
	SAVE_FLOAT(m_fLifetime);
}
Пример #17
0
void CAIGoalGoto::Save(ILTMessage_Write *pMsg)
{
	super::Save(pMsg);

	SAVE_HOBJECT(m_hDestNode);
	SAVE_DWORD(m_eMovement);
	SAVE_DWORD(m_eAwareness);
}
Пример #18
0
void CAIGoalRespondToBackup::Save(ILTMessage_Write *pMsg)
{
	super::Save(pMsg);

	SAVE_HOBJECT(m_hNodeBackup);
	SAVE_VECTOR(m_vEnemySeenPos);
	SAVE_DWORD(m_cResponses);
	SAVE_DWORD(m_cArrivalCount);
}
Пример #19
0
void AINodeCombatOpportunity::Save(ILTMessage_Write *pMsg)
{
	super::Save(pMsg);

	SAVE_HOBJECT(m_hCombatOpportunity);

	m_PlayerOnNodeValidator.Save( pMsg );
	m_ThreatRadiusValidator.Save( pMsg );
	m_BoundaryRadiusValidator.Save( pMsg );
}
Пример #20
0
void Door::OnSave( ILTMessage_Write *pMsg, uint32 dwSaveFlags )
{
	if( !pMsg ) return;

	// Save base vars first

	ActiveWorldModel::OnSave( pMsg, dwSaveFlags );

	SAVE_HSTRING( m_hstrDoorLink );
	SAVE_HOBJECT( m_hAIUser );
}
Пример #21
0
void CAIHelicopterStrategyShoot::Save(HMESSAGEREAD hWrite)
{
	CAIHelicopterStrategy::Save(hWrite);

	SAVE_DWORD(m_eFire);
	SAVE_HOBJECT(m_hTarget);

	for ( int iWeapon = 0 ; iWeapon < AI_MAX_WEAPONS ; iWeapon++ )
	{
		m_aBursts[iWeapon].Save(hWrite);
	}
}
Пример #22
0
void SpecialFX::OnSave(ILTMessage_Write *pMsg, uint32 dwFlags)
{
	SAVE_CHARSTRING(m_sFxName);
	SAVE_DWORD(m_dwFxFlags);
	SAVE_bool(m_bStartOn);
	SAVE_bool(m_bLoop);
	SAVE_bool(m_bIsOn);
	SAVE_bool(m_bOneTime);
	SAVE_HSTRING(m_hstrTargetName);
	SAVE_HOBJECT(m_hTargetObj);
	SAVE_bool(m_bRemoveTarget);
}
Пример #23
0
void WorldModel::OnSave( ILTMessage_Write *pMsg, uint32 dwSaveFlags )
{
	ASSERT( pMsg != NULL );
	
	m_ActivateTypeHandler.Save( pMsg );

	SAVE_bool( m_bIsKeyframed );
	SAVE_bool( m_bStartHidden );
	SAVE_HSTRING( m_hstrAttachments );
	SAVE_BOOL( m_bRemoveAttachments );
	SAVE_VECTOR( m_vAttachDir );
	SAVE_HOBJECT( m_hAttachDirObj );
	SAVE_ROTATION( m_hackInitialRot );
	SAVE_FLOAT( m_fStimRadius );
	SAVE_HOBJECT( m_hActivateParent );
	SAVE_bool( m_bCanActivate );

	// Save the object lists last...
	ObjRefNotifierList::iterator iter;

	// First the Attachment List
	SAVE_BYTE( m_AttachmentList.size( ));
	for( iter = m_AttachmentList.begin( ); iter != m_AttachmentList.end( ); iter++ )
	{
		SAVE_HOBJECT( *iter );
	}
	
	SAVE_BYTE( m_AttachMsgObjList.size( ));
	for( iter = m_AttachMsgObjList.begin( ); iter != m_AttachMsgObjList.end( ); iter++ )
	{
		SAVE_HOBJECT( *iter );
	}

	// Then the Mark List
	SAVE_BYTE( m_MarkList.size( ));
	for( iter = m_MarkList.begin( ); iter != m_MarkList.end( ); iter++ )
	{
		SAVE_HOBJECT( *iter );
	}
}
Пример #24
0
void CAIHelicopterStateAttack::Save(HMESSAGEREAD hWrite)
{
	CAIHelicopterState::Save(hWrite);

	m_pStrategyShoot->Save(hWrite);

	SAVE_HOBJECT(m_hTarget);

	for ( int iWeapon = 0 ; iWeapon < AI_MAX_WEAPONS ; iWeapon++ )
	{
		SAVE_BOOL(m_abActiveWeapons[iWeapon]);
	}
}
Пример #25
0
void Alarm::Save(ILTMessage_Write *pMsg)
{
	if (!g_pLTServer || !pMsg) return;

    SAVE_DWORD(m_eState);
	SAVE_BOOL(m_bPlayerUsable);
	SAVE_BOOL(m_bLocked);
	SAVE_FLOAT(m_fAlarmSoundTime);
	SAVE_HSTRING(m_hstrPlayerActivateCommand);

	SAVE_HSTRING(m_hstrAlertRegions);
	SAVE_HSTRING(m_hstrRespondRegions);
	SAVE_HSTRING(m_hstrSearchRegions);

	AIREGION_LIST::iterator it;

	SAVE_DWORD( (uint32)(m_lstAlertRegions.size()) );
	for( it = m_lstAlertRegions.begin(); it != m_lstAlertRegions.end(); ++it )
	{
		SAVE_HOBJECT( *it );
	}

	SAVE_DWORD( (uint32)(m_lstRespondRegions.size()) );
	for( it = m_lstRespondRegions.begin(); it != m_lstRespondRegions.end(); ++it )
	{
		SAVE_HOBJECT( *it );
	}

	SAVE_DWORD( (uint32)(m_lstSearchRegions.size()) );
	for( it = m_lstSearchRegions.begin(); it != m_lstSearchRegions.end(); ++it )
	{
		SAVE_HOBJECT( *it );
	}

	SAVE_VECTOR( m_vRegionsGroupExtentsMin );
	SAVE_VECTOR( m_vRegionsGroupExtentsMax );
	SAVE_VECTOR( m_vRegionsGroupCenter );
	SAVE_FLOAT(	m_fRegionsGroupRadius );
}
Пример #26
0
void Turret::Save( ILTMessage_Write *pMsg, uint32 dwSaveFlags )
{
	if( !pMsg )
		return;

	m_swtDestroyedDeactivationDelay.Save( *pMsg );

	SAVE_HRECORD( m_hTurret );
	SAVE_HOBJECT( m_hOperatingObject );
	SAVE_STDSTRING( m_sActivateCommand );
	SAVE_STDSTRING( m_sDeactivateCommand );
	SAVE_DWORD( m_nCurDamageState );
}
void CAIVolume::Save(HMESSAGEWRITE hWrite)
{
	SAVE_HSTRING(m_hstrName);
	SAVE_INT(m_iVolume);
	SAVE_DWORD(m_iRegion);
	SAVE_VECTOR(m_vFrontTopLeft);
	SAVE_VECTOR(m_vFrontTopRight);
	SAVE_VECTOR(m_vBackTopLeft);
	SAVE_VECTOR(m_vBackTopRight);
	SAVE_VECTOR(m_vFrontBottomLeft);
	SAVE_VECTOR(m_vFrontBottomRight);
	SAVE_VECTOR(m_vBackBottomLeft);
	SAVE_VECTOR(m_vBackBottomRight);
	SAVE_INT(m_cNeighbors);
	SAVE_BOOL(m_bHadDoors);
	SAVE_INT(m_cDoors);
	SAVE_HOBJECT(m_hLift);
	SAVE_BOOL(m_bStairs);
	SAVE_BOOL(m_bLedge);
	SAVE_BOOL(m_bVertical);
	SAVE_VECTOR(m_vStairsDir);
	SAVE_VECTOR(m_vLedgeDir);

	for ( uint32 iNeighbor = 0 ; iNeighbor < m_cNeighbors ; iNeighbor++ )
	{
		m_aNeighbors[iNeighbor].Save(hWrite);
	}

	for ( uint32 iDoor = 0 ; iDoor < cm_nMaxDoors ; iDoor++ )
	{
		SAVE_HOBJECT(m_ahDoors[iDoor]);
	}

	for ( uint32 iViewNode = 0 ; iViewNode < kMaxViewNodes ; iViewNode++ )
	{
		SAVE_DWORD(m_adwViewNodes[iViewNode]);
	}
}
Пример #28
0
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);
}
Пример #29
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);
}
Пример #30
0
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);
}