Fixed, Map Analysis mode: fixed a crash when running "Check Polyobjects" check on a map without lines using "Polyobj_StartLine" action.

Updated ZDoom_linedefs.cfg (Line_SetPortalTarget).
Updated ZDoom_ACS.cfg (Line_SetPortalTarget).
This commit is contained in:
MaxED 2016-03-09 19:36:11 +00:00
parent 7446c576d6
commit 96fa507e9e
3 changed files with 29 additions and 9 deletions

View file

@ -639,6 +639,22 @@ zdoom
}
}
}
107
{
title = "Line Set Portal Target";
id = "Line_SetPortalTarget";
arg0
{
title = "Source Line Tag";
type = 15;
}
arg1
{
title = "Target Line Tag";
type = 15;
}
}
}
door

View file

@ -256,6 +256,7 @@ keywords
Line_AlignCeiling = "Line_AlignCeiling(lineid, side)";
Line_AlignFloor = "Line_AlignFloor(lineid, side)";
Line_SetBlocking = "Line_SetBlocking(lineid, setflags, clearflags)";
Line_SetPortalTarget = "Line_SetPortalTarget(sourcelineid, targetlineid)";
Line_SetTextureOffset = "Line_SetTextureOffset(lineid, x, y, side, flags)";
Line_SetTextureScale = "Line_SetTextureScale(lineid, x, y, side, flags)";
LineSide = "int LineSide(void)";

View file

@ -113,17 +113,20 @@ namespace CodeImp.DoomBuilder.BuilderModes
// Check Linedefs with Polyobj_StartLine action. These must connect 1 - 1.
// Polyobject number is arg0, Mirror polyobject number is arg1
foreach(KeyValuePair<int, List<Linedef>> linesbytype in polyobjlines[Polyobj_StartLine])
if(polyobjlines.ContainsKey(Polyobj_StartLine))
{
// Should be only one Polyobj_StartLine per Polyobject number
if(linesbytype.Value.Count > 1)
SubmitResult(new ResultInvalidPolyobjectLines(linesbytype.Value, "Several \"" + Polyobj_StartLine + "\" actions have the same Polyobject Number assigned (" + linesbytype.Key + "). They won't function correctly ingame."));
// Check if Mirror Polyobject Number exists
foreach(Linedef linedef in linesbytype.Value)
foreach(KeyValuePair<int, List<Linedef>> linesbytype in polyobjlines[Polyobj_StartLine])
{
if(!startspots.ContainsKey(linedef.Args[1]))
SubmitResult(new ResultInvalidPolyobjectLines(new List<Linedef> { linedef }, "\"" + Polyobj_StartLine + "\" action have non-existing Mirror Polyobject Number assigned (" + linedef.Args[1] + "). It won't function correctly ingame."));
// Should be only one Polyobj_StartLine per Polyobject number
if(linesbytype.Value.Count > 1)
SubmitResult(new ResultInvalidPolyobjectLines(linesbytype.Value, "Several \"" + Polyobj_StartLine + "\" actions have the same Polyobject Number assigned (" + linesbytype.Key + "). They won't function correctly ingame."));
// Check if Mirror Polyobject Number exists
foreach(Linedef linedef in linesbytype.Value)
{
if(!startspots.ContainsKey(linedef.Args[1]))
SubmitResult(new ResultInvalidPolyobjectLines(new List<Linedef> { linedef }, "\"" + Polyobj_StartLine + "\" action have non-existing Mirror Polyobject Number assigned (" + linedef.Args[1] + "). It won't function correctly ingame."));
}
}
}