Exemplo n.º 1
0
void SecurityCamera::SetLightColor(LightColor eColor)
{
	if (!m_hLight || m_eLightColor == eColor) return;

	m_eLightColor = eColor;

	char* pSCS = SCS_RED_LIGHT;

	switch (m_eLightColor)
	{
		case eGreen :
			pSCS = SCS_GREEN_LIGHT;
		break;
		
		case eYellow :
			pSCS = SCS_YELLOW_LIGHT;
		break;

		case eBlue :
			pSCS = SCS_BLUE_LIGHT;
		break;
	
		case eRed :
		default :
			pSCS = SCS_RED_LIGHT;
		break;
	}

	char buf[128];
	g_pServerButeMgr->GetSecurityCameraString(pSCS, buf, ARRAY_LEN(buf));
 	SetObjectFilenames(m_hLight, buf, "");
}
Exemplo n.º 2
0
void ScaleSprite::SetDestroyed()
{
	if (m_hstrDestroyedFile)
	{
        SetObjectFilenames(m_hObject, g_pLTServer->GetStringData(m_hstrDestroyedFile), "");
	}
	else
	{
        g_pLTServer->RemoveObject(m_hObject);
	}
}
Exemplo n.º 3
0
LTRESULT CLTCommonClient::SetObjectResource(HOBJECT pObj, EObjectResource eType, uint32 nIndex, const char* pszResource)
{
    FN_NAME(CLTCommonClient::SetObjectResource);
    CHECK_PARAMS2(pObj && (pObj->m_ObjectType == OT_MODEL || pObj->m_ObjectType == OT_SPRITE));

	ObjectCreateStruct ocs;
	ocs.Clear();

	if(pObj->m_ObjectType == OT_MODEL)
	{
		if(eType == eObjectResource_ObjectFile)
		{
			LTStrCpy(ocs.m_Filename, pszResource, MAX_CS_FILENAME_LEN);
		}
		else if(eType == eObjectResource_Texture)
		{
			assert(nIndex < MAX_MODEL_TEXTURES);
			LTStrCpy(ocs.m_SkinNames[nIndex], pszResource, MAX_CS_FILENAME_LEN);
		}
		else if(eType == eObjectResource_RenderStyle)
		{
			assert(nIndex  < MAX_MODEL_RENDERSTYLES);
			LTStrCpy(ocs.m_RenderStyleNames[nIndex], pszResource, MAX_CS_FILENAME_LEN);
		}

		return SetObjectFilenames(pObj, &ocs);
	}
	else
	{
		assert(eType == eObjectResource_ObjectFile);
		LTStrCpy(ocs.m_Filename, pszResource, MAX_CS_FILENAME_LEN);

		return SetObjectFilenames(pObj, &ocs);
	}

	//return the error code
	return LT_OK;
}
Exemplo n.º 4
0
void ScaleSprite::SetDamaged()
{
	if (!m_hstrDamagedFile) return;

    SetObjectFilenames(m_hObject, g_pLTServer->GetStringData(m_hstrDamagedFile), "");
}