当前位置: 首页>>代码示例>>C++>>正文


C++ GetServerDE函数代码示例

本文整理汇总了C++中GetServerDE函数的典型用法代码示例。如果您正苦于以下问题:C++ GetServerDE函数的具体用法?C++ GetServerDE怎么用?C++ GetServerDE使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了GetServerDE函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: GetServerDE

void WeaponPowerup::Save(HMESSAGEWRITE hWrite, DDWORD dwSaveFlags)
{
	CServerDE* pServerDE = GetServerDE();
	if (!pServerDE || !hWrite) return;

	pServerDE->WriteToMessageByte(hWrite, m_iWeaponType);
	pServerDE->WriteToMessageByte(hWrite, m_eModelSize);
	pServerDE->WriteToMessageDWord(hWrite, m_dwAmmo);
}
开发者ID:Joincheng,项目名称:lithtech,代码行数:9,代码来源:WeaponPowerups.cpp

示例2: GetServerDE

void SpellPickup::ObjectTouch(HOBJECT hObject)
{
	CServerDE* pServerDE = GetServerDE();
	if (!pServerDE) return;

	HMESSAGEWRITE hMessage = pServerDE->StartMessageToObject(this, hObject, MID_ADDAMMO);
	pServerDE->WriteToMessageByte(hMessage, (DBYTE)m_nSpellType);
	pServerDE->EndMessage(hMessage);
}
开发者ID:Arc0re,项目名称:lithtech,代码行数:9,代码来源:SpellPickups.cpp

示例3: GetServerDE

void PickupObject::SendEffectMessage()
{
	CServerDE* pServerDE = GetServerDE();
	if (!pServerDE) return;

	HMESSAGEWRITE hMessage = pServerDE->StartSpecialEffectMessage(this);
	pServerDE->WriteToMessageByte(hMessage, SFX_POWERUP_ID);
	pServerDE->EndMessage(hMessage);
}
开发者ID:bsmr-games,项目名称:Blood2,代码行数:9,代码来源:PickupObject.cpp

示例4: GetServerDE

LTBOOL Key::InitialUpdate(LTVector* pMovement)
{
    ILTServer* pServerDE = GetServerDE();
    if (!pServerDE) return LTFALSE;

	pServerDE->SetNextUpdate (m_hObject, 0.0f);

    return LTTRUE;
}
开发者ID:germanocaldeira,项目名称:no-one-lives-forever,代码行数:9,代码来源:Key.cpp

示例5: GetServerDE

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;
}
开发者ID:Arc0re,项目名称:lithtech,代码行数:56,代码来源:ParticleSystem.cpp

示例6: GetServerDE

void VolumeBrush::UpdateZeroGravity(ContainerPhysics* pCPStruct)
{
    CServerDE* pServerDE = GetServerDE();
    if (!pCPStruct || !pCPStruct->m_hObject) return;

    if (pCPStruct->m_Flags & FLAG_GRAVITY)
    {
        pCPStruct->m_Flags &= ~FLAG_GRAVITY;
    }
}
开发者ID:jordandavidson,项目名称:lithtech,代码行数:10,代码来源:VolumeBrush.cpp

示例7: GetServerDE

void ClientLightFX::Load(HMESSAGEREAD hRead, DDWORD dwLoadFlags)
{
	CServerDE* pServerDE = GetServerDE();
	if (!pServerDE || !hRead) return;

	m_bOn			= (DBOOL) pServerDE->ReadFromMessageByte(hRead);
	m_bDynamic		= (DBOOL) pServerDE->ReadFromMessageByte(hRead);
	m_fLifeTime		= pServerDE->ReadFromMessageFloat(hRead);
	m_fStartTime	= pServerDE->ReadFromMessageFloat(hRead);
}
开发者ID:Arc0re,项目名称:lithtech,代码行数:10,代码来源:ClientLightFX.cpp

示例8: GetServerDE

PolyGrid::~PolyGrid()
{ 
	CServerDE* pServerDE = GetServerDE();
	if (!pServerDE) return;

	if (m_hstrSurfaceSprite)
	{
		pServerDE->FreeString(m_hstrSurfaceSprite);
	}
}
开发者ID:bsmr-games,项目名称:Blood2,代码行数:10,代码来源:PolyGrid.cpp

示例9: GetServerDE

void CClientParticleStreamSFX::Save(HMESSAGEWRITE hWrite, DDWORD dwSaveFlags)
{
	CServerDE* pServerDE = GetServerDE();
	if (!pServerDE || !hWrite) return;

	// Only need to save the data that changes (all the data in the
	// special fx message is saved/loaded for us)...

	pServerDE->WriteToMessageByte(hWrite, bOn);
}
开发者ID:bsmr-games,项目名称:Blood2,代码行数:10,代码来源:ClientParticleStreamSFX.cpp

示例10: GetServerDE

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);
}
开发者ID:jordandavidson,项目名称:lithtech,代码行数:10,代码来源:Rain.cpp

示例11: GetServerDE

void PowerupPickup::ObjectTouch(HOBJECT hObject)
{
	CServerDE* pServerDE = GetServerDE();
	if (!pServerDE) return;

	HMESSAGEWRITE hMessage = pServerDE->StartMessageToObject(this, hObject, MID_ADDPOWERUP);
	pServerDE->WriteToMessageByte(hMessage, (DBYTE)m_nType);
	pServerDE->WriteToMessageFloat(hMessage, m_fValue * m_fValueMult);
	pServerDE->EndMessage(hMessage);
}
开发者ID:Arc0re,项目名称:lithtech,代码行数:10,代码来源:PowerupPickups.cpp

示例12: switch

DDWORD Cat::ObjectMessageFn(HOBJECT hSender, DDWORD messageID, HMESSAGEREAD hRead)
{
	switch(messageID)
	{
		case MID_DAMAGE:
		{
			CServerDE* pServerDE = GetServerDE();
			if (!pServerDE) break;
			
			DVector vDir;
			pServerDE->ReadFromMessageVector(hRead, &vDir);
			DFLOAT fDamage   = pServerDE->ReadFromMessageFloat(hRead);
			DamageType eType = (DamageType)pServerDE->ReadFromMessageByte(hRead);
			HOBJECT hHeHitMe = pServerDE->ReadFromMessageObject(hRead);

			if (eType == DT_SQUEAKY)
			{
				if (m_hstrSqueakedAtSound)
				{
					char* pSound = pServerDE->GetStringData(m_hstrSqueakedAtSound);
					if (pSound) PlaySoundFromObject(m_hObject, pSound, m_fSoundRadius, SOUNDPRIORITY_MISC_MEDIUM );
				}

				// If we're supposed to trigger something, trigger it here
	
				if (m_hstrSqueakyTarget && m_hstrSqueakyMessage)
				{
					SendTriggerMsgToObjects(this, m_hstrSqueakyTarget, m_hstrSqueakyMessage);
				}
			}
			else
			{
				if (m_hstrDeathSound)
				{
					DVector vPos;
					pServerDE->GetObjectPos(m_hObject, &vPos);
					char* pSound = pServerDE->GetStringData(m_hstrDeathSound);
					if (pSound) PlaySoundFromPos(&vPos, pSound, m_fSoundRadius, SOUNDPRIORITY_MISC_MEDIUM );
				}

				if (m_hstrDeathTriggerTarget && m_hstrDeathTriggerMessage)
				{
					SendTriggerMsgToObjects(this, m_hstrDeathTriggerTarget, m_hstrDeathTriggerMessage);
				}

				pServerDE->RemoveObject(m_hObject);
			}
			break;
		}

		default : break;
	}

	return InventoryItem::ObjectMessageFn(hSender, messageID, hRead);
}
开发者ID:Arc0re,项目名称:lithtech,代码行数:55,代码来源:Cat.cpp

示例13: GetServerDE

void Naga::PostPropRead(ObjectCreateStruct *pStruct)
{
	CServerDE* pServerDE = GetServerDE();
	if (!pServerDE || !pStruct) return;

	char* pFilename = "Models\\Enemies\\Naga.abc";
	char* pSkin = "Skins\\Enemies\\Naga.dtx";

	_mbscpy((unsigned char*)pStruct->m_Filename, (const unsigned char*)pFilename);
	_mbscpy((unsigned char*)pStruct->m_SkinName, (const unsigned char*)pSkin);
}
开发者ID:Arc0re,项目名称:lithtech,代码行数:11,代码来源:Naga.cpp

示例14: GetServerDE

CDestructableBrush::~CDestructableBrush()
{ 
	CServerDE* pServerDE = GetServerDE();
	if (!pServerDE) return;

	if (m_hstrDebrisSkin)
	{
		pServerDE->FreeString(m_hstrDebrisSkin);
		m_hstrDebrisSkin = NULL;
	}
}
开发者ID:bsmr-games,项目名称:Blood2,代码行数:11,代码来源:DestructableBrush.cpp

示例15: GetServerDE

void KeyPickup::Save(HMESSAGEWRITE hWrite, DDWORD dwSaveFlags)
{
	CServerDE* pServerDE = GetServerDE();
	if (!pServerDE || !hWrite) return;

	pServerDE->WriteToMessageHString(hWrite, m_hstrFilename);
	pServerDE->WriteToMessageHString(hWrite, m_hstrSkinName);
	pServerDE->WriteToMessageHString(hWrite, m_hstrIconFile);
	pServerDE->WriteToMessageHString(hWrite, m_hstrIconFileH);
	pServerDE->WriteToMessageByte(hWrite, m_byUseCount);
}
开发者ID:Arc0re,项目名称:lithtech,代码行数:11,代码来源:ItemPickups.cpp


注:本文中的GetServerDE函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。