mirror of
https://git.do.srb2.org/STJr/ZoneBuilder.git
synced 2025-02-11 22:57:59 +00:00
Visual Mode: fixed a problem where pasting a texture to a 3D floor sometimes didn't show the pasted texture immediately
This commit is contained in:
parent
b31dec526c
commit
6f7b24291d
2 changed files with 26 additions and 8 deletions
|
@ -419,12 +419,21 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
||||||
|
|
||||||
SetTexture(BuilderPlug.Me.CopiedFlat);
|
SetTexture(BuilderPlug.Me.CopiedFlat);
|
||||||
|
|
||||||
// Update
|
// Update. We need to create a visual sector if it doesn't exist yet. This can happen when pasting
|
||||||
if(mode.VisualSectorExists(level.sector))
|
// to a 3D floor and its control sector wasn't in view before
|
||||||
|
BaseVisualSector vs;
|
||||||
|
|
||||||
|
if (mode.VisualSectorExists(level.sector))
|
||||||
{
|
{
|
||||||
BaseVisualSector vs = (BaseVisualSector)mode.GetVisualSector(level.sector);
|
vs = (BaseVisualSector)mode.GetVisualSector(level.sector);
|
||||||
vs.UpdateSectorGeometry(false);
|
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
vs = mode.CreateBaseVisualSector(level.sector);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (vs != null)
|
||||||
|
vs.UpdateSectorGeometry(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -401,12 +401,21 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
||||||
|
|
||||||
SetTexture(BuilderPlug.Me.CopiedFlat);
|
SetTexture(BuilderPlug.Me.CopiedFlat);
|
||||||
|
|
||||||
// Update
|
// Update. We need to create a visual sector if it doesn't exist yet. This can happen when pasting
|
||||||
if(mode.VisualSectorExists(level.sector))
|
// to a 3D floor and its control sector wasn't in view before
|
||||||
|
BaseVisualSector vs;
|
||||||
|
|
||||||
|
if (mode.VisualSectorExists(level.sector))
|
||||||
{
|
{
|
||||||
BaseVisualSector vs = (BaseVisualSector)mode.GetVisualSector(level.sector);
|
vs = (BaseVisualSector)mode.GetVisualSector(level.sector);
|
||||||
vs.UpdateSectorGeometry(false);
|
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
vs = mode.CreateBaseVisualSector(level.sector);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (vs != null)
|
||||||
|
vs.UpdateSectorGeometry(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue