• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ GetServerDE函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: GetServerDE

DBOOL Trigger::Update()
{
	CServerDE* pServerDE = GetServerDE();
	if (!pServerDE) return DFALSE;


	// Handle timed trigger...

	if (m_bTimedTrigger)
	{
		DFLOAT fTime = pServerDE->GetTime();
		if (fTime > m_fNextTriggerTime)
		{
			m_fNextTriggerTime = fTime + GetRandom(m_fMinTriggerTime, m_fMaxTriggerTime);
			DoTrigger(DNULL, DFALSE);
		}
	}

	
	// Attach the trigger to the object...

	if (m_hstrAttachToObject && !m_bAttached)
	{
		AttachToObject();
		m_bAttached = DTRUE;
	}



	if (m_bDelayingActivate)
	{
		UpdateDelayingActivate();
	}
	else
	{
		m_bActive = DTRUE;

		// If not a timed trigger, my object touch notification will trigger 
		// new updates until then, I don't care.
		
		if (m_bTimedTrigger)
		{
			pServerDE->SetNextUpdate(m_hObject, UPDATE_DELTA);
			pServerDE->SetDeactivationTime(m_hObject, 0.0f);
		}
		else
		{
			pServerDE->SetNextUpdate(m_hObject, 0.0f);
			pServerDE->SetDeactivationTime(m_hObject, TRIGGER_DEACTIVATION_TIME);
		}
	}

	return DTRUE;
}
开发者ID:Arc0re,项目名称:lithtech,代码行数:54,代码来源:Trigger.cpp


示例17: GetServerDE

void Gabriel::StopShieldSound()
{
	CServerDE* pServerDE = GetServerDE();
	if (!pServerDE || !m_hShieldSound) return;

	if (m_hShieldSound)
	{
		pServerDE->KillSound(m_hShieldSound);
		m_hShieldSound = DNULL;
	}
}
开发者ID:Arc0re,项目名称:lithtech,代码行数:11,代码来源:Gabriel.cpp


示例18: GetServerDE

DBOOL CHandWeaponModel::Update()
{
	CServerDE* pServerDE = GetServerDE();
	if (!pServerDE) return 0;

	if (m_bFirstUpdate)
	{
		m_bFirstUpdate = DFALSE;

		DDWORD dwFlags = pServerDE->GetObjectFlags(m_hObject);

		if (m_bVisible)
			pServerDE->SetObjectFlags(m_hObject, dwFlags | FLAG_VISIBLE);
		else
			pServerDE->SetObjectFlags(m_hObject, dwFlags & ~FLAG_VISIBLE);

		if( !m_bDropped )
		{
			pServerDE->SetNextUpdate(m_hObject, 0.0f);
			return DTRUE;
		}
	}

	// See if standing on anything
	CollisionInfo collisionInfo;

	pServerDE->GetStandingOn(m_hObject, &collisionInfo);
	DBOOL bIsStandingOn = (collisionInfo.m_hObject != DNULL);

	if (bIsStandingOn)
	{
		// Spawn a powerup
		DVector vF, vPos, vU;
		DRotation rRot;

		// We want the rotation aligned.
		pServerDE->GetObjectRotation(m_hObject, &rRot);
		pServerDE->GetRotationVectors(&rRot, &vU, &vPos, &vF);
		vF.y = 0.0f;
		VEC_SET(vU, 0,1,0);
		pServerDE->AlignRotation(&rRot, &vF, &vU);

		pServerDE->GetObjectPos(m_hObject, &vPos);
		vPos.y += 10;

		SpawnWeaponPickup(m_dwType, m_hObject, &vPos, &rRot, !m_bOwnedByPlayer);

		return DFALSE;
	}

	pServerDE->SetNextUpdate( m_hObject, 0.01f);

	return DTRUE;
}
开发者ID:bsmr-games,项目名称:Blood2,代码行数:54,代码来源:HandWeaponModel.cpp


示例19: GetServerDE

ObjectiveTrigger::~ObjectiveTrigger()
{
	CServerDE* pServerDE = GetServerDE();

	if (m_hstrAIName) pServerDE->FreeString (m_hstrAIName);
	if (m_hAddObjectives) pServerDE->FreeString (m_hAddObjectives);
	if (m_hRemoveObjectives) pServerDE->FreeString (m_hRemoveObjectives);
	if (m_hCompletedObjectives) pServerDE->FreeString (m_hCompletedObjectives);

	if (!pServerDE) return;
}
开发者ID:Arc0re,项目名称:lithtech,代码行数:11,代码来源:ObjectiveTrigger.cpp


示例20: Setup

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);
	}
}
开发者ID:bsmr-games,项目名称:Blood2,代码行数:54,代码来源:PolyGrid.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ GetServiceType函数代码示例发布时间:2022-05-30
下一篇:
C++ GetSerialNumber函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap