mirror of
https://git.do.srb2.org/STJr/ZoneBuilder.git
synced 2024-11-10 06:41:49 +00:00
Revert "Fix geometry constantly being rebuilt in some situations"
This reverts commit 4f4f074c3f
.
This commit is contained in:
parent
a74ce69297
commit
8c12299583
3 changed files with 35 additions and 49 deletions
|
@ -55,11 +55,7 @@ namespace CodeImp.DoomBuilder.VisualModes
|
|||
internal List<VisualGeometry> FixedGeometry { get { return fixedgeometry; } }
|
||||
internal List<VisualGeometry> AllGeometry { get { return allgeometry; } }
|
||||
internal VertexBuffer GeometryBuffer { get { return geobuffer; } }
|
||||
internal bool NeedsUpdateGeo
|
||||
{
|
||||
get { return updategeo; }
|
||||
set { updategeo |= value; }
|
||||
}
|
||||
internal bool NeedsUpdateGeo { get { return updategeo; } set { updategeo |= value; } }
|
||||
|
||||
public bool IsDisposed { get { return isdisposed; } }
|
||||
public Sector Sector { get { return sector; } }
|
||||
|
@ -111,7 +107,7 @@ namespace CodeImp.DoomBuilder.VisualModes
|
|||
// Trash geometry buffer
|
||||
if(geobuffer != null) geobuffer.Dispose();
|
||||
geobuffer = null;
|
||||
NeedsUpdateGeo = true;
|
||||
updategeo = true;
|
||||
}
|
||||
|
||||
// This is called resets when the device is reset
|
||||
|
@ -173,7 +169,7 @@ namespace CodeImp.DoomBuilder.VisualModes
|
|||
/// </summary>
|
||||
public void AddGeometry(VisualGeometry geo)
|
||||
{
|
||||
NeedsUpdateGeo = true;
|
||||
updategeo = true;
|
||||
allgeometry.Add(geo);
|
||||
if(geo.Sidedef != null)
|
||||
{
|
||||
|
@ -195,7 +191,7 @@ namespace CodeImp.DoomBuilder.VisualModes
|
|||
allgeometry.Clear();
|
||||
fixedgeometry.Clear();
|
||||
sidedefgeometry.Clear();
|
||||
NeedsUpdateGeo = true;
|
||||
updategeo = true;
|
||||
}
|
||||
|
||||
// This gets the geometry list for the specified sidedef
|
||||
|
|
|
@ -44,7 +44,6 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
|
||||
protected readonly BaseVisualMode mode;
|
||||
protected long setuponloadedtexture;
|
||||
private long lastsetuponloadedtexture;
|
||||
|
||||
// This is only used to see if this object has already received a change
|
||||
// in a multiselection. The Changed property on the BaseVisualSector is
|
||||
|
@ -611,20 +610,16 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
public virtual void OnProcess(long deltatime)
|
||||
{
|
||||
// If the texture was not loaded, but is loaded now, then re-setup geometry
|
||||
if(setuponloadedtexture != lastsetuponloadedtexture)
|
||||
{
|
||||
if (setuponloadedtexture != 0)
|
||||
if(setuponloadedtexture != 0)
|
||||
{
|
||||
ImageData t = General.Map.Data.GetFlatImage(setuponloadedtexture);
|
||||
if (t != null && t.IsImageLoaded)
|
||||
if(t != null)
|
||||
{
|
||||
lastsetuponloadedtexture = setuponloadedtexture;
|
||||
if(t.IsImageLoaded)
|
||||
{
|
||||
setuponloadedtexture = 0;
|
||||
Setup();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lastsetuponloadedtexture = setuponloadedtexture;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -48,7 +48,6 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
protected Plane top;
|
||||
protected Plane bottom;
|
||||
protected long setuponloadedtexture;
|
||||
private long lastsetuponloadedtexture;
|
||||
|
||||
// UV dragging
|
||||
private float dragstartanglexy;
|
||||
|
@ -836,21 +835,17 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
public virtual void OnProcess(long deltatime)
|
||||
{
|
||||
// If the texture was not loaded, but is loaded now, then re-setup geometry
|
||||
if (setuponloadedtexture != lastsetuponloadedtexture)
|
||||
{
|
||||
if (setuponloadedtexture != 0)
|
||||
if(setuponloadedtexture != 0)
|
||||
{
|
||||
ImageData t = General.Map.Data.GetTextureImage(setuponloadedtexture);
|
||||
if (t != null && t.IsImageLoaded)
|
||||
if(t != null)
|
||||
{
|
||||
lastsetuponloadedtexture = setuponloadedtexture;
|
||||
if(t.IsImageLoaded)
|
||||
{
|
||||
setuponloadedtexture = 0;
|
||||
Setup();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
lastsetuponloadedtexture = setuponloadedtexture;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue