Use floating point node bounding boxes

This commit is contained in:
Randy Heit 2016-04-30 22:37:02 -05:00
commit 7d03ed4dc7
7 changed files with 46 additions and 28 deletions

View file

@ -589,7 +589,7 @@ static bool LoadNodes (FileReader * lump)
}
for (k = 0; k < 4; k++)
{
no->bbox[j][k] = LittleShort(mn->bbox[j][k])<<FRACBITS;
no->bbox[j][k] = (float)LittleShort(mn->bbox[j][k]);
}
}
}
@ -649,7 +649,7 @@ static bool LoadNodes (FileReader * lump)
}
for (k = 0; k < 4; k++)
{
no->bbox[j][k] = LittleShort(mn->bbox[j][k])<<FRACBITS;
no->bbox[j][k] = (float)LittleShort(mn->bbox[j][k]);
}
}
}
@ -1135,7 +1135,7 @@ static void CreateCachedNodes(MapData *map)
{
for (int k = 0; k < 4; ++k)
{
WriteWord(ZNodes, nodes[i].bbox[j][k] >> FRACBITS);
WriteWord(ZNodes, (short)nodes[i].bbox[j][k]);
}
}