diff --git a/rehlds/engine/model.cpp b/rehlds/engine/model.cpp index 4c29ecc..a4581e5 100644 --- a/rehlds/engine/model.cpp +++ b/rehlds/engine/model.cpp @@ -866,10 +866,12 @@ void CalcSurfaceExtents(msurface_t *s) for (j = 0; j < 2; j++) { - val = v->position[0] * tex->vecs[j][0] + - v->position[1] * tex->vecs[j][1] + - v->position[2] * tex->vecs[j][2] + - tex->vecs[j][3]; + // FIXED: loss of floating point + val = v->position[0] * (double)tex->vecs[j][0] + + v->position[1] * (double)tex->vecs[j][1] + + v->position[2] * (double)tex->vecs[j][2] + + (double)tex->vecs[j][3]; + if (val < mins[j]) mins[j] = val; if (val > maxs[j])