Exemple #1
0
LTBOOL ServerOption::InitializeFromBute(CButeMgr & buteMgr, const char* aTagName)
{
    if (!aTagName) return LTFALSE;


	CString str = buteMgr.GetString(aTagName, SO_VARIABLE);
	if (!str.IsEmpty())
	{
		strncpy(szVariable, (char*)(LPCSTR)str, sizeof(szVariable));
	}
	else
        szVariable[0] = LTNULL;

	str = buteMgr.GetString(aTagName, SO_SERV_VARIABLE);
	if (!str.IsEmpty())
	{
		strncpy(szServVariable, (char*)(LPCSTR)str, sizeof(szServVariable));
	}
	else
        strncpy(szServVariable, szVariable, sizeof(szServVariable));

	nNameId = buteMgr.GetInt(aTagName, SO_NAME,0);
	nHelpId = buteMgr.GetInt(aTagName, SO_HELP,0);
	eType = (eOptionType) buteMgr.GetInt(aTagName, SO_TYPE,(int)SO_UNKNOWN);
	eGameType = (GameType) buteMgr.GetInt(aTagName, SO_GAME_TYPE,(int)SINGLE);

	nNumStrings = 0;
	str = buteMgr.GetString(aTagName, SO_STRINGS);
	if (!str.IsEmpty())
	{
		char szTemp[128];
		char *pNum;
		strncpy(szTemp, (char*)(LPCSTR)str, sizeof(szTemp));

		pNum = strtok(szTemp,",");
		while (pNum && nNumStrings < SO_MAX_STRINGS)
		{
			nStringId[nNumStrings] = atoi(pNum);
			nNumStrings++;
			pNum = strtok(NULL,",");
		}
	}


	for (int i = nNumStrings; i < SO_MAX_STRINGS; i++)
		nStringId[i] = 0;

    CPoint zero(0, 0);
    CPoint tmp = buteMgr.GetPoint(aTagName, SO_RANGE, zero);
	nSliderMin = tmp.x;
	nSliderMax = tmp.y;

	nSliderInc = buteMgr.GetInt(aTagName, SO_INCREMENT,0);
    fSliderScale = (LTFLOAT)buteMgr.GetDouble(aTagName, SO_SCALE,1.0f);

    fDefault = fSliderScale * (LTFLOAT)buteMgr.GetDouble(aTagName, SO_DEFAULT,0.0f);

    return LTTRUE;
}
Exemple #2
0
LTBOOL CScaleFX::Init(CButeMgr & buteMgr, char* aTagName)
{
    if (!aTagName) return LTFALSE;

	eType			= (ScaleFXType) buteMgr.GetInt(aTagName, SCALEFX_TYPE);
    fInitialAlpha   = (LTFLOAT) buteMgr.GetDouble(aTagName, SCALEFX_INITIALALPHA);
    fFinalAlpha     = (LTFLOAT) buteMgr.GetDouble(aTagName, SCALEFX_FINALALPHA);
    fDirOffset      = (LTFLOAT) buteMgr.GetDouble(aTagName, SCALEFX_DIROFFSET);
    fDirROffset     = (LTFLOAT) buteMgr.GetDouble(aTagName, SCALEFX_DIRROFFSET);
    fDirUOffset     = (LTFLOAT) buteMgr.GetDouble(aTagName, SCALEFX_DIRUOFFSET);
    fLifeTime       = (LTFLOAT) buteMgr.GetDouble(aTagName, SCALEFX_LIFETIME);
    fDelayTime      = (LTFLOAT) buteMgr.GetDouble(aTagName, SCALEFX_DELAYTIME);
    fMinRotVel      = (LTFLOAT) buteMgr.GetDouble(aTagName, SCALEFX_MINROTVEL);
    fMaxRotVel      = (LTFLOAT) buteMgr.GetDouble(aTagName, SCALEFX_MAXROTVEL);
    bUseColors      = (LTBOOL) buteMgr.GetInt(aTagName, SCALEFX_USECOLORS);
    bLoop           = (LTBOOL) buteMgr.GetInt(aTagName, SCALEFX_LOOP);
    bAlignToSurface = (LTBOOL) buteMgr.GetInt(aTagName, SCALEFX_ALIGNTOSURFACE);
    bNoZ            = (LTBOOL) buteMgr.GetInt(aTagName, SCALEFX_SPRITENOZ);
    bReallyClose    = (LTBOOL) buteMgr.GetInt(aTagName, SCALEFX_MODELREALLYCLOSE);
    bAdditive       = (LTBOOL) buteMgr.GetInt(aTagName, SCALEFX_ADDITIVE);
    bMultiply       = (LTBOOL) buteMgr.GetInt(aTagName, SCALEFX_MULTIPLY);
    bChromakey      = (LTBOOL) buteMgr.GetInt(aTagName, SCALEFX_CHROMAKEY);
    bRotate         = (LTBOOL) buteMgr.GetInt(aTagName, SCALEFX_ROTATE);
    bFaceCamera     = (LTBOOL) buteMgr.GetInt(aTagName, SCALEFX_FACECAMERA);
    nRotationAxis   = buteMgr.GetInt(aTagName, SCALEFX_ROTAXIS);

	vInitialScale	= buteMgr.GetVector(aTagName, SCALEFX_INITIALSCALE);
	vFinalScale		= buteMgr.GetVector(aTagName, SCALEFX_FINALSCALE);
	vInitialColor	= buteMgr.GetVector(aTagName, SCALEFX_INITIALCOLOR);
	vInitialColor /= 255.0f;

	vFinalColor		= buteMgr.GetVector(aTagName, SCALEFX_FINALCOLOR);
	vFinalColor /= 255.0f;

	vVel			= buteMgr.GetVector(aTagName, SCALEFX_VELOCITY);

	CString str = buteMgr.GetString(aTagName, SCALEFX_FILE);
	if (!str.IsEmpty())
	{
		strncpy(szFile, (char*)(LPCSTR)str, ARRAY_LEN(szFile));
	}

	str = buteMgr.GetString(aTagName, SCALEFX_SKIN);
	if (!str.IsEmpty())
	{
		strncpy(szSkin, (char*)(LPCSTR)str, ARRAY_LEN(szSkin));
	}

	str = buteMgr.GetString(aTagName, SCALEFX_NAME);
	if (!str.IsEmpty())
	{
		strncpy(szName, (char*)(LPCSTR)str, ARRAY_LEN(szName));
	}

    return LTTRUE;
}
Exemple #3
0
LTBOOL CPShowerFX::Init(CButeMgr & buteMgr, char* aTagName)
{
    if (!aTagName) return LTFALSE;

	nMinParticles		= buteMgr.GetInt(aTagName, PSHOWERFX_MINPARTICLES);
	nMaxParticles		= buteMgr.GetInt(aTagName, PSHOWERFX_MAXPARTICLES);
    fMinVel             = (LTFLOAT) buteMgr.GetDouble(aTagName, PSHOWERFX_MINVEL);
    fMaxVel             = (LTFLOAT) buteMgr.GetDouble(aTagName, PSHOWERFX_MAXVEL);
    fDirOffset          = (LTFLOAT) buteMgr.GetDouble(aTagName, PSHOWERFX_DIROFFSET);
    fMinDuration        = (LTFLOAT) buteMgr.GetDouble(aTagName, PSHOWERFX_MINDURATION);
    fMaxDuration        = (LTFLOAT) buteMgr.GetDouble(aTagName, PSHOWERFX_MAXDURATION);
    fEmissionRadius     = (LTFLOAT) buteMgr.GetDouble(aTagName, PSHOWERFX_EMISSIONRADIUS);
    fRadius             = (LTFLOAT) buteMgr.GetDouble(aTagName, PSHOWERFX_RADIUS);
    fGravity            = (LTFLOAT) buteMgr.GetDouble(aTagName, PSHOWERFX_GRAVITY);
	vColor1				= buteMgr.GetVector(aTagName, PSHOWERFX_COLOR1);
	vColor2				= buteMgr.GetVector(aTagName, PSHOWERFX_COLOR2);
    bAdditive           = (LTBOOL) buteMgr.GetInt(aTagName, PSHOWERFX_ADDITIVE);
    bMultiply           = (LTBOOL) buteMgr.GetInt(aTagName, PSHOWERFX_MULTIPLY);

	CString str = buteMgr.GetString(aTagName, PSHOWERFX_TEXTURE);
	if (!str.IsEmpty())
	{
		strncpy(szTexture, (char*)(LPCSTR)str, ARRAY_LEN(szTexture));
	}

	str = buteMgr.GetString(aTagName, PSHOWERFX_NAME);
	if (!str.IsEmpty())
	{
		strncpy(szName, (char*)(LPCSTR)str, ARRAY_LEN(szName));
	}

    return LTTRUE;
}
LTBOOL SOUNDFILTER::Init(CButeMgr & buteMgr, char* aTagName)
{
    if (!aTagName) return LTFALSE;

    CString str = buteMgr.GetString(aTagName, SFM_NAME);
    if (!str.IsEmpty())
    {
        strncpy(szName, (char*)(LPCSTR)str, ARRAY_LEN(szName));
    }

    str = buteMgr.GetString(aTagName, SFM_FILTERNAME);
    if (!str.IsEmpty())
    {
        strncpy(szFilterName, (char*)(LPCSTR)str, ARRAY_LEN(szFilterName));
    }

    int i;
    for (i=0; i < SFM_MAX_VARIABLES; i++)
    {
        sprintf(s_aAttName, "%s%d", SFM_VARIABLE, i);

        if (buteMgr.Exist(aTagName, s_aAttName))
        {
            str = buteMgr.GetString(aTagName, s_aAttName);
            if (!str.IsEmpty())
            {
                strncpy(szVars[i], (char*)(LPCSTR)str, ARRAY_LEN(szVars[i]));
            }
            nNumVars++;
        }
    }

    int nNumValues = 0;
    for (i=0; i < SFM_MAX_VARIABLES; i++)
    {
        sprintf(s_aAttName, "%s%d", SFM_VALUE, i);

        if (buteMgr.Exist(aTagName, s_aAttName))
        {
            fValues[i] = (LTFLOAT) buteMgr.GetDouble(aTagName, s_aAttName);
            nNumValues++;
        }
    }

    if (nNumVars != nNumValues)
    {
        _ASSERT(LTFALSE);
        return LTFALSE;
    }

    return LTTRUE;
}
Exemple #5
0
LTBOOL CPolyDebrisFX::Init(CButeMgr & buteMgr, char* aTagName)
{
    if (!aTagName) return LTFALSE;

	nStyle			= buteMgr.GetInt(aTagName, POLYDEBRISFX_STYLE);
	nMinDebris		= buteMgr.GetInt(aTagName, POLYDEBRISFX_MINDEBRIS);
	nMaxDebris		= buteMgr.GetInt(aTagName, POLYDEBRISFX_MAXDEBRIS);
	nMinBounce		= buteMgr.GetInt(aTagName, POLYDEBRISFX_MINBOUNCE);
	nMaxBounce		= buteMgr.GetInt(aTagName, POLYDEBRISFX_MAXBOUNCE);
    bAdditive       = (LTBOOL) buteMgr.GetInt(aTagName, POLYDEBRISFX_ADDITIVE);
    bMultiply       = (LTBOOL) buteMgr.GetInt(aTagName, POLYDEBRISFX_MULTIPLY);
    bShowTrail      = (LTBOOL) buteMgr.GetInt(aTagName, POLYDEBRISFX_SHOWTRAIL);
    bDirOffsetOnly  = (LTBOOL) buteMgr.GetInt(aTagName, POLYDEBRISFX_DIROFFSETONLY);
    fDirOffset      = (LTFLOAT) buteMgr.GetDouble(aTagName, POLYDEBRISFX_DIROFFSET);
    fGravityScale   = (LTFLOAT) buteMgr.GetDouble(aTagName, POLYDEBRISFX_GRAVITYSCALE);
    fMinDuration    = (LTFLOAT) buteMgr.GetDouble(aTagName, POLYDEBRISFX_MINDURATION);
    fMaxDuration    = (LTFLOAT) buteMgr.GetDouble(aTagName, POLYDEBRISFX_MAXDURATION);
    fInitialAlpha   = (LTFLOAT) buteMgr.GetDouble(aTagName, POLYDEBRISFX_INITIALALPHA);
    fFinalAlpha     = (LTFLOAT) buteMgr.GetDouble(aTagName, POLYDEBRISFX_FINALALPHA);
    fMinWidth       = (LTFLOAT) buteMgr.GetDouble(aTagName, POLYDEBRISFX_MINWIDTH);
    fMaxWidth       = (LTFLOAT) buteMgr.GetDouble(aTagName, POLYDEBRISFX_MAXWIDTH);
    fMinLength      = (LTFLOAT) buteMgr.GetDouble(aTagName, POLYDEBRISFX_MINLENGTH);
    fMaxLength      = (LTFLOAT) buteMgr.GetDouble(aTagName, POLYDEBRISFX_MAXLENGTH);
	vMinColor1		= buteMgr.GetVector(aTagName, POLYDEBRISFX_MINCOLOR1);
	vMaxColor1		= buteMgr.GetVector(aTagName, POLYDEBRISFX_MAXCOLOR1);
	vMinColor2		= buteMgr.GetVector(aTagName, POLYDEBRISFX_MINCOLOR2);
	vMaxColor2		= buteMgr.GetVector(aTagName, POLYDEBRISFX_MAXCOLOR2);
	vMinVel			= buteMgr.GetVector(aTagName, POLYDEBRISFX_MINVEL);
	vMaxVel			= buteMgr.GetVector(aTagName, POLYDEBRISFX_MAXVEL);
	vMinDOffset		= buteMgr.GetVector(aTagName, POLYDEBRISFX_MINDOFFSET);
	vMaxDOffset		= buteMgr.GetVector(aTagName, POLYDEBRISFX_MAXDOFFSET);

	CString str = buteMgr.GetString(aTagName, POLYDEBRISFX_NAME);
	if (!str.IsEmpty())
	{
		strncpy(szName, (char*)(LPCSTR)str, ARRAY_LEN(szName));
	}

	str = buteMgr.GetString(aTagName, POLYDEBRISFX_TEXTURE);
	if (!str.IsEmpty())
	{
		strncpy(szTexture, (char*)(LPCSTR)str, ARRAY_LEN(szTexture));
	}

    return LTTRUE;
}
Exemple #6
0
LTBOOL SOUNDFILTER::Init(CButeMgr & buteMgr, char* aTagName)
{
    if (!aTagName) return LTFALSE;

	buteMgr.GetString(aTagName, SFM_NAME, szName, ARRAY_LEN(szName));
	buteMgr.GetString(aTagName, SFM_FILTERNAME, szFilterName, ARRAY_LEN(szFilterName));

    int i;
    for (i=0; i < SFM_MAX_VARIABLES; i++)
	{
		sprintf(s_aAttName, "%s%d", SFM_VARIABLE, i);
		buteMgr.GetString(aTagName, s_aAttName, "", szVars[i], ARRAY_LEN(szVars[i]));
		if (buteMgr.Success( ))
		{
			nNumVars++;
		}
	}

	int nNumValues = 0;
	for (i=0; i < SFM_MAX_VARIABLES; i++)
	{
		sprintf(s_aAttName, "%s%d", SFM_VALUE, i);
		fValues[i] = (LTFLOAT) buteMgr.GetDouble(aTagName, s_aAttName, 0.0 );
		if (buteMgr.Success( ))
		{
			nNumValues++;
		}
	}

	if (nNumVars != nNumValues)
	{
		_ASSERT(LTFALSE);
		return LTFALSE;
	}

    return LTTRUE;
}
Exemple #7
0
LTBOOL DEBRIS::Init(CButeMgr & buteMgr, char* aTagName)
{
    if (!aTagName) return LTFALSE;

	fMinScale	 = (float) buteMgr.GetDouble(aTagName, DEBRISMGR_DEBRIS_MINSCALE);
	fMaxScale	 = (float) buteMgr.GetDouble(aTagName, DEBRISMGR_DEBRIS_MAXSCALE);
	fMinLifetime = (float) buteMgr.GetDouble(aTagName, DEBRISMGR_DEBRIS_MINLIFETIME);
	fMaxLifetime = (float) buteMgr.GetDouble(aTagName, DEBRISMGR_DEBRIS_MAXLIFETIME);
	fFadetime	 = (float) buteMgr.GetDouble(aTagName, DEBRISMGR_DEBRIS_FADETIME);
	fGravityScale = (float) buteMgr.GetDouble(aTagName, DEBRISMGR_DEBRIS_GRAVITYSCALE);
	fAlpha		  = (float) buteMgr.GetDouble(aTagName, DEBRISMGR_DEBRIS_ALPHA);

	vMinVel		 = buteMgr.GetVector(aTagName, DEBRISMGR_DEBRIS_MINVEL);
	vMaxVel		 = buteMgr.GetVector(aTagName, DEBRISMGR_DEBRIS_MAXVEL);
	vMinDOffset	 = buteMgr.GetVector(aTagName, DEBRISMGR_DEBRIS_MINDOFFSET);
	vMaxDOffset	 = buteMgr.GetVector(aTagName, DEBRISMGR_DEBRIS_MAXDOFFSET);
	vMinWorldVel = buteMgr.GetVector(aTagName, DEBRISMGR_DEBRIS_MINWORLDVEL);
	vMaxWorldVel = buteMgr.GetVector(aTagName, DEBRISMGR_DEBRIS_MAXWORLDVEL);

	nNumber		 = buteMgr.GetInt(aTagName, DEBRISMGR_DEBRIS_NUMBER);
	nMinBounce	 = buteMgr.GetInt(aTagName, DEBRISMGR_DEBRIS_MINBOUNCE);
	nMaxBounce	 = buteMgr.GetInt(aTagName, DEBRISMGR_DEBRIS_MAXBOUNCE);

	//load in the impact effect
	buteMgr.GetString(aTagName, DEBRISMGR_DEBRIS_WORLDSPACEFX, szWorldSpaceFX, sizeof(szWorldSpaceFX));
	buteMgr.GetString(aTagName, DEBRISMGR_DEBRIS_IMPACTSPACEFX, szImpactSpaceFX, sizeof(szImpactSpaceFX));

	eSurfaceType = (SurfaceType) buteMgr.GetInt(aTagName, DEBRISMGR_DEBRIS_SURFACEID);
    bRotate      = (LTBOOL) buteMgr.GetInt(aTagName, DEBRISMGR_DEBRIS_ROTATE);

	buteMgr.GetString(aTagName, DEBRISMGR_DEBRIS_NAME, "" ,szName, ARRAY_LEN(szName));

	char szStr[128]="";
    int i;
    for (i=1; i <= DEBRIS_MAX_MODELS; i++)
	{
		sprintf(s_aAttName, "%s%d", DEBRISMGR_DEBRIS_MODEL, i);
		buteMgr.GetString(aTagName, s_aAttName,"",szStr,sizeof(szStr));

		if (strlen(szStr))
		{
			strncpy(szModel[i-1], szStr, ARRAY_LEN(szModel[i-1]));
			nNumModels++;
		}
	}

	blrSkinReader.Read(&buteMgr, s_aTagName, DEBRISMGR_DEBRIS_SKIN, DEBRIS_MAX_FILE_PATH);
	blrRenderStyleReader.Read(&buteMgr, s_aTagName, DEBRISMGR_DEBRIS_RENDERSTYLE, DEBRIS_MAX_FILE_PATH);

	for (i=1; i <= DEBRIS_MAX_BOUNCE_SNDS; i++)
	{
		sprintf(s_aAttName, "%s%d", DEBRISMGR_DEBRIS_BOUNCESND, i);
		buteMgr.GetString(aTagName, s_aAttName,"",szStr,sizeof(szStr));

		if (strlen(szStr))
		{
			strncpy(szBounceSnd[i-1], szStr, ARRAY_LEN(szBounceSnd[i-1]));
			nNumBounceSnds++;
		}
	}

	for (i=1; i <= DEBRIS_MAX_EXPLODE_SNDS; i++)
	{
		sprintf(s_aAttName, "%s%d", DEBRISMGR_DEBRIS_EXPLODESND, i);
		buteMgr.GetString(aTagName, s_aAttName,"",szStr,sizeof(szStr));

		if (strlen(szStr))
		{
			strncpy(szExplodeSnd[i-1], szStr, ARRAY_LEN(szExplodeSnd[i-1]));
			nNumExplodeSnds++;
		}
	}


    return LTTRUE;
}
Exemple #8
0
LTBOOL SURFACE::Init(CButeMgr & buteMgr, char* aTagName)
{
    if (!aTagName) return LTFALSE;

	eType					= (SurfaceType) buteMgr.GetInt(aTagName, SRFMGR_SURFACE_ID);
    bShowsMark              = (LTBOOL) buteMgr.GetInt(aTagName, SRFMGR_SURFACE_SHOWSMARK);
    bCanSeeThrough          = (LTBOOL) buteMgr.GetInt(aTagName, SRFMGR_SURFACE_CANSEETHROUGH);
    bCanShootThrough        = (LTBOOL) buteMgr.GetInt(aTagName, SRFMGR_SURFACE_CANSHOOTTHROUGH);
    bShowBreath             = (LTBOOL) buteMgr.GetInt(aTagName, SRFMGR_SURFACE_SHOWBREATH);
	nMaxShootThroughPerturb	= buteMgr.GetInt(aTagName, SRFMGR_SURFACE_MAXSHOOTTHROUGHPERTURB);
	nMaxShootThroughThickness= buteMgr.GetInt(aTagName, SRFMGR_SURFACE_MAXSHOOTTHROUGHTHICKNESS);
    fDeathNoiseModifier     = (LTFLOAT) buteMgr.GetDouble(aTagName, SRFMGR_SURFACE_DEATHNOISEMOD);
    fMovementNoiseModifier  = (LTFLOAT) buteMgr.GetDouble(aTagName, SRFMGR_SURFACE_MOVENOISEMOD);
    fImpactNoiseModifier    = (LTFLOAT) buteMgr.GetDouble(aTagName, SRFMGR_SURFACE_IMPACTNOISEMOD);
    fBodyFallSndRadius      = (LTFLOAT) buteMgr.GetDouble(aTagName, SRFMGR_SURFACE_BODYFALLSNDRADIUS);
    fBodyLedgeFallSndRadius = (LTFLOAT) buteMgr.GetDouble(aTagName, SRFMGR_SURFACE_BODYLEDGEFALLSNDRADIUS);
    fBulletHoleMinScale     = (LTFLOAT) buteMgr.GetDouble(aTagName, SRFMGR_SURFACE_BULLETHOLEMINSCALE);
    fBulletHoleMaxScale     = (LTFLOAT) buteMgr.GetDouble(aTagName, SRFMGR_SURFACE_BULLETHOLEMAXSCALE);
    fBulletRangeDampen      = (LTFLOAT) buteMgr.GetDouble(aTagName, SRFMGR_SURFACE_BULLETRANGEDAMPEN);
    fBulletDamageDampen     = (LTFLOAT) buteMgr.GetDouble(aTagName, SRFMGR_SURFACE_BULLETDAMAGEDAMPEN);
    fActivationSndRadius    = (LTFLOAT) buteMgr.GetDouble(aTagName, SRFMGR_SURFACE_ACTIVATIONSNDRADIUS);
    fShellSndRadius         = (LTFLOAT) buteMgr.GetDouble(aTagName, SRFMGR_SURFACE_SHELLSNDRADIUS);
    fGrenadeSndRadius       = (LTFLOAT) buteMgr.GetDouble(aTagName, SRFMGR_SURFACE_GRENADESNDRADIUS);
    fHardness               = (LTFLOAT) buteMgr.GetDouble(aTagName, SRFMGR_SURFACE_HARDNESS);
    fFootPrintLifetime      = (LTFLOAT) buteMgr.GetDouble(aTagName, SRFMGR_SURFACE_FOOTPRINTLIFETIME);
    fSnowVelMult			= (LTFLOAT) buteMgr.GetDouble(aTagName, SRFMGR_SURFACE_SNOWVELMULTIPLIER);
    bMagnetic               = (LTBOOL) buteMgr.GetInt(aTagName, SRFMGR_SURFACE_MAGNETIC);

	vFootPrintScale			= buteMgr.GetVector(aTagName, SRFMGR_SURFACE_FOOTPRINTSCALE);

	buteMgr.GetString(aTagName, SRFMGR_SURFACE_NAME, szName, ARRAY_LEN(szName));

	buteMgr.GetString(aTagName, SRFMGR_SURFACE_BULLETHOLESPR, szBulletHoleSpr, ARRAY_LEN(szBulletHoleSpr));

	buteMgr.GetString(aTagName, SRFMGR_SURFACE_RTFOOTPRINTSPR, szRtFootPrintSpr, ARRAY_LEN(szRtFootPrintSpr));

	buteMgr.GetString(aTagName, SRFMGR_SURFACE_LTFOOTPRINTSPR, szLtFootPrintSpr, ARRAY_LEN(szLtFootPrintSpr));

    int i;
    for (i=1; i <= SRF_MAX_FOOTSTEP_SNDS; i++)
	{
		sprintf(s_aAttName, "%s%d", SRFMGR_SURFACE_RTFOOTSND, i);
		buteMgr.GetString(aTagName, s_aAttName, szRtFootStepSnds[i-1], ARRAY_LEN(szRtFootStepSnds[i-1]));
	}

	for (i=1; i <= SRF_MAX_FOOTSTEP_SNDS; i++)
	{
		sprintf(s_aAttName, "%s%d", SRFMGR_SURFACE_LTFOOTSND, i);
		buteMgr.GetString(aTagName, s_aAttName, szLtFootStepSnds[i-1], ARRAY_LEN(szLtFootStepSnds[i-1]));
	}

	for (i=1; i <= SRF_MAX_SNOWMOBILE_SNDS; i++)
	{
		sprintf(s_aAttName, "%s%d", SRFMGR_SURFACE_SNOWMOBILESND, i);
		buteMgr.GetString(aTagName, s_aAttName, szSnowmobileSnds[i-1], ARRAY_LEN(szSnowmobileSnds[i-1]));
	}

	buteMgr.GetString(aTagName, SRFMGR_SURFACE_BODYFALLSND, szBodyFallSnd, ARRAY_LEN(szBodyFallSnd));

	buteMgr.GetString(aTagName, SRFMGR_SURFACE_BODYLEDGEFALLSND, szBodyLedgeFallSnd, ARRAY_LEN(szBodyLedgeFallSnd));

	buteMgr.GetString(aTagName, SRFMGR_SURFACE_ACTIVATIONSND, szActivationSnd, ARRAY_LEN(szActivationSnd));

	buteMgr.GetString(aTagName, SRFMGR_SURFACE_GRENADEIMPACTSND, szGrenadeImpactSnd, ARRAY_LEN(szGrenadeImpactSnd));

	for (i=1; i <= SRF_MAX_IMPACT_SNDS; i++)
	{
		sprintf(s_aAttName, "%s%d", SRFMGR_SURFACE_BULLETIMPACTSND, i);
		buteMgr.GetString(aTagName, s_aAttName, szBulletImpactSnds[i-1], ARRAY_LEN(szBulletImpactSnds[i-1]));
	}

	for (i=1; i <= SRF_MAX_IMPACT_SNDS; i++)
	{
		sprintf(s_aAttName, "%s%d", SRFMGR_SURFACE_PROJIMPACTSND, i);
		buteMgr.GetString(aTagName, s_aAttName, szProjectileImpactSnds[i-1], ARRAY_LEN(szProjectileImpactSnds[i-1]));
	}

	for (i=1; i <= SRF_MAX_IMPACT_SNDS; i++)
	{
		sprintf(s_aAttName, "%s%d", SRFMGR_SURFACE_MELEEIMPACTSND, i);
		buteMgr.GetString(aTagName, s_aAttName, szMeleeImpactSnds[i-1], ARRAY_LEN(szMeleeImpactSnds[i-1]));
	}

	for (i=1; i <= SRF_MAX_SHELL_SNDS; i++)
	{
		sprintf(s_aAttName, "%s%d", SRFMGR_SURFACE_SHELLIMPACTSND, i);
		buteMgr.GetString(aTagName, s_aAttName, szShellImpactSnds[i-1], ARRAY_LEN(szShellImpactSnds[i-1]));

	}


	// Read the name of our FxED created fx for Surface Impacts...

	buteMgr.GetString( aTagName, SRFMGR_SURFACE_IMPACTFXNAME, szImpactFXName, ARRAY_LEN( szImpactFXName ) );

	buteMgr.GetString( aTagName, SRFMGR_SURFACE_UWIMPACTFXNAME, szUWImpactFXName, ARRAY_LEN( szUWImpactFXName ));

	buteMgr.GetString( aTagName, SRFMGR_SURFACE_EXITFXNAME, szExitFXName, ARRAY_LEN( szExitFXName ));

	buteMgr.GetString( aTagName, SRFMGR_SURFACE_UWEXITFXNAME, szUWExitFXName, ARRAY_LEN( szUWExitFXName ));

	buteMgr.GetString( aTagName, SRFMGR_SURFACE_SNOWMOBILEIMPACTFXNAME, szSnowmobileImpactFXName, ARRAY_LEN( szSnowmobileImpactFXName ));

    return LTTRUE;
}
LTBOOL SURFACE::Init(CButeMgr & buteMgr, char* aTagName)
{
    if (!aTagName) return LTFALSE;

	eType					= (SurfaceType) buteMgr.GetInt(aTagName, SRFMGR_SURFACE_ID);
    bShowsMark              = (LTBOOL) buteMgr.GetInt(aTagName, SRFMGR_SURFACE_SHOWSMARK);
    bCanSeeThrough          = (LTBOOL) buteMgr.GetInt(aTagName, SRFMGR_SURFACE_CANSEETHROUGH);
    bCanShootThrough        = (LTBOOL) buteMgr.GetInt(aTagName, SRFMGR_SURFACE_CANSHOOTTHROUGH);
    bShowBreath             = (LTBOOL) buteMgr.GetInt(aTagName, SRFMGR_SURFACE_SHOWBREATH);
	nMaxShootThroughPerturb	= buteMgr.GetInt(aTagName, SRFMGR_SURFACE_MAXSHOOTTHROUGHPERTURB);
	nMaxShootThroughThickness= buteMgr.GetInt(aTagName, SRFMGR_SURFACE_MAXSHOOTTHROUGHTHICKNESS);
    fDeathNoiseModifier     = (LTFLOAT) buteMgr.GetDouble(aTagName, SRFMGR_SURFACE_DEATHNOISEMOD);
    fMovementNoiseModifier  = (LTFLOAT) buteMgr.GetDouble(aTagName, SRFMGR_SURFACE_MOVENOISEMOD);
    fImpactNoiseModifier    = (LTFLOAT) buteMgr.GetDouble(aTagName, SRFMGR_SURFACE_IMPACTNOISEMOD);
    fBodyFallSndRadius      = (LTFLOAT) buteMgr.GetDouble(aTagName, SRFMGR_SURFACE_BODYFALLSNDRADIUS);
    fBodyLedgeFallSndRadius = (LTFLOAT) buteMgr.GetDouble(aTagName, SRFMGR_SURFACE_BODYLEDGEFALLSNDRADIUS);
    fBulletHoleMinScale     = (LTFLOAT) buteMgr.GetDouble(aTagName, SRFMGR_SURFACE_BULLETHOLEMINSCALE);
    fBulletHoleMaxScale     = (LTFLOAT) buteMgr.GetDouble(aTagName, SRFMGR_SURFACE_BULLETHOLEMAXSCALE);
    fBulletRangeDampen      = (LTFLOAT) buteMgr.GetDouble(aTagName, SRFMGR_SURFACE_BULLETRANGEDAMPEN);
    fBulletDamageDampen     = (LTFLOAT) buteMgr.GetDouble(aTagName, SRFMGR_SURFACE_BULLETDAMAGEDAMPEN);
    fActivationSndRadius    = (LTFLOAT) buteMgr.GetDouble(aTagName, SRFMGR_SURFACE_ACTIVATIONSNDRADIUS);
    fShellSndRadius         = (LTFLOAT) buteMgr.GetDouble(aTagName, SRFMGR_SURFACE_SHELLSNDRADIUS);
    fGrenadeSndRadius       = (LTFLOAT) buteMgr.GetDouble(aTagName, SRFMGR_SURFACE_GRENADESNDRADIUS);
    fHardness               = (LTFLOAT) buteMgr.GetDouble(aTagName, SRFMGR_SURFACE_HARDNESS);
    fFootPrintLifetime      = (LTFLOAT) buteMgr.GetDouble(aTagName, SRFMGR_SURFACE_FOOTPRINTLIFETIME);
    fMotoVelMult			= (LTFLOAT) buteMgr.GetDouble(aTagName, SRFMGR_SURFACE_MOTOVELMULTIPLIER);
    fSnowVelMult			= (LTFLOAT) buteMgr.GetDouble(aTagName, SRFMGR_SURFACE_SNOWVELMULTIPLIER);
    bMagnetic               = (LTBOOL) buteMgr.GetInt(aTagName, SRFMGR_SURFACE_MAGNETIC);

	vFootPrintScale			= buteMgr.GetVector(aTagName, SRFMGR_SURFACE_FOOTPRINTSCALE);

	CString str = buteMgr.GetString(aTagName, SRFMGR_SURFACE_NAME);
	if (!str.IsEmpty())
	{
		strncpy(szName, (char*)(LPCSTR)str, ARRAY_LEN(szName));
	}

	str = buteMgr.GetString(aTagName, SRFMGR_SURFACE_BULLETHOLESPR);
	if (!str.IsEmpty())
	{
		strncpy(szBulletHoleSpr, (char*)(LPCSTR)str, ARRAY_LEN(szBulletHoleSpr));
	}

	str = buteMgr.GetString(aTagName, SRFMGR_SURFACE_RTFOOTPRINTSPR);
	if (!str.IsEmpty())
	{
		strncpy(szRtFootPrintSpr, (char*)(LPCSTR)str, ARRAY_LEN(szRtFootPrintSpr));
	}

	str = buteMgr.GetString(aTagName, SRFMGR_SURFACE_LTFOOTPRINTSPR);
	if (!str.IsEmpty())
	{
		strncpy(szLtFootPrintSpr, (char*)(LPCSTR)str, ARRAY_LEN(szLtFootPrintSpr));
	}

    int i;
    for (i=1; i <= SRF_MAX_FOOTSTEP_SNDS; i++)
	{
		sprintf(s_aAttName, "%s%d", SRFMGR_SURFACE_RTFOOTSND, i);
		str = buteMgr.GetString(aTagName, s_aAttName);

		if (!str.IsEmpty())
		{
			strncpy(szRtFootStepSnds[i-1], (char*)(LPCSTR)str, ARRAY_LEN(szRtFootStepSnds[i-1]));
		}
	}

	for (i=1; i <= SRF_MAX_FOOTSTEP_SNDS; i++)
	{
		sprintf(s_aAttName, "%s%d", SRFMGR_SURFACE_LTFOOTSND, i);
		str = buteMgr.GetString(aTagName, s_aAttName);

		if (!str.IsEmpty())
		{
			strncpy(szLtFootStepSnds[i-1], (char*)(LPCSTR)str, ARRAY_LEN(szLtFootStepSnds[i-1]));
		}
	}

	for (i=1; i <= SRF_MAX_MOTORCYCLE_SNDS; i++)
	{
		sprintf(s_aAttName, "%s%d", SRFMGR_SURFACE_MOTORCYCLESND, i);
		str = buteMgr.GetString(aTagName, s_aAttName);

		if (!str.IsEmpty())
		{
			strncpy(szMotorcycleSnds[i-1], (char*)(LPCSTR)str, ARRAY_LEN(szMotorcycleSnds[i-1]));
		}
	}

	for (i=1; i <= SRF_MAX_SNOWMOBILE_SNDS; i++)
	{
		sprintf(s_aAttName, "%s%d", SRFMGR_SURFACE_SNOWMOBILESND, i);
		str = buteMgr.GetString(aTagName, s_aAttName);

		if (!str.IsEmpty())
		{
			strncpy(szSnowmobileSnds[i-1], (char*)(LPCSTR)str, ARRAY_LEN(szSnowmobileSnds[i-1]));
		}
	}

	str = buteMgr.GetString(aTagName, SRFMGR_SURFACE_BODYFALLSND);
	if (!str.IsEmpty())
	{
		strncpy(szBodyFallSnd, (char*)(LPCSTR)str, ARRAY_LEN(szBodyFallSnd));
	}

	str = buteMgr.GetString(aTagName, SRFMGR_SURFACE_BODYLEDGEFALLSND);
	if (!str.IsEmpty())
	{
		strncpy(szBodyLedgeFallSnd, (char*)(LPCSTR)str, ARRAY_LEN(szBodyLedgeFallSnd));
	}

	str = buteMgr.GetString(aTagName, SRFMGR_SURFACE_ACTIVATIONSND);
	if (!str.IsEmpty())
	{
		strncpy(szActivationSnd, (char*)(LPCSTR)str, ARRAY_LEN(szActivationSnd));
	}

	str = buteMgr.GetString(aTagName, SRFMGR_SURFACE_GRENADEIMPACTSND);
	if (!str.IsEmpty())
	{
		strncpy(szGrenadeImpactSnd, (char*)(LPCSTR)str, ARRAY_LEN(szGrenadeImpactSnd));
	}

	for (i=1; i <= SRF_MAX_IMPACT_SNDS; i++)
	{
		sprintf(s_aAttName, "%s%d", SRFMGR_SURFACE_BULLETIMPACTSND, i);
		str = buteMgr.GetString(aTagName, s_aAttName);

		if (!str.IsEmpty())
		{
			strncpy(szBulletImpactSnds[i-1], (char*)(LPCSTR)str, ARRAY_LEN(szBulletImpactSnds[i-1]));
		}
	}

	for (i=1; i <= SRF_MAX_IMPACT_SNDS; i++)
	{
		sprintf(s_aAttName, "%s%d", SRFMGR_SURFACE_PROJIMPACTSND, i);
		str = buteMgr.GetString(aTagName, s_aAttName);

		if (!str.IsEmpty())
		{
			strncpy(szProjectileImpactSnds[i-1], (char*)(LPCSTR)str, ARRAY_LEN(szProjectileImpactSnds[i-1]));
		}
	}

	for (i=1; i <= SRF_MAX_IMPACT_SNDS; i++)
	{
		sprintf(s_aAttName, "%s%d", SRFMGR_SURFACE_MELEEIMPACTSND, i);
		str = buteMgr.GetString(aTagName, s_aAttName);

		if (!str.IsEmpty())
		{
			strncpy(szMeleeImpactSnds[i-1], (char*)(LPCSTR)str, ARRAY_LEN(szMeleeImpactSnds[i-1]));
		}
	}

	for (i=1; i <= SRF_MAX_SHELL_SNDS; i++)
	{
		sprintf(s_aAttName, "%s%d", SRFMGR_SURFACE_SHELLIMPACTSND, i);
		str = buteMgr.GetString(aTagName, s_aAttName);

		if (!str.IsEmpty())
		{
			strncpy(szShellImpactSnds[i-1], (char*)(LPCSTR)str, ARRAY_LEN(szShellImpactSnds[i-1]));
		}
	}

	// Impact specific scale fx...

	// Build our impact scale fx id list...

	nNumImpactScaleFX = 0;
	sprintf(s_aAttName, "%s%d", SRFMGR_SURFACE_IMPACTSCALENAME, nNumImpactScaleFX);

	while (buteMgr.Exist(aTagName, s_aAttName) && nNumImpactScaleFX < SRF_MAX_IMPACT_SCALEFX)
	{
		str = buteMgr.GetString(aTagName, s_aAttName);
		if (!str.IsEmpty())
		{
			CScaleFX* pScaleFX = g_pFXButeMgr->GetScaleFX((char*)(LPCSTR)str);
			if (pScaleFX)
			{
				aImpactScaleFXIds[nNumImpactScaleFX] = pScaleFX->nId;
			}
		}

		nNumImpactScaleFX++;
		sprintf(s_aAttName, "%s%d", SRFMGR_SURFACE_IMPACTSCALENAME, nNumImpactScaleFX);
	}

	// Build our impact particle shower fx id list...

	nNumImpactPShowerFX = 0;
	sprintf(s_aAttName, "%s%d", SRFMGR_SURFACE_IMPACTPSHOWERNAME, nNumImpactPShowerFX);

	while (buteMgr.Exist(aTagName, s_aAttName) && nNumImpactPShowerFX < SRF_MAX_IMPACT_PSHOWERFX)
	{
		str = buteMgr.GetString(aTagName, s_aAttName);
		if (!str.IsEmpty())
		{
			CPShowerFX* pPShowerFX = g_pFXButeMgr->GetPShowerFX((char*)(LPCSTR)str);
			if (pPShowerFX)
			{
				aImpactPShowerFXIds[nNumImpactPShowerFX] = pPShowerFX->nId;
			}
		}

		nNumImpactPShowerFX++;
		sprintf(s_aAttName, "%s%d", SRFMGR_SURFACE_IMPACTPSHOWERNAME, nNumImpactPShowerFX);
	}

	// Build our impact poly debris fx id list...

	nNumImpactPolyDebrisFX = 0;
	sprintf(s_aAttName, "%s%d", SRFMGR_SURFACE_IMPACTPOLYDEBRISNAME, nNumImpactPolyDebrisFX);

	while (buteMgr.Exist(aTagName, s_aAttName) && nNumImpactPolyDebrisFX < SRF_MAX_IMPACT_PSHOWERFX)
	{
		str = buteMgr.GetString(aTagName, s_aAttName);
		if (!str.IsEmpty())
		{
			CPolyDebrisFX* pPolyDebrisFX = g_pFXButeMgr->GetPolyDebrisFX((char*)(LPCSTR)str);
			if (pPolyDebrisFX)
			{
				aImpactPolyDebrisFXIds[nNumImpactPolyDebrisFX] = pPolyDebrisFX->nId;
			}
		}

		nNumImpactPolyDebrisFX++;
		sprintf(s_aAttName, "%s%d", SRFMGR_SURFACE_IMPACTPOLYDEBRISNAME, nNumImpactPolyDebrisFX);
	}

	// Build our under water impact particle shower fx id list...


	nNumUWImpactPShowerFX = 0;
	sprintf(s_aAttName, "%s%d", SRFMGR_SURFACE_UWIMPACTPSHOWERNAME, nNumUWImpactPShowerFX);

	while (buteMgr.Exist(aTagName, s_aAttName) && nNumUWImpactPShowerFX < SRF_MAX_IMPACT_PSHOWERFX)
	{
		str = buteMgr.GetString(aTagName, s_aAttName);
		if (!str.IsEmpty())
		{
			CPShowerFX* pPShowerFX = g_pFXButeMgr->GetPShowerFX((char*)(LPCSTR)str);
			if (pPShowerFX)
			{
				aUWImpactPShowerFXIds[nNumUWImpactPShowerFX] = pPShowerFX->nId;
			}
		}

		nNumUWImpactPShowerFX++;
		sprintf(s_aAttName, "%s%d", SRFMGR_SURFACE_UWIMPACTPSHOWERNAME, nNumUWImpactPShowerFX);
	}



	// Exit specific scale fx...

	// Build our exit scale fx id list...

	nNumExitScaleFX = 0;
	sprintf(s_aAttName, "%s%d", SRFMGR_SURFACE_EXITSCALENAME, nNumExitScaleFX);

	while (buteMgr.Exist(aTagName, s_aAttName) && nNumExitScaleFX < SRF_MAX_IMPACT_SCALEFX)
	{
		str = buteMgr.GetString(aTagName, s_aAttName);
		if (!str.IsEmpty())
		{
			CScaleFX* pScaleFX = g_pFXButeMgr->GetScaleFX((char*)(LPCSTR)str);
			if (pScaleFX)
			{
				aExitScaleFXIds[nNumExitScaleFX]  = pScaleFX->nId;
			}
		}

		nNumExitScaleFX++;
		sprintf(s_aAttName, "%s%d", SRFMGR_SURFACE_EXITSCALENAME, nNumExitScaleFX);
	}

	// Build our exit particle shower fx id list...

	nNumExitPShowerFX = 0;
	sprintf(s_aAttName, "%s%d", SRFMGR_SURFACE_EXITPSHOWERNAME, nNumExitPShowerFX);

	while (buteMgr.Exist(aTagName, s_aAttName) && nNumExitPShowerFX < SRF_MAX_IMPACT_PSHOWERFX)
	{
		str = buteMgr.GetString(aTagName, s_aAttName);
		if (!str.IsEmpty())
		{
			CPShowerFX* pPShowerFX = g_pFXButeMgr->GetPShowerFX((char*)(LPCSTR)str);
			if (pPShowerFX)
			{
				aExitPShowerFXIds[nNumExitPShowerFX] = pPShowerFX->nId;
			}
		}

		nNumExitPShowerFX++;
		sprintf(s_aAttName, "%s%d", SRFMGR_SURFACE_EXITPSHOWERNAME, nNumExitPShowerFX);
	}

	// Build our exit poly debris fx id list...

	nNumExitPolyDebrisFX = 0;
	sprintf(s_aAttName, "%s%d", SRFMGR_SURFACE_EXITPOLYDEBRISNAME, nNumExitPolyDebrisFX);

	while (buteMgr.Exist(aTagName, s_aAttName) && nNumExitPolyDebrisFX < SRF_MAX_IMPACT_PSHOWERFX)
	{
		str = buteMgr.GetString(aTagName, s_aAttName);
		if (!str.IsEmpty())
		{
			CPolyDebrisFX* pPolyDebrisFX = g_pFXButeMgr->GetPolyDebrisFX((char*)(LPCSTR)str);
			if (pPolyDebrisFX)
			{
				aExitPolyDebrisFXIds[nNumExitPolyDebrisFX] = pPolyDebrisFX->nId;
			}
		}

		nNumExitPolyDebrisFX++;
		sprintf(s_aAttName, "%s%d", SRFMGR_SURFACE_EXITPOLYDEBRISNAME, nNumExitPolyDebrisFX);
	}

	// Build our under water exit particle shower fx id list...

	nNumUWExitPShowerFX = 0;
	sprintf(s_aAttName, "%s%d", SRFMGR_SURFACE_UWIMPACTPSHOWERNAME, nNumUWExitPShowerFX);

	while (buteMgr.Exist(aTagName, s_aAttName) && nNumUWExitPShowerFX < SRF_MAX_IMPACT_PSHOWERFX)
	{
		str = buteMgr.GetString(aTagName, s_aAttName);
		if (!str.IsEmpty())
		{
			CPShowerFX* pPShowerFX = g_pFXButeMgr->GetPShowerFX((char*)(LPCSTR)str);
			if (pPShowerFX)
			{
				aUWExitPShowerFXIds[nNumUWExitPShowerFX] = pPShowerFX->nId;
			}
		}

		nNumUWExitPShowerFX++;
		sprintf(s_aAttName, "%s%d", SRFMGR_SURFACE_UWIMPACTPSHOWERNAME, nNumUWExitPShowerFX);
	}

    return LTTRUE;
}
Exemple #10
0
LTBOOL PROPTYPE::Init(CButeMgr & buteMgr, char* aTagName, uint32 nId)
{
    if (!aTagName) return LTFALSE;

	vScale			= buteMgr.GetVector(aTagName, PTMGR_SCALE);
	vObjectColor	= buteMgr.GetVector(aTagName, PTMGR_OBJECTCOLOR);

    fAlpha          = (LTFLOAT) buteMgr.GetDouble(aTagName, PTMGR_ALPHA);

    bVisible        = (LTBOOL) buteMgr.GetInt(aTagName, PTMGR_VISIBLE);
    bSolid          = (LTBOOL) buteMgr.GetInt(aTagName, PTMGR_SOLID);
    bGravity        = (LTBOOL) buteMgr.GetInt(aTagName, PTMGR_GRAVITY);
    bShadow         = (LTBOOL) buteMgr.GetInt(aTagName, PTMGR_SHADOW);
    bMoveToFloor    = (LTBOOL) buteMgr.GetInt(aTagName, PTMGR_MOVETOFLOOR);
    bAdditive       = (LTBOOL) buteMgr.GetInt(aTagName, PTMGR_ADDITIVE, false);
    bMultiply       = (LTBOOL) buteMgr.GetInt(aTagName, PTMGR_MULTIPLY, false);
    bRayHit         = (LTBOOL) buteMgr.GetInt(aTagName, PTMGR_RAYHIT);
    bActivateable   = (LTBOOL) buteMgr.GetInt(aTagName, PTMGR_ACTIVATEABLE, PTMGR_DEFAULT_ACTIVATEABLE);
    bSearchable		= (LTBOOL) buteMgr.GetInt(aTagName, PTMGR_SEARCHABLE, PTMGR_DEFAULT_SEARCHABLE);
    bTouchable		= (LTBOOL) buteMgr.GetInt(aTagName, PTMGR_TOUCHABLE, PTMGR_DEFAULT_TOUCHABLE);

	nHitPoints		= buteMgr.GetInt(aTagName, PTMGR_HITPOINTS);

	buteMgr.GetString(aTagName, PTMGR_TYPE, s_aBuffer, ARRAY_LEN(s_aBuffer));
	if(s_aBuffer[0])
	{
		sType = s_aBuffer;
	}

	buteMgr.GetString(aTagName, PTMGR_FILENAME, s_aBuffer, ARRAY_LEN(s_aBuffer));
	if(s_aBuffer[0])
	{
		sFilename = s_aBuffer;
	}


	blrPropSkinReader.Read(&buteMgr, s_aTagName, PTMGR_SKIN, PROPTYPE_MAX_FILE_PATH);
	blrPropRenderStyleReader.Read(&buteMgr, s_aTagName, PTMGR_RENDERSTYLE, PROPTYPE_MAX_FILE_PATH);

	buteMgr.GetString(aTagName, PTMGR_DEBRISTYPE, s_aBuffer, ARRAY_LEN(s_aBuffer));
	if(s_aBuffer[0])
	{
		sDebrisType = s_aBuffer;
	}

	buteMgr.GetString( aTagName, PTMGR_ACTIVATETYPE, "", s_aBuffer, ARRAY_LEN( s_aBuffer ));
	if( s_aBuffer[0] )
	{
		sActivateType = s_aBuffer;
	}


	LTFLOAT fTouchSoundRadius = (LTFLOAT)buteMgr.GetDouble(aTagName, PTMGR_TOUCHSOUNDRADIUS, PTMGR_DEFAULT_TOUCHSOUNDRADIUS);
	LTFLOAT fStimRadius = (LTFLOAT)buteMgr.GetDouble(aTagName, PTMGR_STIMRADIUS, PTMGR_DEFAULT_STIMRADIUS);
	
	char	szHitSound[PROPTYPE_MAX_FILE_PATH] = {0};
	buteMgr.GetString( aTagName, PTMGR_HITSOUND, "", szHitSound, ARRAY_LEN(szHitSound) );

	buteMgr.GetString(aTagName, PTMGR_DESTROYFILENAME, s_aBuffer, ARRAY_LEN(s_aBuffer));
	if( (fTouchSoundRadius > 0.f) || (fStimRadius > 0.f) || (s_aBuffer[0] != '\0') || (szHitSound[0] != '\0') )
	{
		pDisturb = debug_new(PROP_DISTURB);
		pDisturb->nPropTypeId = nId;

		if(s_aBuffer[0])
		{
			pDisturb->sDestroyFilename = s_aBuffer;
		}

		buteMgr.GetString(aTagName, PTMGR_TOUCHSOUND, s_aBuffer, ARRAY_LEN(s_aBuffer));
		if(s_aBuffer[0])
		{
			pDisturb->sTouchSound = s_aBuffer;
		}

		pDisturb->fStimRadius = fStimRadius;

		pDisturb->fTouchSoundRadius = fTouchSoundRadius;
		pDisturb->nTouchAlarmLevel = buteMgr.GetInt(aTagName, PTMGR_TOUCHALARMLEVEL, PTMGR_DEFAULT_ALARMLEVEL);

		pDisturb->nDestroyAlarmLevel = buteMgr.GetInt(aTagName, PTMGR_DESTROYALARMLEVEL, PTMGR_DEFAULT_ALARMLEVEL);

		pDisturb->blrDestroySkinReader.Read(&buteMgr, s_aTagName, PTMGR_DESTROYSKIN, PROPTYPE_MAX_FILE_PATH);
		pDisturb->blrDestroyRenderStyleReader.Read(&buteMgr, s_aTagName, PTMGR_DESTROYRENDERSTYLE, PROPTYPE_MAX_FILE_PATH);

		if( szHitSound[0] )
		{
			pDisturb->sHitSound = szHitSound;
		}

		pDisturb->fHitSoundRadius = (LTFLOAT)buteMgr.GetDouble( aTagName, PTMGR_HITSOUNDRADIUS, PTMGR_DEFAULT_HITSOUNDRADIUS );
		pDisturb->nHitAlarmLevel = buteMgr.GetInt( aTagName, PTMGR_HITALARMLEVEL, PTMGR_DEFAULT_ALARMLEVEL );
	
	}

    return LTTRUE;
}