Exemple #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 ));
	}
}
Exemple #2
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);
	}
}
Exemple #3
0
void GunMount::Load(ILTMessage_Read *pMsg, uint32 dwLoadFlags)
{
	if( !pMsg )
		return;

	char szString[256];

	LOAD_CHARSTRING( szString, ARRAY_LEN( szString ));
	m_sWeapon = szString;

	LOAD_DWORD_CAST( m_nRoundsToFire, int32 );
	LOAD_BYTE_CAST( m_eFiringState, FiringState );
	LOAD_bool( m_bVisible );

	// Restart the firing state.
	switch( m_eFiringState )
	{
		case eNotFiring:
		case ePostFiring:
			StartNotFiring( );
			break;
		case ePreFiring:
		case eFiring:
			StartPreFiring( );
			break;
	}
}
Exemple #4
0
void PropType::Load(ILTMessage_Read *pMsg, uint32 dwLoadFlags)
{
	if (!pMsg)
		return;

	if( g_pVersionMgr->GetCurrentSaveVersion( ) > CVersionMgr::kSaveVersion__1_2 )
	{
		char szPropType[256] = "";
		LOAD_CHARSTRING( szPropType, ARRAY_LEN( szPropType ));
	}
}
void CDestructibleModel::Load(ILTMessage_Read *pMsg, uint32 dwLoadFlags)
{
	if (!g_pLTServer || !pMsg) return;

	LOAD_BYTE( m_DestructibleModelFlags );
	LOAD_DWORD( m_dwOriginalFlags );
	LOAD_DWORD_CAST( m_eStimID, EnumAIStimulusID );
	LOAD_FLOAT( m_fStimRadius );
	LOAD_DWORD( m_nDestroyAlarmLevel );
	char szString[2048];
	LOAD_CHARSTRING( szString, LTARRAYSIZE( szString ));
	delete[] m_pszDestroyedFXName;
	m_pszDestroyedFXName = LTStrDup( szString );
}
Exemple #6
0
void SpecialFX::OnLoad(ILTMessage_Read *pMsg, uint32 dwFlags)
{
	LOAD_CHARSTRING(m_sFxName, 128);
	LOAD_DWORD(m_dwFxFlags);
	LOAD_bool(m_bStartOn);
	LOAD_bool(m_bLoop);
	LOAD_bool(m_bIsOn);
	LOAD_bool(m_bOneTime);
	LOAD_HSTRING(m_hstrTargetName);
	LOAD_HOBJECT(m_hTargetObj);
	LOAD_bool(m_bRemoveTarget);

	if (!m_bLoop)
	{
		g_pCommonLT->SetObjectFlags(m_hObject, OFT_Flags, 0, FLAGMASK_ALL);
		SetNextUpdate(UPDATE_NEVER);
	}
}
Exemple #7
0
void PropDisturbStruct::Load(ILTMessage_Read *pMsg)
{
	char szBuf[256];
	LOAD_CHARSTRING( szBuf, ARRAY_LEN( szBuf ) );
	sTouchSoundName = szBuf;
	LOAD_DWORD_CAST( eTouchAnimType, EnumPropAnimationType );
	LOAD_DWORD( hTouchAnim );
	LOAD_DWORD( hHitAnim );

	uint32 nPropTypeId;
	LOAD_DWORD(nPropTypeId);
	if( nPropTypeId != -1 )
	{
		PROPTYPE* pPropType = g_pPropTypeMgr->GetPropType( nPropTypeId );
		UBER_ASSERT( pPropType, "PropDisturbStruct::Load: Could not find proptype" );
		pPD = pPropType->pDisturb;
	}
}
void RelationDescription::Load(ILTMessage_Read *pMsg)
{
    LOAD_BYTE_CAST( eTrait, RelationTraits::eRelationTraits );
    LOAD_CHARSTRING( szValue, sizeof(szValue) );
    LOAD_BYTE_CAST( eAlignment, CharacterAlignment );
}
Exemple #9
0
void Prop::Load(ILTMessage_Read *pMsg, uint32 dwLoadFlags)
{
	if (!pMsg) return;

	m_ActivateTypeHandler.Load( pMsg );

	LOAD_FLOAT(m_fAlpha);
    LOAD_BOOL(m_bMoveToFloor);
    LOAD_BOOL(m_bFirstUpdate);
	LOAD_bool( m_bCanDeactivate );
    LOAD_VECTOR(m_vScale);
    LOAD_VECTOR(m_vObjectColor);

	m_damage.Load(pMsg, dwLoadFlags);
	LOAD_BOOL(m_bTouchable);
	LOAD_DWORD_CAST(m_eState, EnumAIStateType);

/* THESE SHOULD NOT NEED TO BE SAVED - THEY ARE USED FOR INITIALIZING THE OBJECT ONLY!!!
// 8/4/02 - Remove after testing
	LOAD_DWORD(m_dwUsrFlgs);
	LOAD_DWORD(m_dwFlags);
	LOAD_DWORD(m_dwFlags2);
*/

	HMODELANIM hWorldAnim;
	uint32 cWorldAnims;
	LOAD_DWORD(cWorldAnims);
	for( uint32 iWorldAnim = 0; iWorldAnim < cWorldAnims; ++iWorldAnim )
	{
		LOAD_DWORD(hWorldAnim);
		m_lstWorldAnims.push_back(hWorldAnim);
	}

	if (pMsg->Readbool())
	{
		if(m_pDisturb == LTNULL)
		{
			m_pDisturb = debug_new(PropDisturbStruct);
		}
		m_pDisturb->Load(pMsg);
	}

	LOAD_bool( m_bActivatedOn );

	char szString[1024];

	LOAD_CHARSTRING( szString, ARRAY_LEN( szString ));
	m_sActivateOnCommand = szString;

	LOAD_CHARSTRING( szString, ARRAY_LEN( szString ));
	m_sActivateOffCommand = szString;

	LOAD_bool( m_bAttachmentShotOff );
	LOAD_HOBJECT( m_hAttachmentOwner );
	
	LOAD_FLOAT( m_fPitch );
	LOAD_FLOAT( m_fYaw );
	LOAD_FLOAT( m_fRoll );
	LOAD_FLOAT( m_fPitchVel );
	LOAD_FLOAT( m_fYawVel );
	LOAD_FLOAT( m_fRollVel );
	LOAD_bool( m_bRotatedToRest );
	LOAD_bool( m_bRotating );

	LOAD_bool( m_bFading );
	LOAD_FLOAT( m_fFadeStartTime );
	LOAD_FLOAT( m_fFadeDuration );
	LOAD_FLOAT( m_fStartAlpha );
	LOAD_FLOAT( m_fEndAlpha );
	LOAD_bool( m_bFadeRemoveWhenDone );

	LOAD_bool( m_bCanTransition );

	// We must remove aggregates before sending the message to the base classs...

	if( !m_bCanTransition )
	{
		// Disallow transitioning of this object through TransAMs...

		DestroyTransitionAggregate();
	}
}