Fix bugs with testing from current mouse/camera position.

This commit is contained in:
sphere 2021-02-25 18:08:29 +01:00
parent 4958338bbb
commit b59f8fef63
2 changed files with 11 additions and 4 deletions

View file

@ -709,7 +709,7 @@ namespace CodeImp.DoomBuilder.Editing
playerStartPosition = start.Position;
//everything should be valid, let's move player start here
start.Move(new Vector3D(mousemappos.x, mousemappos.y, s.FloorHeight));
start.Move(new Vector3D(mousemappos.x, mousemappos.y, 0));
}
return true;

View file

@ -283,11 +283,18 @@ namespace CodeImp.DoomBuilder.VisualModes
Thing start = null;
foreach(Thing t in General.Map.Map.Things)
{
if(t.SRB2Type == 1)
if(t.SRB2Type == 1)
{
//store thing and position
start = t;
break;
if (start == null)
{
start = t;
}
else if (t.Index > start.Index)
{
//if there are several Player Start 1 things, GZDoom uses one with the biggest index.
start = t;
}
}
}