Ejemplo n.º 1
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);
}
void CAIVolumeNeighbor::Load(HMESSAGEREAD hRead)
{
	LOAD_INT(m_iVolume);
	LOAD_VECTOR(m_vConnectionPos);
	LOAD_VECTOR(m_avConnectionEndpoints[0]);
	LOAD_VECTOR(m_avConnectionEndpoints[1]);
	LOAD_VECTOR(m_vConnectionPerpDir);
	LOAD_VECTOR(m_vConnectionDir);
	LOAD_FLOAT(m_fConnectionLength);
}
void Breakable::Load(HMESSAGEREAD hRead)
{
	if (!hRead) return;

	LOAD_HOBJECT(m_hBreakObj);
	LOAD_BOOL(m_bStarted);
	LOAD_BOOL(m_bFalling);
	LOAD_BOOL(m_bDestroyOnImpact);
	LOAD_BOOL(m_bDestroyAfterBreak);
	LOAD_BOOL(m_bCrushObjects);
	LOAD_BOOL(m_bTouchActivate);
	LOAD_FLOAT(m_fBreakTime);
	LOAD_FLOAT(m_fBreakSoundRadius);
	LOAD_FLOAT(m_fImpactSoundRadius);
	LOAD_FLOAT(m_fRotVel);
	LOAD_HSTRING(m_hstrBreakSound);
	LOAD_HSTRING(m_hstrImpactSound);
	LOAD_VECTOR(m_vStartingPitchYawRoll);
	LOAD_VECTOR(m_vPitchYawRoll);
	LOAD_VECTOR(m_vTotalDelta);
	LOAD_VECTOR(m_vDelta);
	LOAD_VECTOR(m_vSign);
	LOAD_VECTOR(m_vFinalPos);
	LOAD_VECTOR(m_vShakeAmount);
	LOAD_VECTOR(m_vAdjust);
	LOAD_VECTOR(m_vVel);

	m_BreakTimer.Load(hRead);
}
Ejemplo n.º 4
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 );
}
Ejemplo n.º 5
0
void ScaleSprite::Load(ILTMessage_Read *pMsg, uint32 dwLoadFlags)
{
	if (!pMsg) return;

	LOAD_VECTOR(m_vScale);
    LOAD_VECTOR(m_vColor);
    LOAD_FLOAT(m_fAlpha);
    LOAD_BOOL(m_bFlushWithWorld);
    LOAD_BOOL(m_bRotatable);
    LOAD_BOOL(m_bStartOn);
    LOAD_DWORD(m_dwAdditionalFlags);
    LOAD_HSTRING(m_hstrDamagedFile);
    LOAD_HSTRING(m_hstrDestroyedFile);
}
Ejemplo n.º 6
0
void SecurityCamera::Load(ILTMessage_Read *pMsg)
{
	if (!pMsg) return;

	m_LightTimer.Load(pMsg);

    LOAD_VECTOR(m_vPos);

	LOAD_HOBJECT(m_hDisablerModel);
    LOAD_HOBJECT(m_hLight);

    LOAD_DWORD_CAST(m_eState, State);
    LOAD_DWORD_CAST(m_ePreviousState, State);

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

    LOAD_FLOAT(m_fSoundRadius);

    LOAD_BOOL(m_bDisabled);
    LOAD_BOOL(m_bTripped);
    LOAD_BYTE_CAST(m_eLightColor, LightColor);

	// Restore our sounds...

	if (m_eState == eStateFocusing)
	{
		StartFocusingSound();
	}
}
Ejemplo n.º 7
0
void VolumeEffect::Load( ILTMessage_Read *pMsg )
{
	if( !pMsg )
		return;

	LOAD_VECTOR( m_vDims );
}
Ejemplo n.º 8
0
void PickupItem::Load(ILTMessage_Read *pMsg, uint32 dwLoadFlags)
{
	if (!pMsg) return;

	LOAD_HOBJECT(m_hPlayerObj);
    LOAD_FLOAT(m_fRespawnDelay);
    LOAD_BOOL(m_bRotate);
    LOAD_BOOL(m_bBounce);
	LOAD_BOOL(m_bRespawn);
    LOAD_DWORD(m_dwUserFlags);
    LOAD_DWORD(m_dwFlags);
    LOAD_HSTRING(m_hstrPickupCommand);
    LOAD_HSTRING(m_hstrSoundFile);
    LOAD_HSTRING(m_hstrRespawnSoundFile);
	LOAD_HSTRING(m_hstrModelOverride);
    LOAD_VECTOR(m_vScale);
	LOAD_BOOL(m_bTouchPickup);
	LOAD_BOOL(m_bActivatePickup);
	LOAD_bool(m_bWasPickedUp);

	char szString[1024] = {0};
	LOAD_CHARSTRING( szString, ARRAY_LEN( szString ));
	m_sWorldAniName = szString;

	if( g_pVersionMgr->GetCurrentSaveVersion( ) > CVersionMgr::kSaveVersion__1_2 )
	{
		LOAD_BYTE(m_nTeamId);
	}
}
Ejemplo n.º 9
0
void CAIGoalFollowFootprint::Load(ILTMessage_Read *pMsg)
{
	super::Load(pMsg);

	LOAD_VECTOR(m_vStimulusPos);
	LOAD_TIME(m_fStimulationTime);
}
void CAISense::Load(HMESSAGEREAD hRead)
{
	LOAD_HOBJECT(m_hObject);
	LOAD_BOOL(m_bEnabled);
	LOAD_FLOAT(m_fDistance);
	LOAD_FLOAT(m_fDistanceSqr);
	LOAD_BOOL(m_bUpdated);
	LOAD_DWORD_CAST(m_soOutcome, SenseOutcome);
	LOAD_HOBJECT(m_hStimulus);
	LOAD_VECTOR(m_vStimulusPosition);
	LOAD_FLOAT(m_fStimulation);
	LOAD_FLOAT(m_fStimulationIncreaseRateAlert);
	LOAD_FLOAT(m_fStimulationDecreaseRateAlert);
	LOAD_FLOAT(m_fStimulationIncreaseRateUnalert);
	LOAD_FLOAT(m_fStimulationDecreaseRateUnalert);
	LOAD_FLOAT(m_fStimulationTime);
	LOAD_RANGE(m_rngStimulationThreshhold);
	LOAD_BOOL(m_bStimulationPartial);
	LOAD_BOOL(m_bStimulationFull);
	LOAD_BOOL(m_bIncreasedStimulation);
	LOAD_DWORD(m_cFalseStimulation);
	LOAD_DWORD(m_nFalseStimulationLimit);
	LOAD_BOOL(m_bReacting);
	LOAD_FLOAT(m_fReactionDelay);
	LOAD_FLOAT(m_fReactionDelayTimer);
	LOAD_FLOAT(m_fTimestamp);
}
Ejemplo n.º 11
0
void PlayerVehicle::Load(HMESSAGEREAD hRead)
{
    ILTServer* pServerDE = GetServerDE();
	if (!pServerDE || !hRead) return;

	LOAD_VECTOR(m_vOriginalPos);
	LOAD_VECTOR(m_vOriginalDims);
	LOAD_ROTATION(m_rOriginalRot);
 	LOAD_FLOAT(m_fRespawnTime);

    uint8 nModel;
	LOAD_BYTE(nModel);
	m_ePPhysicsModel = (PlayerPhysicsModel)nModel;

	m_RespawnTimer.Load(hRead);
}
Ejemplo n.º 12
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);
}
Ejemplo n.º 13
0
void CAIHumanStateLaunch::Load(ILTMessage_Read *pMsg)
{
	super::Load(pMsg);

	LOAD_FLOAT( m_fLaunchSpeed );
	LOAD_FLOAT(	m_fLaunchHeight );
	LOAD_VECTOR( m_vLaunchDest );
	LOAD_DWORD_CAST( m_eLaunchMovement, EnumAnimProp );
}
Ejemplo n.º 14
0
void CAIGoalRespondToBackup::Load(ILTMessage_Read *pMsg)
{
	super::Load(pMsg);

	LOAD_HOBJECT(m_hNodeBackup);
	LOAD_VECTOR(m_vEnemySeenPos);
	LOAD_DWORD(m_cResponses);
	LOAD_DWORD(m_cArrivalCount);
}
Ejemplo n.º 15
0
void CAIGoalStalk::Load(ILTMessage_Read *pMsg)
{
	super::Load(pMsg);

	LOAD_VECTOR(m_vPendingStalkingPosition);
	LOAD_HOBJECT(m_hPendingStalkingNode);
	LOAD_HOBJECT(m_hStalkingNode);
	LOAD_HOBJECT(m_hPreviousStalkingNode);
}
Ejemplo n.º 16
0
void TransitionArea::Load( ILTMessage_Read *pMsg, uint32 dwSaveFlags )
{
	if( !pMsg ) return;

	LOAD_DWORD( m_dwFlags );
	LOAD_INT( m_nTransLevel );

	LOAD_ROTATION( m_tfWorld.m_rRot );
	LOAD_VECTOR( m_tfWorld.m_vPos );
}
Ejemplo n.º 17
0
void LightGroup::Load(ILTMessage_Read *pMsg, uint32 dwLoadFlags)
{
 	if (!pMsg) return;

	LOAD_bool(m_bOn);
	LOAD_VECTOR(m_vColor);

	m_bClientNeedsUpdate = true;
	SetNextUpdate(m_hObject, UPDATE_NEXT_FRAME);
}
Ejemplo n.º 18
0
void Alarm::Load(ILTMessage_Read *pMsg)
{
	if (!g_pLTServer || !pMsg) return;

    LOAD_DWORD_CAST(m_eState, State);
	LOAD_BOOL(m_bPlayerUsable);
	LOAD_BOOL(m_bLocked);
	LOAD_FLOAT(m_fAlarmSoundTime);
	LOAD_HSTRING(m_hstrPlayerActivateCommand);

	LOAD_HSTRING(m_hstrAlertRegions);
	LOAD_HSTRING(m_hstrRespondRegions);
	LOAD_HSTRING(m_hstrSearchRegions);

	uint32 cRegions;
	AIREGION_LIST::iterator it;

	LOAD_DWORD( cRegions );
	m_lstAlertRegions.resize( cRegions );
	for( it = m_lstAlertRegions.begin(); it != m_lstAlertRegions.end(); ++it )
	{
		LOAD_HOBJECT( *it );
	}

	LOAD_DWORD( cRegions );
	m_lstRespondRegions.resize( cRegions );
	for( it = m_lstRespondRegions.begin(); it != m_lstRespondRegions.end(); ++it )
	{
		LOAD_HOBJECT( *it );
	}

	LOAD_DWORD( cRegions );
	m_lstSearchRegions.resize( cRegions );
	for( it = m_lstSearchRegions.begin(); it != m_lstSearchRegions.end(); ++it )
	{
		LOAD_HOBJECT( *it );
	}

	LOAD_VECTOR( m_vRegionsGroupExtentsMin );
	LOAD_VECTOR( m_vRegionsGroupExtentsMax );
	LOAD_VECTOR( m_vRegionsGroupCenter );
	LOAD_FLOAT(	m_fRegionsGroupRadius );
}
Ejemplo n.º 19
0
void AI_Helicopter::Load(HMESSAGEREAD hRead, uint32 dwLoadFlags)
{
	CAIVehicle::Load(hRead, dwLoadFlags);

	// Load state...

    uint32 dwState;
	LOAD_DWORD(dwState);

	if (dwState != (DWORD)-1)
	{
		SetState((CAIHelicopterState::AIHelicopterStateType)dwState);

		if (m_pHelicopterState)
		{
			m_pHelicopterState->Load(hRead);
		}
	}

	LOAD_FLOAT(m_fSpeed);
	LOAD_FLOAT(m_fFlySpeed);
	LOAD_ROTATION(m_rRotSearchlight);
	LOAD_VECTOR(m_vPosSearchlight);
	LOAD_INT(m_iObjectSearchLight);
	LOAD_ROTATION(m_rRotGunner);
	LOAD_VECTOR(m_vPosGunner);
	LOAD_INT(m_iObjectGunner);

	LOAD_BOOL(m_bWantsRightDoorOpened);
	LOAD_BOOL(m_bWantsRightDoorClosed);
	LOAD_BOOL(m_bRightDoorOpened);
	LOAD_BOOL(m_bWantsLeftDoorOpened);
	LOAD_BOOL(m_bWantsLeftDoorClosed);
	LOAD_BOOL(m_bLeftDoorOpened);

	LOAD_FLOAT(m_fDeathDelay);
	LOAD_HSTRING(m_hstrDeathMessage);
	LOAD_HSTRING(m_hstrDeath2_3rdMessage);
	LOAD_HSTRING(m_hstrDeath1_3rdMessage);
	LOAD_HSTRING(m_hstrDeath0_3rdMessage);
	LOAD_BOOL(m_bExploded);
}
Ejemplo n.º 20
0
void CAIStateAnimate::Load( ILTMessage_Read *pMsg )
{
	super::Load(pMsg);

	LOAD_BOOL(m_bLoop);
	LOAD_INT_CAST(m_eSpecialType, AISPECIAL_ANIMATION_TYPE);
	m_animProps.Load(pMsg);

	LOAD_bool( m_bCheckDepartedNode ); 
	LOAD_VECTOR( m_vInitialPos );
}
Ejemplo n.º 21
0
void CAIHumanStateAttackMove::Load(ILTMessage_Read *pMsg)
{
	super::Load(pMsg);

	m_pStrategyShoot->Load(pMsg);
	m_pStrategyFollowPath->Load(pMsg);

	LOAD_DWORD_CAST( m_eAttackMove, EnumAnimProp );
	LOAD_VECTOR( m_vAttackMoveDest );
	LOAD_BOOL( m_bTurnedAround );
}
Ejemplo n.º 22
0
void CAIBrain::Load(HMESSAGEREAD hRead)
{
	LOAD_DWORD_CAST(m_eRangeStatusLast, RangeStatus);
	LOAD_FLOAT(m_fRangeStatusCheckTime);

	LOAD_DWORD_CAST(m_eDodgeStatusLast, DodgeStatus);
	LOAD_FLOAT(m_fDodgeStatusCheckTimeVector);
	LOAD_FLOAT(m_fDodgeStatusCheckTimeProjectile);
	LOAD_HSTRING(m_hstrDodgeProjectileName);
	LOAD_VECTOR(m_vDodgeProjectilePosition);
	LOAD_FLOAT(m_fGrenadeStatusCheckTime);
}
Ejemplo n.º 23
0
void CFlag::Load( const c8* filename )
{
    // load script file
    SCRIPT.RunFile( filename );

    LOAD_STRING( "flag_modelname" );
    LOAD_STRING( "flag_texturename" );
    LOAD_VECTOR( "flag_modelscale_x", "flag_modelscale_y", "flag_modelscale_z" );
    LOAD_VALUE( "flag_mass", f32 );
    LOAD_VALUE( "flag_bodytype", int );
    LOAD_VALUE( "flag_team", int );
}
Ejemplo n.º 24
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 );
	}
}
void CAIVolume::Load(HMESSAGEREAD hRead)
{
	LOAD_HSTRING(m_hstrName);
	LOAD_INT(m_iVolume);
	LOAD_DWORD(m_iRegion);
	LOAD_VECTOR(m_vFrontTopLeft);
	LOAD_VECTOR(m_vFrontTopRight);
	LOAD_VECTOR(m_vBackTopLeft);
	LOAD_VECTOR(m_vBackTopRight);
	LOAD_VECTOR(m_vFrontBottomLeft);
	LOAD_VECTOR(m_vFrontBottomRight);
	LOAD_VECTOR(m_vBackBottomLeft);
	LOAD_VECTOR(m_vBackBottomRight);
	LOAD_INT(m_cNeighbors);
	LOAD_BOOL(m_bHadDoors);
	LOAD_INT(m_cDoors);
	LOAD_HOBJECT(m_hLift);
	LOAD_BOOL(m_bStairs);
	LOAD_BOOL(m_bLedge);
	LOAD_BOOL(m_bVertical);
	LOAD_VECTOR(m_vStairsDir);
	LOAD_VECTOR(m_vLedgeDir);

	m_aNeighbors = debug_newa(CAIVolumeNeighbor, m_cNeighbors);
	for ( uint32 iNeighbor = 0 ; iNeighbor < m_cNeighbors ; iNeighbor++ )
	{
		m_aNeighbors[iNeighbor].Load(hRead);
	}

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

	for ( uint32 iViewNode = 0 ; iViewNode < kMaxViewNodes ; iViewNode++ )
	{
		LOAD_DWORD(m_adwViewNodes[iViewNode]);
	}
}
Ejemplo n.º 26
0
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();
}
Ejemplo n.º 27
0
void CCharacterHitBox::Load(ILTMessage_Read *pMsg)
{
	AIASSERT( pMsg, m_hObject, "Load with no pMsg" );
	if (!pMsg)
	{
		return;
	}

	LOAD_HOBJECT(m_hModel);
	LOAD_VECTOR(m_vOffset);
	LOAD_BOOL(m_bCanActivate);
	LOAD_bool( m_bAnimControlsDims );
	LOAD_bool( m_bAnimControlsOffset );
	LOAD_bool( m_bFollowVisNode );
	LOAD_DWORD_CAST( m_hControllingAnim, HMODELANIM );

	m_pHitBoxUser = dynamic_cast<IHitBoxUser*>(g_pLTServer->HandleToObject(m_hModel));
	AIASSERT( m_pHitBoxUser, m_hModel, "Unable to get the HitBoxUser interface from m_hModel." );
}
Ejemplo n.º 28
0
void CAIHelicopterStateGoto::Load(HMESSAGEREAD hRead)
{
	CAIHelicopterState::Load(hRead);

	m_pStrategyFollowPath->Load(hRead);

	LOAD_VECTOR(m_vDest);
	LOAD_DWORD(m_cNodes);
	LOAD_DWORD(m_iNextNode);
	LOAD_BOOL(m_bLoop);

    int iNode;
    for ( iNode = 0 ; iNode < m_cNodes ; iNode++ )
	{
		LOAD_DWORD(m_adwNodes[iNode]);
	}

	for ( iNode = m_cNodes ; iNode < kMaxGotoNodes ; iNode++ )
	{
		m_adwNodes[iNode] = CAINode::kInvalidNodeID;
	}
}
Ejemplo n.º 29
0
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( );
	}

}
Ejemplo n.º 30
0
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);
}