summaryrefslogtreecommitdiffstats
path: root/src/vehicles/Vehicle.cpp
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2020-07-27 15:38:34 +0200
committeraap <aap@papnet.eu>2020-07-27 15:38:46 +0200
commit6b7a8f96a6763e9f0f9e94185afe097cb63984ae (patch)
tree5e8189744c28abffa7739a6bc9b35c69ab85f874 /src/vehicles/Vehicle.cpp
parentMerge pull request #664 from aap/miami (diff)
downloadre3-6b7a8f96a6763e9f0f9e94185afe097cb63984ae.tar
re3-6b7a8f96a6763e9f0f9e94185afe097cb63984ae.tar.gz
re3-6b7a8f96a6763e9f0f9e94185afe097cb63984ae.tar.bz2
re3-6b7a8f96a6763e9f0f9e94185afe097cb63984ae.tar.lz
re3-6b7a8f96a6763e9f0f9e94185afe097cb63984ae.tar.xz
re3-6b7a8f96a6763e9f0f9e94185afe097cb63984ae.tar.zst
re3-6b7a8f96a6763e9f0f9e94185afe097cb63984ae.zip
Diffstat (limited to 'src/vehicles/Vehicle.cpp')
-rw-r--r--src/vehicles/Vehicle.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/vehicles/Vehicle.cpp b/src/vehicles/Vehicle.cpp
index 2c296ee2..378a4c0a 100644
--- a/src/vehicles/Vehicle.cpp
+++ b/src/vehicles/Vehicle.cpp
@@ -2239,7 +2239,7 @@ CVehicle::DoSunGlare(void)
int a2 = colmodel->triangles[i+1].a;
int b2 = colmodel->triangles[i+1].b;
int c2 = colmodel->triangles[i+1].c;
- CVector vert1 = colmodel->vertices[a1];
+ CVector vert1 = colmodel->vertices[a1].Get();
CVector vert4;
// Need an upward surface
if(vert1.z <= 0.0f)
@@ -2250,23 +2250,23 @@ CVehicle::DoSunGlare(void)
if(a2 != a1 && a2 != b1 && a2 != c1){
// a2 is not in tri1
numTri2Verts++;
- vert4 = colmodel->vertices[a2];
+ vert4 = colmodel->vertices[a2].Get();
}
if(b2 != a1 && b2 != b1 && b2 != c1){
// b2 is not in tri1
numTri2Verts++;
- vert4 = colmodel->vertices[b2];
+ vert4 = colmodel->vertices[b2].Get();
}
if(c2 != a1 && c2 != b1 && c2 != c1){
// c2 is not in tri1
numTri2Verts++;
- vert4 = colmodel->vertices[c2];
+ vert4 = colmodel->vertices[c2].Get();
}
// Need exactly one vertex from tri2 for a quad with tri1
if(numTri2Verts != 1)
continue;
- CVector mid = (vert1 + colmodel->vertices[b1] + colmodel->vertices[c1] + vert4)/4.0f;
+ CVector mid = (vert1 + colmodel->vertices[b1].Get() + colmodel->vertices[c1].Get() + vert4)/4.0f;
float dy = mid.y - vert1.y;
float dx = mid.x - vert1.x;
float dist = 1.4f * Min(Abs(dx), Abs(dy));