本文整理汇总了C++中CServerDE::CreateString方法的典型用法代码示例。如果您正苦于以下问题:C++ CServerDE::CreateString方法的具体用法?C++ CServerDE::CreateString怎么用?C++ CServerDE::CreateString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CServerDE
的用法示例。
在下文中一共展示了CServerDE::CreateString方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ReadProp
DBOOL ObjectiveTrigger::ReadProp(ObjectCreateStruct *pData)
{
CServerDE* pServerDE = BaseClass::GetServerDE();
if (!pServerDE || !pData) return DFALSE;
char buf[MAX_CS_FILENAME_LEN];
pServerDE->GetPropVector("Dims", &m_vDims);
pServerDE->GetPropBool("PlayerTriggerable", &m_bPlayerTriggerable);
pServerDE->GetPropBool("AITriggerable", &m_bAITriggerable);
buf[0] = '\0';
pServerDE->GetPropString("AITriggerName", buf, MAX_CS_FILENAME_LEN);
if (buf[0] && strlen(buf)) m_hstrAIName = pServerDE->CreateString(buf);
buf[0] = '\0';
pServerDE->GetPropString("AddObjectives", buf, MAX_CS_FILENAME_LEN);
if (buf[0]) m_hAddObjectives = pServerDE->CreateString(buf);
buf[0] = '\0';
pServerDE->GetPropString("RemoveObjectives", buf, MAX_CS_FILENAME_LEN);
if (buf[0]) m_hRemoveObjectives = pServerDE->CreateString(buf);
buf[0] = '\0';
pServerDE->GetPropString("CompleteObjectives", buf, MAX_CS_FILENAME_LEN);
if (buf[0]) m_hCompletedObjectives = pServerDE->CreateString(buf);
return DTRUE;
}
示例2: ReadProp
DBOOL Key::ReadProp(ObjectCreateStruct *pStruct)
{
CServerDE* pServerDE = GetServerDE();
if (!pServerDE || !pStruct) return DFALSE;
char buf[MAX_CS_FILENAME_LEN];
buf[0] = '\0';
pServerDE->GetPropString("SoundName", buf, MAX_CS_FILENAME_LEN);
if (buf[0]) m_hstrSoundName = pServerDE->CreateString(buf);
buf[0] = '\0';
pServerDE->GetPropString("MessageTarget", buf, MAX_CS_FILENAME_LEN);
if (buf[0]) m_hstrMessageTarget = pServerDE->CreateString(buf);
buf[0] = '\0';
pServerDE->GetPropString("MessageName", buf, MAX_CS_FILENAME_LEN);
if (buf[0]) m_hstrMessageName = pServerDE->CreateString(buf);
buf[0] = '\0';
pServerDE->GetPropString("BPrintMessage", buf, MAX_CS_FILENAME_LEN);
if (buf[0]) m_hstrBPrintMessage = pServerDE->CreateString(buf);
pServerDE->GetPropReal("TimeStamp", &m_fTimeStamp);
pServerDE->GetPropReal("SoundRadius", &m_fSoundRadius);
pServerDE->GetPropBool("LoopSound", &m_bLoopSound);
return DTRUE;
}
示例3: SetupSprite
void CClientExplosionSFX::SetupSprite(DVector *vScale1, DVector *vScale2, DFLOAT fDuration,
DFLOAT fInitAlpha, DBYTE bWaveForm, DBYTE bFade, DBOOL bAlign, char *szSprite)
{
CServerDE* pServerDE = GetServerDE();
if (!pServerDE) return;
HSTRING hszSprite;
if(szSprite) hszSprite = pServerDE->CreateString(szSprite);
else hszSprite = pServerDE->CreateString("Sprites\\Explode128.spr");
// Tell the clients about the Explosion...
HMESSAGEWRITE hMessage = pServerDE->StartInstantSpecialEffectMessage(&m_vPos);
pServerDE->WriteToMessageByte(hMessage, SFX_EXPLOSIONSPRITE_ID);
// pServerDE->WriteToMessageByte(hMessage, DFALSE);
pServerDE->WriteToMessageVector(hMessage, &m_vPos);
pServerDE->WriteToMessageVector(hMessage, &m_vNormal);
pServerDE->WriteToMessageVector(hMessage, vScale1);
pServerDE->WriteToMessageVector(hMessage, vScale2);
pServerDE->WriteToMessageFloat(hMessage, fDuration);
pServerDE->WriteToMessageFloat(hMessage, fInitAlpha);
pServerDE->WriteToMessageByte(hMessage, bWaveForm);
pServerDE->WriteToMessageByte(hMessage, bFade);
pServerDE->WriteToMessageByte(hMessage, bAlign);
pServerDE->WriteToMessageHString(hMessage, hszSprite);
pServerDE->EndMessage(hMessage);
pServerDE->FreeString( hszSprite );
}
示例4: ReadProp
void VolumeBrush::ReadProp(ObjectCreateStruct *pStruct)
{
CServerDE* pServerDE = GetServerDE();
if (!pServerDE || !pStruct) return;
long nLongVal;
char buf[MAX_CS_FILENAME_LEN];
pServerDE->GetPropBool("Hidden", &m_bHidden);
pServerDE->GetPropBool("ShowSurface", &m_bShowSurface);
buf[0] = '\0';
pServerDE->GetPropString("SpriteSurfaceName", buf, MAX_CS_FILENAME_LEN);
if (buf[0]) m_hstrSurfaceSprite = pServerDE->CreateString(buf);
pServerDE->GetPropBool( "FogEnable", &m_bFogEnable );
pServerDE->GetPropReal( "FogFarZ", &m_fFogFarZ );
pServerDE->GetPropReal( "FogNearZ", &m_fFogNearZ );
pServerDE->GetPropVector( "FogColor", &m_vFogColor );
pServerDE->GetPropReal("XScaleMin", &m_fXScaleMin);
pServerDE->GetPropReal("XScaleMax", &m_fXScaleMax);
pServerDE->GetPropReal("YScaleMin", &m_fYScaleMin);
pServerDE->GetPropReal("YScaleMax", &m_fYScaleMax);
pServerDE->GetPropReal("XScaleDuration", &m_fXScaleDuration);
pServerDE->GetPropReal("YScaleDuration", &m_fYScaleDuration);
pServerDE->GetPropReal("SurfaceHeight", &m_fSurfaceHeight);
pServerDE->GetPropVector("SurfaceColor1", &m_vSurfaceColor1);
pServerDE->GetPropVector("SurfaceColor2", &m_vSurfaceColor2);
pServerDE->GetPropReal("Viscosity", &m_fViscosity);
pServerDE->GetPropReal( "SurfaceAlpha", &m_fSurfaceAlpha);
if (pServerDE->GetPropLongInt("Code", &nLongVal) == DE_OK)
m_eContainerCode = (ContainerCode)nLongVal;
pServerDE->GetPropVector("Current", &m_vCurrent);
pServerDE->GetPropReal("Damage", &m_fDamage);
if (pServerDE->GetPropLongInt("DamageType", &nLongVal) == DE_OK)
m_nDamageType = (DBYTE)nLongVal;
pServerDE->GetPropBool("Locked", &m_bLocked);
pServerDE->GetPropBool("UnlockKeyRemove", &m_bUnlockKeyRemove);
buf[0] = '\0';
pServerDE->GetPropString("UnlockKeyName", buf, MAX_CS_FILENAME_LEN);
if (buf[0]) m_hstrKeyName = pServerDE->CreateString(buf);
if (pServerDE->GetPropLongInt("NumSurfacePolies", &nLongVal) == DE_OK)
{
m_dwNumSurfacePolies = (DDWORD)nLongVal;
}
}
示例5: ReadProp
void CClientParticleStreamSFX::ReadProp(ObjectCreateStruct *pData)
{
CServerDE* pServerDE = GetServerDE();
if(!pServerDE || !pData) return;
char szString[MAX_CS_FILENAME_LEN];
long tempLong;
DBOOL temp;
pServerDE->GetPropReal("SystemRadius", &fRadius);
pServerDE->GetPropReal("PositionRadius", &fPosRadius);
pServerDE->GetPropReal("MinVelocity", &fMinVel);
pServerDE->GetPropReal("MaxVelocity", &fMaxVel);
pServerDE->GetPropLongInt("NumParticles", &tempLong);
nNumParticles = (DDWORD)tempLong;
pServerDE->GetPropReal("VelSpread", &fSpread);
pServerDE->GetPropColor("MinColor", &vColor1);
pServerDE->GetPropColor("MaxColor", &vColor2);
pServerDE->GetPropReal("SystemAlpha", &fAlpha);
pServerDE->GetPropReal("MinLifetime", &fMinLife);
pServerDE->GetPropReal("MaxLifetime", &fMaxLife);
pServerDE->GetPropReal("RampTime", &fRampTime);
pServerDE->GetPropReal("AddDelay", &fDelay);
pServerDE->GetPropReal("Gravity", &fGravity);
bRampFlags = 0;
pServerDE->GetPropBool("RampAmount", &temp);
if(temp) bRampFlags |= 0x01;
pServerDE->GetPropBool("RampOffset", &temp);
if(temp) bRampFlags |= 0x02;
pServerDE->GetPropBool("RampVelocity", &temp);
if(temp) bRampFlags |= 0x04;
pServerDE->GetPropBool("RampLifetime", &temp);
if(temp) bRampFlags |= 0x08;
pServerDE->GetPropBool("InitiallyOn", &bOn);
pServerDE->GetPropString("ParticleFile", szString, MAX_CS_FILENAME_LEN);
hstrTexture = pServerDE->CreateString(szString);
pServerDE->GetPropReal("SoundRadius", &fSoundRadius);
pServerDE->GetPropString("RampUpSound", szString, MAX_CS_FILENAME_LEN);
hstrSound1 = pServerDE->CreateString(szString);
pServerDE->GetPropString("LoopSound", szString, MAX_CS_FILENAME_LEN);
hstrSound2 = pServerDE->CreateString(szString);
pServerDE->GetPropString("RampDownSound", szString, MAX_CS_FILENAME_LEN);
hstrSound3 = pServerDE->CreateString(szString);
return;
}
示例6: Copy
DBOOL PathListData::Copy(HOBJECT hPathPoint)
{
CServerDE* pServerDE = BaseClass::GetServerDE();
if (!hPathPoint || !pServerDE) return DFALSE;
// Get the Object Position
pServerDE->GetObjectPos(hPathPoint, &m_vPos);
char* pName = pServerDE->GetObjectName(hPathPoint);
if (pName)
{
m_hstrName = pServerDE->CreateString(pName);
}
// Get the Objects action
PathPoint *pPathPoint = (PathPoint*)pServerDE->HandleToObject(hPathPoint);
HSTRING hstrAction = pPathPoint->GetActionTarget();
if (hstrAction)
{
m_hstrActionTarget = pServerDE->CopyString(hstrAction);
}
hstrAction = pPathPoint->GetActionMessage();
if (hstrAction)
{
m_hstrActionMessage = pServerDE->CopyString(hstrAction);
}
return DTRUE;
}
示例7: GetServerDE
void Trigger::SetTargetName1(char* pName)
{
CServerDE* pServerDE = GetServerDE();
if (!pServerDE || !pName) return;
if (m_hstrTargetName[0]) pServerDE->FreeString(m_hstrTargetName[0]);
m_hstrTargetName[0] = pServerDE->CreateString(pName);
}
示例8: ReadProp
DBOOL GameStartPoint::ReadProp()
{
CServerDE* pServerDE = GetServerDE();
if (!pServerDE) return DFALSE;
GenericProp genProp;
if (pServerDE->GetPropGeneric("Multiplayer", &genProp) == DE_OK)
m_bMultiplayer = genProp.m_Bool;
if (pServerDE->GetPropGeneric("Name", &genProp) == DE_OK)
{
if (genProp.m_String[0])
m_hstrName = pServerDE->CreateString(genProp.m_String);
}
if (g_pServerDE->GetPropGeneric("TeamID", &genProp) == DE_OK)
{
m_nTeamID = (int)genProp.m_Long;
}
DRotation rRot;
ROT_INIT(rRot);
if (pServerDE->GetPropGeneric("Rotation", &genProp) == DE_OK)
{
m_vPitchYawRoll.x = genProp.m_Vec.x;
m_vPitchYawRoll.y = genProp.m_Vec.y;
m_vPitchYawRoll.z = genProp.m_Vec.z;
}
if (pServerDE->GetPropGeneric("TriggerTarget", &genProp) == DE_OK)
{
if (genProp.m_String[0])
m_hstrTriggerTarget = pServerDE->CreateString(genProp.m_String);
}
if (pServerDE->GetPropGeneric("TriggerMessage", &genProp) == DE_OK)
{
if (genProp.m_String[0])
m_hstrTriggerMessage = pServerDE->CreateString(genProp.m_String);
}
return DTRUE;
}
示例9: ReadProp
DBOOL ParticleSystem::ReadProp(ObjectCreateStruct *)
{
CServerDE* pServerDE = GetServerDE();
if (!pServerDE) return DFALSE;
GenericProp genProp;
if (g_pServerDE->GetPropGeneric("Static", &genProp) == DE_OK)
m_bStatic = genProp.m_Bool;
if (g_pServerDE->GetPropGeneric("ParticleFlags", &genProp) == DE_OK)
m_dwFlags = genProp.m_Long;
if (g_pServerDE->GetPropGeneric("BurstWait", &genProp) == DE_OK)
m_fBurstWait = genProp.m_Float;
if (g_pServerDE->GetPropGeneric("ParticlesPerSecond", &genProp) == DE_OK)
m_fParticlesPerSecond = genProp.m_Float;
if (g_pServerDE->GetPropGeneric("EmissionRadius", &genProp) == DE_OK)
m_fEmissionRadius = genProp.m_Float;
if (g_pServerDE->GetPropGeneric("MinimumVelocity", &genProp) == DE_OK)
m_fMinimumVelocity = genProp.m_Float;
if (g_pServerDE->GetPropGeneric("MaximumVelocity", &genProp) == DE_OK)
m_fMaximumVelocity = genProp.m_Float;
if (g_pServerDE->GetPropGeneric("VelocityOffset", &genProp) == DE_OK)
m_fVelocityOffset = genProp.m_Float;
if (g_pServerDE->GetPropGeneric("ParticleLifetime", &genProp) == DE_OK)
m_fParticleLifetime = genProp.m_Float;
if (g_pServerDE->GetPropGeneric("Color1", &genProp) == DE_OK)
VEC_COPY(m_vColor1, genProp.m_Color);
if (g_pServerDE->GetPropGeneric("Color2", &genProp) == DE_OK)
VEC_COPY(m_vColor2, genProp.m_Color);
if (g_pServerDE->GetPropGeneric("ParticleRadius", &genProp) == DE_OK)
m_fRadius = genProp.m_Float;
if (g_pServerDE->GetPropGeneric("Gravity", &genProp) == DE_OK)
m_fGravity = genProp.m_Float;
if (g_pServerDE->GetPropGeneric("RotationVelocity", &genProp) == DE_OK)
m_fRotationVelocity = genProp.m_Float;
if (g_pServerDE->GetPropGeneric("TextureName", &genProp) == DE_OK)
{
if (genProp.m_String[0]) m_hstrTextureName = pServerDE->CreateString(genProp.m_String);
}
return DTRUE;
}
示例10: TriggerMsg
void Rain::TriggerMsg(HOBJECT hSender, HSTRING hMsg)
{
CServerDE* pServerDE = GetServerDE();
HSTRING hstr;
hstr = pServerDE->CreateString(g_szTriggerOn);
if (pServerDE->CompareStringsUpper(hMsg, hstr))
SendEffectMessage();
pServerDE->FreeString(hstr);
}
示例11: ReadProp
void Explosion::ReadProp(ObjectCreateStruct *pStruct)
{
CServerDE* pServerDE = GetServerDE();
if (!pServerDE || !pStruct) return;
char buf[MAX_CS_FILENAME_LEN];
buf[0] = '\0';
pServerDE->GetPropString("Skin", buf, MAX_CS_FILENAME_LEN);
if (buf[0]) m_hstrSkinName = pServerDE->CreateString(buf);
buf[0] = '\0';
pServerDE->GetPropString("Model", buf, MAX_CS_FILENAME_LEN);
if (buf[0]) m_hstrModelName = pServerDE->CreateString(buf);
buf[0] = '\0';
pServerDE->GetPropString("Sound", buf, MAX_CS_FILENAME_LEN);
if (buf[0]) m_hstrSound = pServerDE->CreateString(buf);
pServerDE->GetPropReal("SoundRadius", &m_fSoundRadius);
pServerDE->GetPropReal("DamageRadius", &m_fDamageRadius);
pServerDE->GetPropReal("MaxDamage", &m_fMaxDamage);
pServerDE->GetPropReal("MinScale", &m_fMinScale);
pServerDE->GetPropReal("MaxScale", &m_fMaxScale);
pServerDE->GetPropReal("Duration", &m_fMinScale);
pServerDE->GetPropBool("CreateLight", &m_bCreateLight);
pServerDE->GetPropVector("LightColor", &m_vLightColor);
VEC_DIVSCALAR(m_vLightColor, m_vLightColor, 255.0f);
pServerDE->GetPropBool("CreateSmoke", &m_bCreateSmoke);
pServerDE->GetPropBool("CreateShockwave", &m_bCreateShockwave);
buf[0] = '\0';
pServerDE->GetPropString("ShockwaveFile", buf, MAX_CS_FILENAME_LEN);
if (buf[0]) m_hstrShockwaveSprite = pServerDE->CreateString(buf);
pServerDE->GetPropVector("ShockwaveScaleMin", &m_vShockwaveScaleMin);
pServerDE->GetPropVector("ShockwaveScaleMax", &m_vShockwaveScaleMax);
pServerDE->GetPropReal("ShockwaveDuration", &m_fShockwaveDuration);
pServerDE->GetPropReal("Delay", &m_fDelay);
pServerDE->GetPropVector("RotateSpeed", &m_vRotation);
return;
}
示例12: GetServerDE
void PolyGrid:: Setup(DVector* pvDims, DVector* pvColor1, DVector* pvColor2,
HSTRING hstrSurfaceSprite, DFLOAT fXScaleMin, DFLOAT fXScaleMax,
DFLOAT fYScaleMin, DFLOAT fYScaleMax, DFLOAT fXScaleDuration,
DFLOAT fYScaleDuration, DFLOAT fXPan, DFLOAT fYPan,
DFLOAT fAlpha, DDWORD dwNumPolies)
{
D_WORD wColor1, wColor2;
CServerDE* pServerDE = GetServerDE();
if (!pServerDE || !pvDims || !pvColor1 || !pvColor2 || dwNumPolies < 4) return;
VEC_COPY(m_vDims, *pvDims);
pServerDE->SetObjectDims(m_hObject, pvDims);
VEC_COPY(m_vColor1, *pvColor1);
VEC_COPY(m_vColor2, *pvColor2);
wColor1 = Color255VectorToWord( pvColor1 );
wColor2 = Color255VectorToWord( pvColor2 );
// Limit the number of polies to 32k...
if ( dwNumPolies > 0x7FFF )
dwNumPolies = 0x7FFF;
HSTRING hstrSprite = hstrSurfaceSprite ? hstrSurfaceSprite : pServerDE->CreateString("");
// Tell the clients about the polygrid...
HMESSAGEWRITE hMessage = pServerDE->StartSpecialEffectMessage(this);
pServerDE->WriteToMessageByte(hMessage, SFX_POLYGRID_ID);
pServerDE->WriteToMessageVector(hMessage, &m_vDims);
pServerDE->WriteToMessageWord(hMessage, wColor1);
pServerDE->WriteToMessageWord(hMessage, wColor2);
pServerDE->WriteToMessageFloat(hMessage, fXScaleMin);
pServerDE->WriteToMessageFloat(hMessage, fXScaleMax);
pServerDE->WriteToMessageFloat(hMessage, fYScaleMin);
pServerDE->WriteToMessageFloat(hMessage, fYScaleMax);
pServerDE->WriteToMessageFloat(hMessage, fXScaleDuration);
pServerDE->WriteToMessageFloat(hMessage, fYScaleDuration);
pServerDE->WriteToMessageFloat(hMessage, fXPan);
pServerDE->WriteToMessageFloat(hMessage, fYPan);
pServerDE->WriteToMessageFloat(hMessage, fAlpha);
pServerDE->WriteToMessageHString(hMessage, hstrSprite);
pServerDE->WriteToMessageWord(hMessage, (D_WORD)dwNumPolies);
pServerDE->WriteToMessageByte(hMessage, m_nPlasmaType);
pServerDE->WriteToMessageByte(hMessage, m_nRingRate[0]);
pServerDE->WriteToMessageByte(hMessage, m_nRingRate[1]);
pServerDE->WriteToMessageByte(hMessage, m_nRingRate[2]);
pServerDE->WriteToMessageByte(hMessage, m_nRingRate[3]);
pServerDE->EndMessage(hMessage);
if (!hstrSurfaceSprite)
{
pServerDE->FreeString(hstrSprite);
}
}
示例13: SetupFrag
void CClientExplosionSFX::SetupFrag(DVector *vScale, DVector *vRotateMax, DFLOAT fSpread,
DFLOAT fDuration, DFLOAT fVelocity, DFLOAT fBounceMod, DFLOAT fGravity,
DFLOAT fFadeTime, DBOOL bRandDir, char *szModel, char *szSkin)
{
CServerDE* pServerDE = GetServerDE();
if (!pServerDE) return;
HSTRING hszModel, hszModelSkin;
if(szModel) hszModel = pServerDE->CreateString(szModel);
else hszModel = pServerDE->CreateString("Models\\Explosions\\exp_sphere.abc");
if(szSkin) hszModelSkin = pServerDE->CreateString(szSkin);
else hszModelSkin = pServerDE->CreateString("Skins\\Explosions\\Explosion_1.dtx");
// Tell the clients about the light...
HMESSAGEWRITE hMessage = pServerDE->StartInstantSpecialEffectMessage(&m_vPos);
pServerDE->WriteToMessageByte(hMessage, SFX_EXPLOSIONFRAG_ID);
// pServerDE->WriteToMessageByte(hMessage, DFALSE);
pServerDE->WriteToMessageVector(hMessage, &m_vPos);
pServerDE->WriteToMessageVector(hMessage, &m_vNormal);
pServerDE->WriteToMessageVector(hMessage, vScale);
pServerDE->WriteToMessageVector(hMessage, vRotateMax);
pServerDE->WriteToMessageFloat(hMessage, fSpread);
pServerDE->WriteToMessageFloat(hMessage, fDuration);
pServerDE->WriteToMessageFloat(hMessage, fVelocity);
pServerDE->WriteToMessageFloat(hMessage, fBounceMod);
pServerDE->WriteToMessageFloat(hMessage, fGravity);
pServerDE->WriteToMessageFloat(hMessage, fFadeTime);
pServerDE->WriteToMessageByte(hMessage, bRandDir);
pServerDE->WriteToMessageHString(hMessage, hszModel);
pServerDE->WriteToMessageHString(hMessage, hszModelSkin);
pServerDE->EndMessage(hMessage);
pServerDE->FreeString( hszModel );
pServerDE->FreeString( hszModelSkin );
}
示例14: ReadProp
void PolyGrid::ReadProp(ObjectCreateStruct * pStruct)
{
CServerDE* pServerDE = GetServerDE();
if (!pServerDE) return;
pStruct->m_Flags = FLAG_VISIBLE;
char buf[MAX_CS_FILENAME_LEN];
buf[0] = '\0';
pServerDE->GetPropString("SpriteSurfaceName", buf, MAX_CS_FILENAME_LEN);
if (buf[0]) m_hstrSurfaceSprite = pServerDE->CreateString(buf);
if (pServerDE->GetPropVector("Dims", &m_vDims) == DE_OK)
{
m_bSetup = DTRUE;
}
pServerDE->GetPropVector("Color1", &m_vColor1);
pServerDE->GetPropVector("Color2", &m_vColor2);
pServerDE->GetPropReal("XScaleMin", &m_fXScaleMin);
pServerDE->GetPropReal("XScaleMax", &m_fXScaleMax);
pServerDE->GetPropReal("YScaleMin", &m_fYScaleMin);
pServerDE->GetPropReal("YScaleMax", &m_fYScaleMax);
pServerDE->GetPropReal("XScaleDuration", &m_fXScaleDuration);
pServerDE->GetPropReal("YScaleDuration", &m_fYScaleDuration);
pServerDE->GetPropReal("XPan", &m_fXPan);
pServerDE->GetPropReal("YPan", &m_fYPan);
pServerDE->GetPropReal("Alpha", &m_fAlpha);
long nLongVal;
if (pServerDE->GetPropLongInt("NumPolies", &nLongVal) == DE_OK)
{
m_dwNumPolies = (DDWORD)nLongVal;
}
pServerDE->GetPropLongInt("PlasmaType", &nLongVal);
m_nPlasmaType = (DBYTE)nLongVal;
pServerDE->GetPropLongInt("Ring1Rate", &nLongVal);
m_nRingRate[0] = (DBYTE)nLongVal;
pServerDE->GetPropLongInt("Ring2Rate", &nLongVal);
m_nRingRate[1] = (DBYTE)nLongVal;
pServerDE->GetPropLongInt("Ring3Rate", &nLongVal);
m_nRingRate[2] = (DBYTE)nLongVal;
pServerDE->GetPropLongInt("Ring4Rate", &nLongVal);
m_nRingRate[3] = (DBYTE)nLongVal;
}
示例15: SetupModel
void CClientExplosionSFX::SetupModel(DVector *vScale1, DVector *vScale2, DFLOAT fDuration, DFLOAT fInitAlpha,
DBYTE bWaveForm, DBYTE bFade, DBOOL bRandRot, char *szModel, char *szSkin)
{
CServerDE* pServerDE = GetServerDE();
if (!pServerDE) return;
HSTRING hszModel, hszModelSkin;
if(szModel) hszModel = pServerDE->CreateString(szModel);
else hszModel = pServerDE->CreateString("Models\\Explosions\\exp_sphere.abc");
if(szSkin) hszModelSkin = pServerDE->CreateString(szSkin);
else hszModelSkin = pServerDE->CreateString("Skins\\Explosions\\Explosion_1.dtx");
// Tell the clients about the Explosion...
HMESSAGEWRITE hMessage = pServerDE->StartInstantSpecialEffectMessage(&m_vPos);
pServerDE->WriteToMessageByte(hMessage, SFX_EXPLOSION_ID);
// pServerDE->WriteToMessageByte(hMessage, DFALSE);
pServerDE->WriteToMessageVector(hMessage, &m_vPos);
pServerDE->WriteToMessageVector(hMessage, &m_vNormal);
pServerDE->WriteToMessageVector(hMessage, vScale1);
pServerDE->WriteToMessageVector(hMessage, vScale2);
pServerDE->WriteToMessageFloat(hMessage, fDuration);
pServerDE->WriteToMessageFloat(hMessage, fInitAlpha);
pServerDE->WriteToMessageByte(hMessage, bWaveForm);
pServerDE->WriteToMessageByte(hMessage, bFade);
pServerDE->WriteToMessageByte(hMessage, bRandRot);
pServerDE->WriteToMessageHString(hMessage, hszModel);
pServerDE->WriteToMessageHString(hMessage, hszModelSkin);
pServerDE->EndMessage(hMessage);
pServerDE->FreeString( hszModel );
pServerDE->FreeString( hszModelSkin );
}