Alle Welten schwarz

07/01/2012 00:39 ziBBer™#1
Guten Tag Elitepvper's !

Ich habe ein Problem mit all meinen Welten.
Ein Beispiel wie sie aussehen: [Only registered and activated users can see links. Click Here To Register...]
Es ist in jedem Gebiet so, egal ob Madrigal oder Dungeon.
Ich habe auch schon überprüft ob es an den .wld.cnt liegt aber alles ist Richtig.
Von Offi auch mehrfach übernommen aber ohne erfolg.
Tag&Nacht System verwenden wir auch nicht.
07/01/2012 01:20 ziBBer™#2
Werde ich mir gleich genausten anschauen.
Villt. könnte noch Helfen das, wenn ich die Kontinent Umwelt und Real Data im Beast aktiviere(sprich Himmel, Wolken, Nebel ect.) wird es nicht mehr schwarz aber der Himmel lädt dann so eigenartig von wegen es wird erst grau dann erscheint der richtige Himmel erst.
07/01/2012 03:36 Aspectus#3
Was habt ihr so im Source geändert? Hatte mal das gleiche Problem per Source, hab es jedoch dann gefixxed.
07/01/2012 12:32 ziBBer™#4
Großartiges eigentlich nichts was die Welten angeht.
Haben nur damals das Tag & Nacht System drin gehabt, jedoch wieder ausgebaut.

Was auch wiederum komisch ist das wenn ich die .wld.cnt im World ordner änder, sprich mit mit Nebel|Himmel|Wolken adde ist es nicht mehr schwarz, dafür läd der Himmel merkwürdig.


Quote:
Originally Posted by lolix3 View Post
Im World Ordner die Texturen richtig?
Wenn ja, check mal deine Neuz.ini, sind so Sachen, woran es meistens liegt.

Greetz
Ist alles in Ordnung, liegt auch nicht daran
07/01/2012 20:35 **._NeuBie_.**#5
ihr habt wahrscheinlich nicht die passenden Texturen zu den Items und dem Boden in eurem Clienten oder Resourcen. So erkennt das System das nicht und zeigt somit nichtsmehr an.
guckt euch mal die Teyxturen an (von der Welt)
07/01/2012 22:36 Zoeybird#6
Höchstwahrscheinlich Sourcefehler bei ITheme.cpp. Diesma einmal backupen, falls ihr ein Backup habt, sonst könnt ihr die Datei, denke ich auch woanders rausnehmen, die meisten Server changen da nicht soviel.
2. Habt ihr Login Video? Dann liegt der Bug daran, dieses hat einen Bug
07/01/2012 22:53 Pixelfehler#7
Quote:
Originally Posted by Zoeybird View Post
2. Habt ihr Login Video? Dann liegt der Bug daran, dieses hat einen Bug
Stimmt schon aber es ist leicht zu beheben.
07/01/2012 23:52 ziBBer™#8
An Texturen kann nichts Falsch sein, denn wenn ich halt den Himmel/Wolken/Nebel in der wld.cnt aktiviere funktioniert alles bis auf das der Himmel komisch lädt.

Ein Login Video haben wir auch nicht. Jedoch falls es an der ITheme.cpp liegt, müssen wir es halt nachher testen.
07/02/2012 02:00 -Illusion-#9
sobald man andere SFX betritt ist es weg
07/02/2012 07:41 Aspectus#10
Quote:
Originally Posted by Zoeybird View Post
Höchstwahrscheinlich Sourcefehler bei ITheme.cpp. Diesma einmal backupen, falls ihr ein Backup habt, sonst könnt ihr die Datei, denke ich auch woanders rausnehmen, die meisten Server changen da nicht soviel.
2. Habt ihr Login Video? Dann liegt der Bug daran, dieses hat einen Bug
Liegt NICHT an der ITheme olol. Sondern CWorld. (CWorld::SetLight)
Quote:
Originally Posted by Pixelfehler View Post
Stimmt schon aber es ist leicht zu beheben.
Und dein Beitrag ergab jetzt welchen Sinn? Außer Spamm?
Quote:
Originally Posted by zibber View Post
An Texturen kann nichts Falsch sein, denn wenn ich halt den Himmel/Wolken/Nebel in der wld.cnt aktiviere funktioniert alles bis auf das der Himmel komisch lädt.

Ein Login Video haben wir auch nicht. Jedoch falls es an der ITheme.cpp liegt, müssen wir es halt nachher testen.
Ersetz mal deine funktion CWorld::SetLight in der World3D.cpp mit dem:

PHP Code:
void CWorld::SetLight( BOOL bLight )
{
#ifndef  __WORLDSERVER 
    
DWORD dwAmbient = D3DCOLOR_ARGB( 0,0,0,0);
    
CLight* pLight = NULL;

    
D3DXVECTOR3 vPos = ( CObj::GetActiveObj() != NULL ? CObj::GetActiveObj()->GetPos() : D3DXVECTOR3( 0, 0, 0 ) );

    
pLight = GetLight( "direction" );

#if __VER >= 15 // __BS_CHANGING_ENVIR
    
ENVIR_INFO* pInfo = GetInContinent( g_pPlayer->GetPos( ) );
    if( 
pInfo && m_kCurContinent._bUseEnvir )        // ´ë·ú ¾ÈÀÌ°í ´ë·úÁ¤º¸¸¦ ÀÌ¿ëÇÒ °æ¿ì¸¸ !!
    
{
        if( 
pLight )
        {
            
pLight->Ambient.r =  pInfo->_fAmbient[ 0 ];
            
pLight->Ambient.g =  pInfo->_fAmbient[ 1 ];
            
pLight->Ambient.b =  pInfo->_fAmbient[ 2 ];

            
pLight->Specular.r = 2.0f;
            
pLight->Specular.g = 2.0f;
            
pLight->Specular.b = 2.0f;

            
pLight->Diffuse.r = pInfo->_fDiffuse[ 0 ];
            
pLight->Diffuse.g = pInfo->_fDiffuse[ 1 ];
            
pLight->Diffuse.b = pInfo->_fDiffuse[ 2 ];

            
HookUpdateLight( pLight ); 

            
memcpy( &m_lightFogSky, pLight, sizeof( m_lightFogSky ) );
        
            
pLight->Diffuse.r *= 1.2f;
            
pLight->Diffuse.g *= 1.2f;
            
pLight->Diffuse.b *= 1.2f;

            
pLight->Ambient.r *= 0.8f;
            
pLight->Ambient.g *= 0.8f;
            
pLight->Ambient.b *= 0.8f;
    
            
memcpy( &m_light, pLight, sizeof( m_light ) );

             
D3DXVECTOR3 vecSun = D3DXVECTOR3( 0.0f, 0.5f,0.5f);
             
D3DXVec3Normalize(&(vecSun),&(vecSun));
             
pLight->SetDir( -vecSun.x, -vecSun.y, -vecSun.z ); 
             
pLight->Appear( m_pd3dDevice, TRUE );
    
            
DWORD dwR, dwG, dwB;
            
dwR = (DWORD)( pLight->Ambient.r * 255 );
            
dwG = (DWORD)( pLight->Ambient.g * 255 );
            
dwB = (DWORD)( pLight->Ambient.b * 255 );
            
dwAmbient = D3DCOLOR_ARGB( 255, dwR, dwG, dwB );
        }
    }
    else
#endif 

    
if( m_bIsIndoor )
    {
        if( 
pLight )
        {        
            
// À½¿µ º¯È* 
            
pLight->Diffuse.r = ((m_dwDiffuse>>16) & 0xff) / 255.f;
            
pLight->Diffuse.g = ((m_dwDiffuse>>8) & 0xff)  / 255.f;
            
pLight->Diffuse.b = ((m_dwDiffuse) & 0xff)     / 255.f;

            
// º¯È* ¾øÀ½ 
            
pLight->Specular.r = 1.0f;
            
pLight->Specular.g = 1.0f;
            
pLight->Specular.b = 1.0f;
            
// Àüü º¯È* 
            
pLight->Ambient.r  = ((m_dwAmbient>>16) & 0xff) / 255.f;
            
pLight->Ambient.g  = ((m_dwAmbient>>8) & 0xff)  / 255.f;
            
pLight->Ambient.b  = ((m_dwAmbient) & 0xff)     / 255.f;

            if( 
g_Option.m_nBloom )        // »Ç»þ½Ã ¿É¼ÇÀÌ ÄÑÁ®ÀÖÀ»¶© Á¶¸íÀ» Á» ³·ÃçÁà¾ß ÇÑ´Ù. ¾È±×·¯¸é ³Ê¹« ¹à¾Æ.
            
{
                
pLight->Diffuse.r *= 0.6f;
                
pLight->Diffuse.g *= 0.6f;
                
pLight->Diffuse.b *= 0.6f;
                
pLight->Ambient.r *= 0.7f;
                
pLight->Ambient.g *= 0.7f;
                
pLight->Ambient.b *= 0.7f;
            }

#if __VER >= 15 // __BS_CHANGING_ENVIR
            
HookUpdateLight( pLight );
#endif
            
memcpy( &m_lightFogSky, pLight, sizeof( m_lightFogSky ) );

            
pLight->Diffuse.r  += 0.1f;
            
pLight->Diffuse.g  += 0.1f;
            
pLight->Diffuse.b  += 0.1f;
            
// º¯È* ¾øÀ½ 
            
pLight->Specular.r = 2.0f;
            
pLight->Specular.g = 2.0f;
            
pLight->Specular.b = 2.0f;
            
// ÁÖº¯ 
            
pLight->Ambient.r  *= 0.9f;
            
pLight->Ambient.g  *= 0.9f;
            
pLight->Ambient.b  *= 0.9f;

            
memcpy( &m_light, pLight, sizeof( m_light ) );
            
            
pLight->SetDir( m_v3LightDir.x, m_v3LightDir.y, m_v3LightDir.z );
            
pLight->Appear( m_pd3dDevice, TRUE );
    
            
DWORD dwR, dwG, dwB;
            
dwR = (DWORD)( pLight->Ambient.r * 255 );
            
dwG = (DWORD)( pLight->Ambient.g * 255 );
            
dwB = (DWORD)( pLight->Ambient.b * 255 );
            
dwAmbient = D3DCOLOR_ARGB( 255, dwR, dwG, dwB );
        }
    }
    else
    {
        if( 
pLight )
        {
        
            
int nHour = 8, nMin = 0;
    
#ifdef __CLIENT
            // Å¬¶óÀÌ¾ðÆ®´Â ½Ã°£À» g_GameTimer¿¡¼* °¡Á®¿Â´Ù. 
            
nHour = g_GameTimer.m_nHour;
            
nMin  = g_GameTimer.m_nMin ;
    
#else
            // ºñ½ºÆ®´Â ½Ã°£À» m_nLightHour¿¡¼* °¡Á®¿Â´Ù.
            
if( m_nLightType == 1 )
                
nHour = m_nLightHour;
    
#endif
            
nHour--;
            if( 
nHour < 0 ) nHour = 0;
            if( 
nHour > 23 ) nHour = 23;

            
//if( m_bFixedHour )
            //    nHour = m_nFixedHour, nMin = 0;
            
LIGHTCOLOR lightColorPrv = m_k24Light[ ( nHour - 1 == -1 ) ? 23 : nHour - 1 ];
            
LIGHTCOLOR lightColor = m_k24Light[ nHour ];

            
//m_lightColor = lightColorPrv;
            
lightColorPrv.r1 += ( lightColor.r1 - lightColorPrv.r1) * nMin / 60;
            
lightColorPrv.g1 += ( lightColor.g1 - lightColorPrv.g1) * nMin / 60;
            
lightColorPrv.b1 += ( lightColor.b1 - lightColorPrv.b1) * nMin / 60;
            
lightColorPrv.r2 += ( lightColor.r2 - lightColorPrv.r2) * nMin / 60;
            
lightColorPrv.g2 += ( lightColor.g2 - lightColorPrv.g2) * nMin / 60;
            
lightColorPrv.b2 += ( lightColor.b2 - lightColorPrv.b2) * nMin / 60;
            
// 60(minMax) : 15(curMin) = 0.5(colorDistant) : x(curCol)

            // À½¿µ º¯È* 
            
pLight->Diffuse.r  = lightColorPrv.r1;
            
pLight->Diffuse.g  = lightColorPrv.g1;
            
pLight->Diffuse.b  = lightColorPrv.b1;
            
// º¯È* ¾øÀ½ 
            
pLight->Specular.r = 1.0f;
            
pLight->Specular.g = 1.0f;
            
pLight->Specular.b = 1.0f;
            
// Àüü º¯È* 
            
pLight->Ambient.r  = lightColorPrv.r2;
            
pLight->Ambient.g  = lightColorPrv.g2;
            
pLight->Ambient.b  = lightColorPrv.b2;

            if( 
g_Option.m_nBloom )        // »Ç»þ½Ã ¿É¼ÇÀÌ ÄÑÁ®ÀÖÀ»¶© Á¶¸íÀ» Á» ³·ÃçÁà¾ß ÇÑ´Ù. ¾È±×·¯¸é ³Ê¹« ¹à¾Æ.
            
{
                
pLight->Diffuse.r *= 0.6f;
                
pLight->Diffuse.g *= 0.6f;
                
pLight->Diffuse.b *= 0.6f;
                
pLight->Ambient.r *= 0.7f;
                
pLight->Ambient.g *= 0.7f;
                
pLight->Ambient.b *= 0.7f;
            }
            
#if __VER >= 15 // __BS_CHANGING_ENVIR
            
HookUpdateLight( pLight ); 
#endif
            
memcpy( &m_lightFogSky, pLight, sizeof( m_lightFogSky ) );

#ifdef __YENV
            
pLight->Diffuse.r  *= 1.1f;
            
pLight->Diffuse.g  *= 1.1f;
            
pLight->Diffuse.b  *= 1.1f;
            
// º¯È* ¾øÀ½ 
            
pLight->Specular.r = 2.0f;
            
pLight->Specular.g = 2.0f;
            
pLight->Specular.b = 2.0f;
            
// ÁÖº¯ 
            
pLight->Ambient.r  *= 1.0f;
            
pLight->Ambient.g  *= 1.0f;
            
pLight->Ambient.b  *= 1.0f;
#else //__YENV
            
pLight->Diffuse.r  *= 1.1f;
            
pLight->Diffuse.g  *= 1.1f;
            
pLight->Diffuse.b  *= 1.1f;
            
// º¯È* ¾øÀ½ 
            
pLight->Specular.r = 2.0f;
            
pLight->Specular.g = 2.0f;
            
pLight->Specular.b = 2.0f;
            
// ÁÖº¯ 
            
pLight->Ambient.r  *= 0.9f;
            
pLight->Ambient.g  *= 0.9f;
            
pLight->Ambient.b  *= 0.9f;
#endif //__YENV 
            
            
memcpy( &m_light, pLight, sizeof( m_light ) );
            
            
D3DXVECTOR3 vecSun=D3DXVECTOR3( 0.0f, 0.0f,1.0f);
            
D3DXMATRIX  matTemp;
            static const 
float CONS_VAL = 3.1415926f / 180.f;

            
D3DXMatrixRotationX( &matTemp,(m_skyBox.m_fSunAngle +180)*CONS_VAL);
            
D3DXVec3TransformCoord(&vecSun,&vecSun,&matTemp);
            
pLight->SetDir( vecSun.x, vecSun.y, vecSun.z ); 
            
pLight->Appear( m_pd3dDevice, TRUE );

            
//    D3DXVECTOR3 vecSun = D3DXVECTOR3( 0.0f, 0.5f,0.5f);
            //    D3DXVec3Normalize(&(vecSun),&(vecSun));
            //    pLight->SetDir( -vecSun.x, -vecSun.y, -vecSun.z ); 

            
DWORD dwR, dwG, dwB;
            
dwR = (DWORD)( pLight->Ambient.r * 255 );
            
dwG = (DWORD)( pLight->Ambient.g * 255 );
            
dwB = (DWORD)( pLight->Ambient.b * 255 );
            
dwAmbient = D3DCOLOR_ARGB( 255, dwR, dwG, dwB );            
        }
    }

    
m_pd3dDevice->SetRenderState( D3DRS_LIGHTING, bLight );//m_bViewLight );
    
m_pd3dDevice->SetRenderState( D3DRS_AMBIENT, dwAmbient );//D3DCOLOR_ARGB( 0,0,0,0) ); //m_dwAmbient );//D3DCOLOR_ARGB( 255,128,128,128) );//D3DCOLOR_ARGB( 255,50,50,70) );
    
::SetLight( bLight );

    
// ±âº» ÆÐÅ͸®¾ó Á¤ÀÇ 
    
m_pd3dDevice->SetMaterial( &m_baseMaterial );
    
#endif // not WORLDSERVER
} 
07/02/2012 07:48 Мarvin#11
Quote:
Originally Posted by lolix3 View Post
[...]check mal deine Neuz.ini, sind so Sachen, woran es meistens liegt.
Quote:
Originally Posted by Pixelfehler View Post
Stimmt schon aber es ist leicht zu beheben.
Ey eure Posts sind echt Spamm ohne Scheiß x'D
Ich persönlich kann leider nicht helfen, da ich mich bei dem Screen
schrottlachen musste (VOTEN TUT GUT!).

Aber mach einfach dass was Moikok gesagt hat :p
.. oder sonst einfach mal überprüfen ob nicht doch ein Day/Night drin ist,
vielleicht wurde es ja einfach nicht mit ifdef's besetzt, u know?

(Hoooray ich hab auch mitgemacht.)
07/03/2012 17:29 ziBBer™#12
Quote:
Originally Posted by Aspectus View Post
Liegt NICHT an der ITheme olol. Sondern CWorld. (CWorld::SetLight)

Ersetz mal deine funktion CWorld::SetLight in der World3D.cpp mit dem:

PHP Code:
void CWorld::SetLight( BOOL bLight )
{
#ifndef  __WORLDSERVER 
    
DWORD dwAmbient = D3DCOLOR_ARGB( 0,0,0,0);
    
CLight* pLight = NULL;

    
D3DXVECTOR3 vPos = ( CObj::GetActiveObj() != NULL ? CObj::GetActiveObj()->GetPos() : D3DXVECTOR3( 0, 0, 0 ) );

    
pLight = GetLight( "direction" );

#if __VER >= 15 // __BS_CHANGING_ENVIR
    
ENVIR_INFO* pInfo = GetInContinent( g_pPlayer->GetPos( ) );
    if( 
pInfo && m_kCurContinent._bUseEnvir )        // ´ë·ú ¾ÈÀÌ°í ´ë·úÁ¤º¸¸¦ ÀÌ¿ëÇÒ °æ¿ì¸¸ !!
    
{
        if( 
pLight )
        {
            
pLight->Ambient.r =  pInfo->_fAmbient[ 0 ];
            
pLight->Ambient.g =  pInfo->_fAmbient[ 1 ];
            
pLight->Ambient.b =  pInfo->_fAmbient[ 2 ];

            
pLight->Specular.r = 2.0f;
            
pLight->Specular.g = 2.0f;
            
pLight->Specular.b = 2.0f;

            
pLight->Diffuse.r = pInfo->_fDiffuse[ 0 ];
            
pLight->Diffuse.g = pInfo->_fDiffuse[ 1 ];
            
pLight->Diffuse.b = pInfo->_fDiffuse[ 2 ];

            
HookUpdateLight( pLight ); 

            
memcpy( &m_lightFogSky, pLight, sizeof( m_lightFogSky ) );
        
            
pLight->Diffuse.r *= 1.2f;
            
pLight->Diffuse.g *= 1.2f;
            
pLight->Diffuse.b *= 1.2f;

            
pLight->Ambient.r *= 0.8f;
            
pLight->Ambient.g *= 0.8f;
            
pLight->Ambient.b *= 0.8f;
    
            
memcpy( &m_light, pLight, sizeof( m_light ) );

             
D3DXVECTOR3 vecSun = D3DXVECTOR3( 0.0f, 0.5f,0.5f);
             
D3DXVec3Normalize(&(vecSun),&(vecSun));
             
pLight->SetDir( -vecSun.x, -vecSun.y, -vecSun.z ); 
             
pLight->Appear( m_pd3dDevice, TRUE );
    
            
DWORD dwR, dwG, dwB;
            
dwR = (DWORD)( pLight->Ambient.r * 255 );
            
dwG = (DWORD)( pLight->Ambient.g * 255 );
            
dwB = (DWORD)( pLight->Ambient.b * 255 );
            
dwAmbient = D3DCOLOR_ARGB( 255, dwR, dwG, dwB );
        }
    }
    else
#endif 

    
if( m_bIsIndoor )
    {
        if( 
pLight )
        {        
            
// À½¿µ º¯È* 
            
pLight->Diffuse.r = ((m_dwDiffuse>>16) & 0xff) / 255.f;
            
pLight->Diffuse.g = ((m_dwDiffuse>>8) & 0xff)  / 255.f;
            
pLight->Diffuse.b = ((m_dwDiffuse) & 0xff)     / 255.f;

            
// º¯È* ¾øÀ½ 
            
pLight->Specular.r = 1.0f;
            
pLight->Specular.g = 1.0f;
            
pLight->Specular.b = 1.0f;
            
// Àüü º¯È* 
            
pLight->Ambient.r  = ((m_dwAmbient>>16) & 0xff) / 255.f;
            
pLight->Ambient.g  = ((m_dwAmbient>>8) & 0xff)  / 255.f;
            
pLight->Ambient.b  = ((m_dwAmbient) & 0xff)     / 255.f;

            if( 
g_Option.m_nBloom )        // »Ç»þ½Ã ¿É¼ÇÀÌ ÄÑÁ®ÀÖÀ»¶© Á¶¸íÀ» Á» ³·ÃçÁà¾ß ÇÑ´Ù. ¾È±×·¯¸é ³Ê¹« ¹à¾Æ.
            
{
                
pLight->Diffuse.r *= 0.6f;
                
pLight->Diffuse.g *= 0.6f;
                
pLight->Diffuse.b *= 0.6f;
                
pLight->Ambient.r *= 0.7f;
                
pLight->Ambient.g *= 0.7f;
                
pLight->Ambient.b *= 0.7f;
            }

#if __VER >= 15 // __BS_CHANGING_ENVIR
            
HookUpdateLight( pLight );
#endif
            
memcpy( &m_lightFogSky, pLight, sizeof( m_lightFogSky ) );

            
pLight->Diffuse.r  += 0.1f;
            
pLight->Diffuse.g  += 0.1f;
            
pLight->Diffuse.b  += 0.1f;
            
// º¯È* ¾øÀ½ 
            
pLight->Specular.r = 2.0f;
            
pLight->Specular.g = 2.0f;
            
pLight->Specular.b = 2.0f;
            
// ÁÖº¯ 
            
pLight->Ambient.r  *= 0.9f;
            
pLight->Ambient.g  *= 0.9f;
            
pLight->Ambient.b  *= 0.9f;

            
memcpy( &m_light, pLight, sizeof( m_light ) );
            
            
pLight->SetDir( m_v3LightDir.x, m_v3LightDir.y, m_v3LightDir.z );
            
pLight->Appear( m_pd3dDevice, TRUE );
    
            
DWORD dwR, dwG, dwB;
            
dwR = (DWORD)( pLight->Ambient.r * 255 );
            
dwG = (DWORD)( pLight->Ambient.g * 255 );
            
dwB = (DWORD)( pLight->Ambient.b * 255 );
            
dwAmbient = D3DCOLOR_ARGB( 255, dwR, dwG, dwB );
        }
    }
    else
    {
        if( 
pLight )
        {
        
            
int nHour = 8, nMin = 0;
    
#ifdef __CLIENT
            // Å¬¶óÀÌ¾ðÆ®´Â ½Ã°£À» g_GameTimer¿¡¼* °¡Á®¿Â´Ù. 
            
nHour = g_GameTimer.m_nHour;
            
nMin  = g_GameTimer.m_nMin ;
    
#else
            // ºñ½ºÆ®´Â ½Ã°£À» m_nLightHour¿¡¼* °¡Á®¿Â´Ù.
            
if( m_nLightType == 1 )
                
nHour = m_nLightHour;
    
#endif
            
nHour--;
            if( 
nHour < 0 ) nHour = 0;
            if( 
nHour > 23 ) nHour = 23;

            
//if( m_bFixedHour )
            //    nHour = m_nFixedHour, nMin = 0;
            
LIGHTCOLOR lightColorPrv = m_k24Light[ ( nHour - 1 == -1 ) ? 23 : nHour - 1 ];
            
LIGHTCOLOR lightColor = m_k24Light[ nHour ];

            
//m_lightColor = lightColorPrv;
            
lightColorPrv.r1 += ( lightColor.r1 - lightColorPrv.r1) * nMin / 60;
            
lightColorPrv.g1 += ( lightColor.g1 - lightColorPrv.g1) * nMin / 60;
            
lightColorPrv.b1 += ( lightColor.b1 - lightColorPrv.b1) * nMin / 60;
            
lightColorPrv.r2 += ( lightColor.r2 - lightColorPrv.r2) * nMin / 60;
            
lightColorPrv.g2 += ( lightColor.g2 - lightColorPrv.g2) * nMin / 60;
            
lightColorPrv.b2 += ( lightColor.b2 - lightColorPrv.b2) * nMin / 60;
            
// 60(minMax) : 15(curMin) = 0.5(colorDistant) : x(curCol)

            // À½¿µ º¯È* 
            
pLight->Diffuse.r  = lightColorPrv.r1;
            
pLight->Diffuse.g  = lightColorPrv.g1;
            
pLight->Diffuse.b  = lightColorPrv.b1;
            
// º¯È* ¾øÀ½ 
            
pLight->Specular.r = 1.0f;
            
pLight->Specular.g = 1.0f;
            
pLight->Specular.b = 1.0f;
            
// Àüü º¯È* 
            
pLight->Ambient.r  = lightColorPrv.r2;
            
pLight->Ambient.g  = lightColorPrv.g2;
            
pLight->Ambient.b  = lightColorPrv.b2;

            if( 
g_Option.m_nBloom )        // »Ç»þ½Ã ¿É¼ÇÀÌ ÄÑÁ®ÀÖÀ»¶© Á¶¸íÀ» Á» ³·ÃçÁà¾ß ÇÑ´Ù. ¾È±×·¯¸é ³Ê¹« ¹à¾Æ.
            
{
                
pLight->Diffuse.r *= 0.6f;
                
pLight->Diffuse.g *= 0.6f;
                
pLight->Diffuse.b *= 0.6f;
                
pLight->Ambient.r *= 0.7f;
                
pLight->Ambient.g *= 0.7f;
                
pLight->Ambient.b *= 0.7f;
            }
            
#if __VER >= 15 // __BS_CHANGING_ENVIR
            
HookUpdateLight( pLight ); 
#endif
            
memcpy( &m_lightFogSky, pLight, sizeof( m_lightFogSky ) );

#ifdef __YENV
            
pLight->Diffuse.r  *= 1.1f;
            
pLight->Diffuse.g  *= 1.1f;
            
pLight->Diffuse.b  *= 1.1f;
            
// º¯È* ¾øÀ½ 
            
pLight->Specular.r = 2.0f;
            
pLight->Specular.g = 2.0f;
            
pLight->Specular.b = 2.0f;
            
// ÁÖº¯ 
            
pLight->Ambient.r  *= 1.0f;
            
pLight->Ambient.g  *= 1.0f;
            
pLight->Ambient.b  *= 1.0f;
#else //__YENV
            
pLight->Diffuse.r  *= 1.1f;
            
pLight->Diffuse.g  *= 1.1f;
            
pLight->Diffuse.b  *= 1.1f;
            
// º¯È* ¾øÀ½ 
            
pLight->Specular.r = 2.0f;
            
pLight->Specular.g = 2.0f;
            
pLight->Specular.b = 2.0f;
            
// ÁÖº¯ 
            
pLight->Ambient.r  *= 0.9f;
            
pLight->Ambient.g  *= 0.9f;
            
pLight->Ambient.b  *= 0.9f;
#endif //__YENV 
            
            
memcpy( &m_light, pLight, sizeof( m_light ) );
            
            
D3DXVECTOR3 vecSun=D3DXVECTOR3( 0.0f, 0.0f,1.0f);
            
D3DXMATRIX  matTemp;
            static const 
float CONS_VAL = 3.1415926f / 180.f;

            
D3DXMatrixRotationX( &matTemp,(m_skyBox.m_fSunAngle +180)*CONS_VAL);
            
D3DXVec3TransformCoord(&vecSun,&vecSun,&matTemp);
            
pLight->SetDir( vecSun.x, vecSun.y, vecSun.z ); 
            
pLight->Appear( m_pd3dDevice, TRUE );

            
//    D3DXVECTOR3 vecSun = D3DXVECTOR3( 0.0f, 0.5f,0.5f);
            //    D3DXVec3Normalize(&(vecSun),&(vecSun));
            //    pLight->SetDir( -vecSun.x, -vecSun.y, -vecSun.z ); 

            
DWORD dwR, dwG, dwB;
            
dwR = (DWORD)( pLight->Ambient.r * 255 );
            
dwG = (DWORD)( pLight->Ambient.g * 255 );
            
dwB = (DWORD)( pLight->Ambient.b * 255 );
            
dwAmbient = D3DCOLOR_ARGB( 255, dwR, dwG, dwB );            
        }
    }

    
m_pd3dDevice->SetRenderState( D3DRS_LIGHTING, bLight );//m_bViewLight );
    
m_pd3dDevice->SetRenderState( D3DRS_AMBIENT, dwAmbient );//D3DCOLOR_ARGB( 0,0,0,0) ); //m_dwAmbient );//D3DCOLOR_ARGB( 255,128,128,128) );//D3DCOLOR_ARGB( 255,50,50,70) );
    
::SetLight( bLight );

    
// ±âº» ÆÐÅ͸®¾ó Á¤ÀÇ 
    
m_pd3dDevice->SetMaterial( &m_baseMaterial );
    
#endif // not WORLDSERVER
} 
Deine Methode hat Funktioniert :)

Kann 'Geschlossen' werden