- moved the code in gl_data.cpp to better fitting places
* the MAPINFO options now get handled in g_mapinfo.cpp and g_level.cpp, just like the rest of them as members of level_info_t and FLevelLocals. * RecalcVertexHeights has been made a member of vertex_t and been moved to p_sectors.cpp. * the dumpgeometry CCMD has been moved to p_setup.cpp
This commit is contained in:
parent
0127a71974
commit
65e7b6dfaa
22 changed files with 249 additions and 390 deletions
|
|
@ -2395,6 +2395,46 @@ int side_t::GetLightLevel (bool foggy, int baselight, bool is3dlight, int *pfake
|
|||
return baselight;
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
// Recalculate all heights affecting this vertex.
|
||||
//
|
||||
//==========================================================================
|
||||
|
||||
void vertex_t::RecalcVertexHeights()
|
||||
{
|
||||
int i, j, k;
|
||||
float height;
|
||||
|
||||
numheights = 0;
|
||||
for (i = 0; i < numsectors; i++)
|
||||
{
|
||||
for (j = 0; j<2; j++)
|
||||
{
|
||||
if (j == 0) height = (float)sectors[i]->ceilingplane.ZatPoint(this);
|
||||
else height = (float)sectors[i]->floorplane.ZatPoint(this);
|
||||
|
||||
for (k = 0; k < numheights; k++)
|
||||
{
|
||||
if (height == heightlist[k]) break;
|
||||
if (height < heightlist[k])
|
||||
{
|
||||
memmove(&heightlist[k + 1], &heightlist[k], sizeof(float) * (numheights - k));
|
||||
heightlist[k] = height;
|
||||
numheights++;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (k == numheights) heightlist[numheights++] = height;
|
||||
}
|
||||
}
|
||||
if (numheights <= 2) numheights = 0; // is not in need of any special attention
|
||||
dirty = false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
DEFINE_ACTION_FUNCTION(_Secplane, isSlope)
|
||||
{
|
||||
PARAM_SELF_STRUCT_PROLOGUE(secplane_t);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue