@@ -1244,6 +1244,7 @@ bool CStaticFunctionDefinitions::SetElementDimension ( CClientEntity& Entity, un
12441244 case CCLIENTRADARMARKER:
12451245 case CCLIENTPED:
12461246 case CCLIENTPICKUP:
1247+ case CCLIENTPOINTLIGHTS:
12471248 case CCLIENTRADARAREA:
12481249 case CCLIENTWORLDMESH:
12491250 case CCLIENTSOUND:
@@ -8623,4 +8624,100 @@ bool CStaticFunctionDefinitions::SetSoundPan ( CClientSound& pSound, float fPan
86238624bool CStaticFunctionDefinitions::GetSoundPan ( CClientSound& pSound, float & fPan )
86248625{
86258626 return pSound.GetPan ( fPan );
8627+ }
8628+
8629+ CClientPointLights* CStaticFunctionDefinitions::CreateLight ( CResource& Resource, int iMode, const CVector& vecPosition, float fRadius , SColor color, CVector& vecDirection )
8630+ {
8631+ // Create it
8632+ CClientPointLights* pLight = new CClientPointLights ( m_pManager, INVALID_ELEMENT_ID );
8633+ if ( pLight )
8634+ {
8635+ pLight->SetParent ( Resource.GetResourceDynamicEntity () );
8636+ pLight->SetMode ( iMode );
8637+ pLight->SetPosition ( vecPosition );
8638+ pLight->SetRadius ( fRadius );
8639+ pLight->SetColor ( color );
8640+ pLight->SetDirection ( vecDirection );
8641+
8642+ return pLight;
8643+ }
8644+
8645+ return NULL ;
8646+ }
8647+
8648+
8649+ bool CStaticFunctionDefinitions::GetLightType ( CClientPointLights* pLight, int & iMode )
8650+ {
8651+ if ( pLight )
8652+ {
8653+ iMode = pLight->GetMode ();
8654+ return true ;
8655+ }
8656+ return false ;
8657+ }
8658+
8659+
8660+ bool CStaticFunctionDefinitions::GetLightRadius ( CClientPointLights* pLight, float & fRadius )
8661+ {
8662+ if ( pLight )
8663+ {
8664+ fRadius = pLight->GetRadius ();
8665+ return true ;
8666+ }
8667+ return false ;
8668+ }
8669+
8670+
8671+ bool CStaticFunctionDefinitions::GetLightColor ( CClientPointLights* pLight, SColor& outColor )
8672+ {
8673+ if ( pLight )
8674+ {
8675+ outColor = pLight->GetColor ();
8676+ return true ;
8677+ }
8678+ return false ;
8679+ }
8680+
8681+
8682+ bool CStaticFunctionDefinitions::GetLightDirection ( CClientPointLights* pLight, CVector& vecDirection )
8683+ {
8684+ if ( pLight )
8685+ {
8686+ vecDirection = pLight->GetDirection ();
8687+ return true ;
8688+ }
8689+ return false ;
8690+ }
8691+
8692+
8693+ bool CStaticFunctionDefinitions::SetLightRadius ( CClientPointLights* pLight, float fRadius )
8694+ {
8695+ if ( pLight )
8696+ {
8697+ pLight->SetRadius ( fRadius );
8698+ return true ;
8699+ }
8700+ return false ;
8701+ }
8702+
8703+
8704+ bool CStaticFunctionDefinitions::SetLightColor ( CClientPointLights* pLight, SColor color )
8705+ {
8706+ if ( pLight )
8707+ {
8708+ pLight->SetColor ( color );
8709+ return true ;
8710+ }
8711+ return false ;
8712+ }
8713+
8714+
8715+ bool CStaticFunctionDefinitions::SetLightDirection ( CClientPointLights* pLight, CVector vecDirection )
8716+ {
8717+ if ( pLight )
8718+ {
8719+ pLight->SetDirection ( vecDirection );
8720+ return true ;
8721+ }
8722+ return false ;
86268723}
0 commit comments