mirror of
https://git.do.srb2.org/STJr/ZoneBuilder.git
synced 2024-11-10 06:41:49 +00:00
Fixed: voxels were incorrectly loaded from WADs.
Fixed, Draw Geometry modes: fixed a crash when moving the mouse cursor over a vertex while holding Alt-Shift keys when there were no new points drawn in current mode.
This commit is contained in:
parent
64c93749a0
commit
79c2da1ced
1 changed files with 15 additions and 17 deletions
|
@ -309,10 +309,11 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
DrawnVertex p = new DrawnVertex();
|
||||
p.stitch = true; //mxd. Setting these to false seems to be a good way to create invalid geometry...
|
||||
p.stitchline = true; //mxd
|
||||
snaptocardinal = (snaptocardinal && points.Count > 0); //mxd. Don't snap to cardinal when there are no points
|
||||
|
||||
//mxd. If snap to cardinal directions is enabled and we have points, modify mouse position
|
||||
Vector2D vm, gridoffset;
|
||||
if(snaptocardinal && points.Count > 0)
|
||||
if(snaptocardinal)
|
||||
{
|
||||
Vector2D offset = mousemappos - points[points.Count - 1].pos;
|
||||
|
||||
|
@ -355,7 +356,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
if(nv != null)
|
||||
{
|
||||
//mxd. Line angle must stay the same
|
||||
if(snaptocardinal) //mxd
|
||||
if(snaptocardinal)
|
||||
{
|
||||
Line2D ourline = new Line2D(points[points.Count - 1].pos, vm);
|
||||
if(Math.Round(ourline.GetSideOfLine(nv.Position), 1) == 0)
|
||||
|
@ -377,8 +378,6 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
{
|
||||
//mxd. Line angle must stay the same
|
||||
if(snaptocardinal)
|
||||
{
|
||||
if(points.Count > 0)
|
||||
{
|
||||
Line2D ourline = new Line2D(points[points.Count - 1].pos, vm);
|
||||
Line2D nearestline = new Line2D(nl.Start.Position, nl.End.Position);
|
||||
|
@ -397,7 +396,6 @@ namespace CodeImp.DoomBuilder.BuilderModes
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// Snap to grid?
|
||||
else if(snaptogrid)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue