diff options
Diffstat (limited to 'nGenEx/VideoDX9.cpp')
-rw-r--r-- | nGenEx/VideoDX9.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/nGenEx/VideoDX9.cpp b/nGenEx/VideoDX9.cpp index d3c623c..902f4cb 100644 --- a/nGenEx/VideoDX9.cpp +++ b/nGenEx/VideoDX9.cpp @@ -1345,9 +1345,10 @@ VideoDX9::SetLights(const List<Light>& lights) d3d_light.Type = (D3DLIGHTTYPE) light->Type();
if (light->Type() == Light::LIGHT_DIRECTIONAL) {
- d3d_light.Direction.x = (float) (-light->Location().x);
- d3d_light.Direction.y = (float) (-light->Location().y);
- d3d_light.Direction.z = (float) (-light->Location().z);
+ Point light_location = light->Location();
+ d3d_light.Direction.x = (float) (-light_location.x);
+ d3d_light.Direction.y = (float) (-light_location.y);
+ d3d_light.Direction.z = (float) (-light_location.z);
if (d3d_light.Direction.x == 0 &&
d3d_light.Direction.y == 0 &&
|