# HG changeset patch # User Grumpy7 # Date 1399843043 -7200 # Node ID 7942b57277082a435aeda518d9add210a0ca1933 # Parent a2f1c2fd23f3f7403fd73ec90b627f322a1d0b15 OutdoorLocation::UpdateSunlightVectors removing some unnecessary typecasts diff -r a2f1c2fd23f3 -r 7942b5727708 Outdoor.cpp --- a/Outdoor.cpp Sun May 11 23:12:36 2014 +0200 +++ b/Outdoor.cpp Sun May 11 23:17:23 2014 +0200 @@ -481,16 +481,16 @@ { v3 = pParty->uCurrentMinute + 60 * (pParty->uCurrentHour - 5); this->inv_sunlight_y = 0; - this->inv_sunlight_x = stru_5C6E00->Cos((signed int)(v3 * stru_5C6E00->uIntegerPi) / 960); - this->inv_sunlight_z = stru_5C6E00->Sin((signed int)(v3 * stru_5C6E00->uIntegerPi) / 960); + this->inv_sunlight_x = stru_5C6E00->Cos((v3 * stru_5C6E00->uIntegerPi) / 960); + this->inv_sunlight_z = stru_5C6E00->Sin((v3 * stru_5C6E00->uIntegerPi) / 960); this->vSunlight.x = -this->inv_sunlight_x; this->vSunlight.y = -this->inv_sunlight_y; this->vSunlight.z = -this->inv_sunlight_z; - if ( (signed int)v3 >= 480 ) - v8 = (double)(signed int)(960 - v3); + if ( v3 >= 480 ) + v8 = 960 - v3; else - v8 = (double)(signed int)v3; - this->max_terrain_dimming_level = (signed __int64)(20.0 - v8 / 480.0 * 20.0); + v8 = v3; + this->max_terrain_dimming_level = (int)(20.0 - v8 / 480.0 * 20.0); this->uLastSunlightUpdateMinute = pParty->uCurrentMinute; } }