mirror of
https://github.com/nillerusr/source-engine.git
synced 2026-08-29 21:49:20 +00:00
upload "kind" alien swarm
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
//========= Copyright Valve Corporation, All rights reserved. ============//
|
||||
//========= Copyright © 1996-2005, Valve Corporation, All rights reserved. ============//
|
||||
//
|
||||
// Purpose: Shadow control entity.
|
||||
//
|
||||
@@ -40,6 +40,7 @@ private:
|
||||
CNetworkColor32( m_shadowColor );
|
||||
CNetworkVar( float, m_flShadowMaxDist );
|
||||
CNetworkVar( bool, m_bDisableShadows );
|
||||
CNetworkVar( bool, m_bEnableLocalLightShadows );
|
||||
};
|
||||
|
||||
LINK_ENTITY_TO_CLASS(shadow_control, CShadowControl);
|
||||
@@ -48,12 +49,14 @@ BEGIN_DATADESC( CShadowControl )
|
||||
|
||||
DEFINE_KEYFIELD( m_flShadowMaxDist, FIELD_FLOAT, "distance" ),
|
||||
DEFINE_KEYFIELD( m_bDisableShadows, FIELD_BOOLEAN, "disableallshadows" ),
|
||||
DEFINE_KEYFIELD( m_bEnableLocalLightShadows, FIELD_BOOLEAN, "enableshadowsfromlocallights" ),
|
||||
|
||||
// Inputs
|
||||
DEFINE_INPUT( m_shadowColor, FIELD_COLOR32, "color" ),
|
||||
DEFINE_INPUT( m_shadowDirection, FIELD_VECTOR, "direction" ),
|
||||
DEFINE_INPUT( m_flShadowMaxDist, FIELD_FLOAT, "SetDistance" ),
|
||||
DEFINE_INPUT( m_bDisableShadows, FIELD_BOOLEAN, "SetShadowsDisabled" ),
|
||||
DEFINE_INPUT( m_bEnableLocalLightShadows, FIELD_BOOLEAN, "SetShadowsFromLocalLightsEnabled" ),
|
||||
|
||||
DEFINE_INPUTFUNC( FIELD_STRING, "SetAngles", InputSetAngles ),
|
||||
|
||||
@@ -62,9 +65,10 @@ END_DATADESC()
|
||||
|
||||
IMPLEMENT_SERVERCLASS_ST_NOBASE(CShadowControl, DT_ShadowControl)
|
||||
SendPropVector(SENDINFO(m_shadowDirection), -1, SPROP_NOSCALE ),
|
||||
SendPropInt(SENDINFO(m_shadowColor), 32, SPROP_UNSIGNED),
|
||||
SendPropInt(SENDINFO(m_shadowColor), 32, SPROP_UNSIGNED, SendProxy_Color32ToInt32 ),
|
||||
SendPropFloat(SENDINFO(m_flShadowMaxDist), 0, SPROP_NOSCALE ),
|
||||
SendPropBool(SENDINFO(m_bDisableShadows)),
|
||||
SendPropBool(SENDINFO(m_bEnableLocalLightShadows)),
|
||||
END_SEND_TABLE()
|
||||
|
||||
|
||||
@@ -74,6 +78,7 @@ CShadowControl::CShadowControl()
|
||||
m_flShadowMaxDist = 50.0f;
|
||||
m_shadowColor.Init( 64, 64, 64, 0 );
|
||||
m_bDisableShadows = false;
|
||||
m_bEnableLocalLightShadows = false;
|
||||
}
|
||||
|
||||
|
||||
@@ -92,7 +97,7 @@ bool CShadowControl::KeyValue( const char *szKeyName, const char *szValue )
|
||||
if ( FStrEq( szKeyName, "color" ) )
|
||||
{
|
||||
color32 tmp;
|
||||
UTIL_StringToColor32( &tmp, szValue );
|
||||
V_StringToColor32( &tmp, szValue );
|
||||
m_shadowColor = tmp;
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user