Skip to content

Commit

Permalink
Typecast to ushort was causing ScaleCornerLight to produce incorrect …
Browse files Browse the repository at this point in the history
…results. Since there is a subsequent normalization phase we don't need to do it there anyway
  • Loading branch information
SiriusTR committed Sep 17, 2019
1 parent 60f5045 commit 3a35973
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/LightManager.Illuminate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,8 @@ for (int i = 0; i < nSegments; i++) {
if (bAll || pSide->IsTagged ()) {
CUVL* pTexCoord = pSide->m_info.uvls;
for (int i = 0; i < 4; i++) {
double l = ((double) ((ushort) pTexCoord [i].l)) * fLight;
l = min (l, 0x8000);
l = max (l, 0);
pTexCoord [i].l = (ushort) l;
double l = ((double) pTexCoord [i].l) * fLight;
pTexCoord [i].l = (uint) l;
}
}
}
Expand Down

0 comments on commit 3a35973

Please sign in to comment.