mirror of
https://github.com/rehlds/rehlds.git
synced 2024-12-27 23:25:45 +03:00
CalcSurfaceExtents: Fixed a fatal error on some maps due loss of floating point
This commit is contained in:
parent
a579f56679
commit
8aca7cfd8f
@ -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])
|
||||
|
Loading…
Reference in New Issue
Block a user