- beginning levelmeshupdater work
This commit is contained in:
parent
8a5e7449c1
commit
1d86d7080d
3 changed files with 22 additions and 0 deletions
|
|
@ -30,6 +30,7 @@
|
|||
#ifndef __R_DEFS_H__
|
||||
#define __R_DEFS_H__
|
||||
|
||||
#include "levelmeshhelper.h"
|
||||
#include "doomdef.h"
|
||||
|
||||
#include "m_bbox.h"
|
||||
|
|
@ -978,6 +979,7 @@ public:
|
|||
FTextureID old = planes[pos].Texture;
|
||||
planes[pos].Texture = tex;
|
||||
if (floorclip && pos == floor && tex != old) AdjustFloorClip();
|
||||
if (tex != old) LevelMeshUpdater->SectorChanged((void*)this);
|
||||
}
|
||||
|
||||
double GetPlaneTexZ(int pos) const
|
||||
|
|
@ -987,7 +989,9 @@ public:
|
|||
|
||||
void SetPlaneTexZQuick(int pos, double val) // For the *FakeFlat functions which do not need to have the overlap checked.
|
||||
{
|
||||
auto old = planes[pos].TexZ;
|
||||
planes[pos].TexZ = val;
|
||||
if (val != old) LevelMeshUpdater->SectorChanged((void*)this);
|
||||
}
|
||||
|
||||
void SetPlaneTexZ(int pos, double val, bool dirtify = false) // This mainly gets used by init code. The only place where it must set the vertex to dirty is the interpolation code.
|
||||
|
|
@ -1289,7 +1293,9 @@ struct side_t
|
|||
}
|
||||
void SetTexture(int which, FTextureID tex)
|
||||
{
|
||||
auto old = textures[which].texture;
|
||||
textures[which].texture = tex;
|
||||
if (old != tex) LevelMeshUpdater->SideChanged((void*)this);
|
||||
}
|
||||
|
||||
void SetTextureXOffset(int which, double offset)
|
||||
|
|
|
|||
15
src/levelmeshhelper.h
Normal file
15
src/levelmeshhelper.h
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
// level mesh helper
|
||||
// this is a minimal include to keep the other source files a little bit leaner
|
||||
|
||||
struct UpdateLevelMesh
|
||||
{
|
||||
void SectorChanged(void *sector)
|
||||
{
|
||||
}
|
||||
|
||||
void SideChanged(void *side)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
UpdateLevelMesh* LevelMeshUpdater;
|
||||
|
|
@ -7058,6 +7058,7 @@ bool P_ChangeSector(sector_t *sector, int crunch, double amt, int floorOrCeil, b
|
|||
|
||||
}
|
||||
|
||||
LevelMeshUpdater->SectorChanged((void*)sector); // update levelmesh
|
||||
return cpos.nofit;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue