Пример #1
0
void			CIPLEntry_PATH_Node::unserialize(void)
{
	CDataReader *pDataReader = CDataReader::getInstance();

	if (getLatestPathGroup() == nullptr)
	{
		// path node found before path group
		throw EXCEPTION_INVALID_DATA_ORDER;
	}

	switch (pDataReader->getLineTokens().size())
	{
	case 12:
		CIPLEntry_PATH::unserialize();

		setFormatType(0);
		setFormatGames(GAME_FLAG_GTA_VC);

		m_uiNodeType = pDataReader->readTokenUint32();
		m_uiNextNode = pDataReader->readTokenUint32();
		m_uiIsCrossRoad = pDataReader->readTokenUint32();
		m_vecPosition = pDataReader->readTokenVector3D() / 16.0f;
		m_fMedian = pDataReader->readTokenFloat32();
		m_uiLeftLaneCount = pDataReader->readTokenUint32();
		m_uiRightLaneCount = pDataReader->readTokenUint32();
		m_uiSpeedLimit = pDataReader->readTokenUint32();
		m_uiFlags = pDataReader->readTokenUint32();
		m_fSpawnRate = pDataReader->readTokenFloat32();
		break;
	}

	getLatestPathGroup()->addEntry(this);
}
Пример #2
0
void			CIPLEntry_JUMP::unserialize(void)
{
    CDataReader *pDataReader = CDataReader::getInstance();

    switch (pDataReader->getLineTokens().size())
    {
    case 16:
        setFormatType(0);
        setFormatGames(GAME_FLAG_GTA_SA);

        m_vecStartLowerPosition = pDataReader->readTokenVector3D();
        m_vecStartUpperPosition = pDataReader->readTokenVector3D();
        m_vecTargetLowerPosition = pDataReader->readTokenVector3D();
        m_vecTargetUpperPosition = pDataReader->readTokenVector3D();
        m_vecCameraPosition = pDataReader->readTokenVector3D();
        m_uiReward = pDataReader->readTokenUint32();
        break;
    default:
        throw EXCEPTION_UNKNOWN_FORMAT_TYPE;
    }
}
Пример #3
0
void			CIPLEntry_PICK::unserialize(void)
{
	CDataReader *pDataReader = CDataReader::getInstance();

	switch (pDataReader->getLineTokens().size())
	{
	case 4:
		setFormatType(0);
		setFormatGames(GAME_FLAG_GTA_SA);

		m_uiWeaponId = pDataReader->readTokenUint32();
		m_vecPosition = pDataReader->readTokenVector3D();
		break;
	default:
		throw EXCEPTION_UNKNOWN_FORMAT_TYPE;
	}
}
Пример #4
0
void			CIPLEntry_TCYC::unserialize(void)
{
	CDataReader *pDataReader = CDataReader::getInstance();

	switch (pDataReader->getLineTokens().size())
	{
	case 11:
		setFormatType(0);
		setFormatGames(GAME_FLAG_GTA_SA);

		m_vecPositionLower = pDataReader->readTokenVector3D();
		m_vecPositionUpper = pDataReader->readTokenVector3D();
		m_uiUnknown1 = pDataReader->readTokenUint32();
		m_uiWeatherId = pDataReader->readTokenUint32();
		m_iBrightness = pDataReader->readTokenInt32();
		m_uiTime = pDataReader->readTokenUint32();
		m_uiDrawDistance = pDataReader->readTokenUint32();
		break;
	default:
		throw EXCEPTION_UNKNOWN_FORMAT_TYPE;
	}
}