mirror of
https://github.com/ZDoom/ZDRay.git
synced 2024-11-22 12:01:09 +00:00
Fix crash for maps with vertices above 32768
This commit is contained in:
parent
d7b5fbf445
commit
83395455e6
2 changed files with 2 additions and 7 deletions
|
@ -454,7 +454,7 @@ struct FLevel
|
||||||
IntSector *GetBackSector(const IntSideDef *side);
|
IntSector *GetBackSector(const IntSideDef *side);
|
||||||
IntSector *GetSectorFromSubSector(const MapSubsectorEx *sub);
|
IntSector *GetSectorFromSubSector(const MapSubsectorEx *sub);
|
||||||
MapSubsectorEx *PointInSubSector(const int x, const int y);
|
MapSubsectorEx *PointInSubSector(const int x, const int y);
|
||||||
FloatVertex GetSegVertex(int index);
|
FloatVertex GetSegVertex(unsigned int index);
|
||||||
|
|
||||||
vec3 GetLightProbePosition(int index);
|
vec3 GetLightProbePosition(int index);
|
||||||
|
|
||||||
|
|
|
@ -226,13 +226,8 @@ MapSubsectorEx *FLevel::PointInSubSector(const int x, const int y)
|
||||||
return &GLSubsectors[nodenum & ~NFX_SUBSECTOR];
|
return &GLSubsectors[nodenum & ~NFX_SUBSECTOR];
|
||||||
}
|
}
|
||||||
|
|
||||||
FloatVertex FLevel::GetSegVertex(int index)
|
FloatVertex FLevel::GetSegVertex(unsigned int index)
|
||||||
{
|
{
|
||||||
if (index & 0x8000)
|
|
||||||
{
|
|
||||||
index = (index & 0x7FFF) + NumGLVertices;
|
|
||||||
}
|
|
||||||
|
|
||||||
FloatVertex v;
|
FloatVertex v;
|
||||||
v.x = F(GLVertices[index].x);
|
v.x = F(GLVertices[index].x);
|
||||||
v.y = F(GLVertices[index].y);
|
v.y = F(GLVertices[index].y);
|
||||||
|
|
Loading…
Reference in a new issue