Mercurial > mm7
changeset 2367:7942b5727708
OutdoorLocation::UpdateSunlightVectors removing some unnecessary typecasts
author | Grumpy7 |
---|---|
date | Sun, 11 May 2014 23:17:23 +0200 |
parents | a2f1c2fd23f3 |
children | 91b6c0a338ad |
files | Outdoor.cpp |
diffstat | 1 files changed, 6 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- 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; } }