diff --git a/src/common/rendering/hwrenderer/data/hw_meshbuilder.cpp b/src/common/rendering/hwrenderer/data/hw_meshbuilder.cpp index 83a25200c..95317975c 100644 --- a/src/common/rendering/hwrenderer/data/hw_meshbuilder.cpp +++ b/src/common/rendering/hwrenderer/data/hw_meshbuilder.cpp @@ -14,6 +14,8 @@ struct NullLevelMeshUpdater : UpdateLevelMesh virtual void FloorTextureChanged(struct sector_t *sector) {}; virtual void CeilingTextureChanged(struct sector_t *sector) {}; + virtual void SectorChangedOther(struct sector_t *sector) {}; + virtual void SideTextureChanged(struct side_t *side, int section) {}; }; diff --git a/src/gamedata/r_defs.h b/src/gamedata/r_defs.h index a50445ded..ba281b360 100644 --- a/src/gamedata/r_defs.h +++ b/src/gamedata/r_defs.h @@ -1004,27 +1004,28 @@ public: if (val != old) { + //not sure actually what TexZ does, so changing passing this as "Other" if(pos) { - LevelMeshUpdater->FloorHeightChanged(this); + LevelMeshUpdater->SectorChangedOther(this); } else { - LevelMeshUpdater->CeilingHeightChanged(this); + LevelMeshUpdater->SectorChangedOther(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. { - planes[pos].TexZ = val; + SetPlaneTexZQuick(pos, val); if (dirtify) SetAllVerticesDirty(); CheckOverlap(); } void ChangePlaneTexZ(int pos, double val) { - planes[pos].TexZ += val; + SetPlaneTexZQuick(pos, planes[pos].TexZ + val); SetAllVerticesDirty(); CheckOverlap(); } diff --git a/src/levelmeshhelper.h b/src/levelmeshhelper.h index 69710cff8..f6b6eda23 100644 --- a/src/levelmeshhelper.h +++ b/src/levelmeshhelper.h @@ -11,6 +11,8 @@ struct UpdateLevelMesh virtual void FloorTextureChanged(struct sector_t *sector) = 0; virtual void CeilingTextureChanged(struct sector_t *sector) = 0; + virtual void SectorChangedOther(struct sector_t *sector) = 0; + virtual void SideTextureChanged(struct side_t *side, int section) = 0; }; diff --git a/src/scripting/vmthunks.cpp b/src/scripting/vmthunks.cpp index 6e8ee58eb..2abff431e 100644 --- a/src/scripting/vmthunks.cpp +++ b/src/scripting/vmthunks.cpp @@ -1806,19 +1806,6 @@ DEFINE_ACTION_FUNCTION_NATIVE(_Secplane, isEqual, isPlaneEqual) ACTION_RETURN_BOOL(*self == *other); } -static void ChangeHeight(secplane_t *self, double hdiff) -{ - self->ChangeHeight(hdiff); -} - -DEFINE_ACTION_FUNCTION_NATIVE(_Secplane, ChangeHeight, ChangeHeight) -{ - PARAM_SELF_STRUCT_PROLOGUE(secplane_t); - PARAM_FLOAT(hdiff); - self->ChangeHeight(hdiff); - return 0; -} - static double GetChangedHeight(const secplane_t *self, double hdiff) { return self->GetChangedHeight(hdiff);