mirror of
https://github.com/celisej567/source-engine.git
synced 2026-01-03 05:49:41 +03:00
upload "kind" alien swarm
This commit is contained in:
@@ -1,15 +1,15 @@
|
||||
//========= Copyright Valve Corporation, All rights reserved. ============//
|
||||
//========= Copyright <20> 1996-2005, Valve Corporation, All rights reserved. ============//
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================//
|
||||
#include "cbase.h"
|
||||
#include "functionproxy.h"
|
||||
#include "FunctionProxy.h"
|
||||
#include <KeyValues.h>
|
||||
#include "materialsystem/imaterialvar.h"
|
||||
#include "materialsystem/imaterial.h"
|
||||
#include "iclientrenderable.h"
|
||||
#include "materialsystem/IMaterialVar.h"
|
||||
#include "materialsystem/IMaterial.h"
|
||||
#include "IClientRenderable.h"
|
||||
|
||||
// memdbgon must be the last include file in a .cpp file!!!
|
||||
#include "tier0/memdbgon.h"
|
||||
@@ -138,6 +138,11 @@ bool CResultProxy::Init( IMaterial *pMaterial, KeyValues *pKeyValues )
|
||||
if( !foundVar )
|
||||
return false;
|
||||
|
||||
if ( !Q_stricmp( pResult, "$alpha" ) )
|
||||
{
|
||||
pMaterial->SetMaterialVarFlag( MATERIAL_VAR_ALPHA_MODIFIED_BY_PROXY, true );
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -170,10 +175,24 @@ void CResultProxy::SetFloatResult( float result )
|
||||
}
|
||||
}
|
||||
|
||||
void CResultProxy::SetVecResult( float x, float y, float z, float w )
|
||||
{
|
||||
if (m_pResult->GetType() == MATERIAL_VAR_TYPE_VECTOR)
|
||||
{
|
||||
float v[4] = { x, y, z, w };
|
||||
int vecSize = m_pResult->VectorSize();
|
||||
m_pResult->SetVecValue( v, vecSize );
|
||||
}
|
||||
else
|
||||
{
|
||||
m_pResult->SetFloatValue( x );
|
||||
}
|
||||
}
|
||||
|
||||
C_BaseEntity *CResultProxy::BindArgToEntity( void *pArg )
|
||||
{
|
||||
IClientRenderable *pRend = (IClientRenderable *)pArg;
|
||||
return pRend ? pRend->GetIClientUnknown()->GetBaseEntity() : NULL;
|
||||
return pRend->GetIClientUnknown()->GetBaseEntity();
|
||||
}
|
||||
|
||||
IMaterial *CResultProxy::GetMaterial()
|
||||
|
||||
Reference in New Issue
Block a user