upload "kind" alien swarm

This commit is contained in:
nillerusr
2023-10-03 17:23:56 +03:00
parent b7bd94c52e
commit 7d3c0d8b5a
4229 changed files with 462903 additions and 495158 deletions

View File

@@ -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()