コード例 #1
0
ファイル: WeaponItems.cpp プロジェクト: Arc0re/lithtech
void WeaponItem::Load(ILTMessage_Read *pMsg, uint32 dwLoadFlags)
{
	if (!pMsg) return;

    LOAD_BYTE(m_nWeaponId);
    LOAD_BYTE(m_nAmmoId);
    LOAD_INT(m_nAmmo);
}
コード例 #2
0
ファイル: TronPlayerObj.cpp プロジェクト: Arc0re/lithtech
// ----------------------------------------------------------------------- //
//
//	ROUTINE:	CTronPlayerObj::Load
//
//	PURPOSE:	Load the object
//
// ----------------------------------------------------------------------- //
void CTronPlayerObj::Load(ILTMessage_Read *pMsg, uint32 dwLoadFlags)
{
	for(int i=0;i<NUM_RATINGS;i++)
	{
		LOAD_BYTE(m_iPerformanceRatings[i]);
	}
	LOAD_BYTE(m_byPSets);
	LOAD_BYTE(m_byOldPSets);
	LOAD_BYTE(m_nArmorPercentage);
	LOAD_WORD(m_nBuildPoints);
	LOAD_WORD(m_nOldBuildPoints);

	CPlayerObj::Load(pMsg, dwLoadFlags);
}
コード例 #3
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);
}
コード例 #4
0
ファイル: TextureFX.cpp プロジェクト: Arc0re/lithtech
void TextureFX::Load(ILTMessage_Read *pMsg, uint32 dwLoadFlags)
{
 	if (!pMsg) 
		return;

	//read in the changed flag and the values
	for(uint32 nCurrStage = 0; nCurrStage < NUM_STAGES; nCurrStage++)
	{
		//read in the ID
		LOAD_DWORD(m_Stages[nCurrStage].m_nID);

		//read in the changed
		LOAD_BYTE(m_Stages[nCurrStage].m_nChanged);

		//read in the variables
		for(uint32 nCurrVar = 0; nCurrVar < NUM_VARS; nCurrVar++)
		{
			if(m_Stages[nCurrStage].m_nChanged & (1 << nCurrVar))
			{
				//only read it in if it was flagges as being changed
				LOAD_FLOAT(m_Stages[nCurrStage].m_fVars[nCurrVar]);
			}
		}
	}

	m_bClientNeedsUpdate = true;
	SetNextUpdate(UPDATE_NEXT_FRAME);
}
コード例 #5
0
ファイル: PickupItem.cpp プロジェクト: Arc0re/lithtech
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);
	}
}
コード例 #6
0
void CDestructibleModel::Load(ILTMessage_Read *pMsg, uint32 dwLoadFlags)
{
	if (!g_pLTServer || !pMsg) return;

	LOAD_BYTE( m_nDebrisId );
	LOAD_BOOL( m_bCreatedDebris );
	LOAD_BOOL( m_bCreateExplosion );
	LOAD_BYTE( m_nExplosionWeaponId );
	LOAD_BOOL( m_bFireAlongForward );
	LOAD_FLOAT( m_fDamageFactor );
	LOAD_BOOL( m_bRemoveOnDeath );
	LOAD_HSTRING( m_hstrSpawn );
	LOAD_HSTRING( m_hstrSurfaceOverride );
	LOAD_DWORD( m_dwOriginalFlags );
	LOAD_BOOL( m_bSaveNeverDestroy );
	LOAD_BOOL( m_bSaveCanDamage );
	LOAD_DWORD_CAST( m_eStimID, EnumAIStimulusID );
	LOAD_FLOAT( m_fStimRadius );
	LOAD_DWORD( m_nDestroyAlarmLevel );
}
コード例 #7
0
void DynamicOccluderVolume::Load( ILTMessage_Read *pMsg, uint32 dwLoadFlags )
{
	ASSERT( pMsg != LTNULL );

	LOAD_BYTE( m_nNumOccluders );

	uint32 i;
	for ( i=0; i < m_nNumOccluders; i++)
	{
		LOAD_INT(m_nOccluderIds[i]);
	}

	LOAD_BYTE( m_nNumRenderGroups );

	for ( i=0; i < m_nNumRenderGroups; i++)
	{
		LOAD_INT(m_nRenderGroups[i]);
	}

}
コード例 #8
0
void DynamicSectorVolume::Load( ILTMessage_Read *pMsg, uint32 /*dwLoadFlags*/ )
{
	ASSERT( pMsg != NULL );

	LOAD_BYTE( m_nNumSectors );

	uint32 i;
	for ( i=0; i < m_nNumSectors; i++)
	{
		LOAD_INT(m_nSectorIds[i]);
	}
}
コード例 #9
0
bool CDoomsDayMissionMgr::Load( ILTMessage_Read& msg, uint32 dwSaveFlags )
{
	if( !CServerMissionMgr::Load( msg, dwSaveFlags ))
		return false;

	ILTMessage_Read* pMsg = &msg;

	LOAD_BYTE( m_nActivatingTeam );
	LOAD_bool( m_bNextRound );

	return true;
}
コード例 #10
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 );
}
コード例 #11
0
ファイル: DestructibleModel.cpp プロジェクト: Arc0re/lithtech
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 );
}
コード例 #12
0
ファイル: PlayerVehicle.cpp プロジェクト: Arc0re/lithtech
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);
}
コード例 #13
0
ファイル: DisplayMeter.cpp プロジェクト: Arc0re/lithtech
void DisplayMeter::Load(HMESSAGEREAD hRead)
{
	if (!hRead) return;

	LOAD_BOOL(m_bRemoveWhenEmpty);
	LOAD_BYTE(m_nValue);

	for (int i=0; i < DM_MAX_NUMBER_OF_PHASES; i++)
	{
		m_PhaseData[i].Load(hRead);
	}

	if (m_nValue > 0)
	{
		UpdateClients();
	}
}
コード例 #14
0
ファイル: DoomsDayDevice.cpp プロジェクト: emoose/lithtech
void DoomsDayDevice::Load(ILTMessage_Read *pMsg, uint32 dwLoadFlags)
{
	if( !pMsg )
		return;

	LOAD_BYTE_CAST( m_eDoomsDayDeviceState, DoomsDayDeviceState );
	m_Timer.Load( pMsg );
	LOAD_BYTE( m_nOwningTeamID );
	LOAD_FLOAT( m_fDropZoneRadius );

	uint32 dwTargets;
	LOAD_DWORD( dwTargets );

	for( uint32 i = 0; i < dwTargets; ++i )
	{
		LOAD_HOBJECT( m_lsthTargets[i] );
	}
}
コード例 #15
0
ファイル: Camera.cpp プロジェクト: Arc0re/lithtech
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 );
}
コード例 #16
0
ファイル: DisplayTimer.cpp プロジェクト: emoose/lithtech
void DisplayTimer::Load(ILTMessage_Read *pMsg)
{
	if (!pMsg) return;

	LOAD_HSTRING(m_hstrStartCmd);
	LOAD_HSTRING(m_hstrEndCmd);
	LOAD_BOOL(m_bRemoveWhenDone);

	m_Timer.Load(pMsg);

	if( g_pVersionMgr->GetCurrentSaveVersion( ) > CVersionMgr::kSaveVersion__1_2 )
	{
		LOAD_BYTE( m_nTeamId );
	}

	if (m_Timer.GetDuration() > 0.0f)
	{
		UpdateClients();
	}
}
コード例 #17
0
ファイル: ModItem.cpp プロジェクト: jordandavidson/lithtech
void ModItem::Load(ILTMessage_Read *pMsg, uint32 dwLoadFlags)
{
    if (!pMsg) return;

    LOAD_BYTE(m_nModId);
}
コード例 #18
0
ファイル: WorldModel.cpp プロジェクト: rickyharis39/nolf2
void WorldModel::OnLoad( ILTMessage_Read *pMsg, uint32 dwSaveFlags )
{
	ASSERT( pMsg != NULL );

	m_ActivateTypeHandler.Load( pMsg );

	LOAD_bool( m_bIsKeyframed );
	LOAD_bool( m_bStartHidden );
	LOAD_HSTRING( m_hstrAttachments );
	LOAD_BOOL( m_bRemoveAttachments );
	LOAD_VECTOR( m_vAttachDir );
	LOAD_HOBJECT( m_hAttachDirObj );
	LOAD_ROTATION( m_hackInitialRot );
	LOAD_FLOAT( m_fStimRadius );
	LOAD_HOBJECT( m_hActivateParent );
	LOAD_bool( m_bCanActivate );

	// Load the object lists last...
	uint8	nObjsInList = 0;

	// First the Attachment list
	LOAD_BYTE( nObjsInList );
	m_AttachmentList.clear( );
	if( nObjsInList > 0 )
	{
		LTObjRefNotifier ref( *this );
		for( uint8 i = 0; i < nObjsInList; ++i )
		{
			LOAD_HOBJECT( ref );
			if( ref )
			{
				m_AttachmentList.push_back( ref );
			}
		}
	}

	// Then the other attachment list
	LOAD_BYTE( nObjsInList );
	m_AttachMsgObjList.clear( );
	if( nObjsInList > 0 )
	{
		LTObjRefNotifier ref( *this );
		for( uint8 i = 0; i < nObjsInList; ++i )
		{
			LOAD_HOBJECT( ref );
			if( ref )
			{
				m_AttachMsgObjList.push_back( ref );
			}
		}
	}

	// Then the Mark list
	LOAD_BYTE( nObjsInList );
	m_MarkList.clear( );
	if( nObjsInList > 0 )
	{
		LTObjRefNotifier ref( *this );
		for( uint8 i = 0; i < nObjsInList; ++i )
		{
			LOAD_HOBJECT( ref );
			if( ref )
			{
				m_MarkList.push_back( ref );
			}
		}
	}
}