Mercurial > mm7
diff mm7_3.cpp @ 767:45615cacad31
Fog fixed
author | Nomad |
---|---|
date | Sat, 23 Mar 2013 21:11:15 +0200 |
parents | e0914a9bc424 |
children | 67b77b052ef3 |
line wrap: on
line diff
--- a/mm7_3.cpp Sat Mar 23 20:22:51 2013 +0200 +++ b/mm7_3.cpp Sat Mar 23 21:11:15 2013 +0200 @@ -6687,7 +6687,7 @@ { v4 = (MapInfo *)thisa; } - day_attrib &= 0xFFFFFFFEu; + day_attrib &= ~DAY_ATTRIB_FOG; dword_6BE13C_uCurrentlyLoadedLocationID = v2; pOutdoor->Initialize( pFilename, @@ -6826,7 +6826,7 @@ return PaletteManager::Get(a2); if ( !pWeather->bNight ) { - if ( day_attrib & 1 ) + if (day_attrib & DAY_ATTRIB_FOG) { v14 = day_fogrange_1 << 16; if ( a3 >= day_fogrange_1 << 16 ) @@ -6959,7 +6959,7 @@ v10 = 0; if ( !v10 ) { - if ( !(day_attrib & 1) && !bUnderwater ) + if ( !(day_attrib & DAY_ATTRIB_FOG) && !bUnderwater ) { v14 = a5; v15 = a6; @@ -7234,13 +7234,13 @@ if ( bUnderwater ) { - result = 0xFF258F5Cu; - } - else - { - if ( day_attrib & 1 ) - { - if ( pWeather->bNight ) + result = 0xFF258F5C; + } + else + { + if (day_attrib & DAY_ATTRIB_FOG) + { + if ( pWeather->bNight ) // night-time fog { __debugbreak(); // decompilation can be inaccurate, please send savegame to Nomad v2 = -(pWeather->bNight != 1); @@ -7253,9 +7253,7 @@ } } else - { - result = 0; - } + return 0; } return result; } @@ -7278,7 +7276,7 @@ v3 = pWeather->bNight; if ( bUnderwater == 1 ) v3 = 0; - if ( pParty->armageddon_timer || !(day_attrib & 1) && !bUnderwater ) + if ( pParty->armageddon_timer || !(day_attrib & DAY_ATTRIB_FOG) && !bUnderwater ) return 0xFF000000; if ( v3 ) {