Fixed a crash after drawing a sector when a newly drawn line completely matches already existing one.

Fixed a typo in documentation.
Fixed a typo in actions description.
This commit is contained in:
MaxED 2013-04-08 09:01:27 +00:00
parent 0243c8c3c8
commit 27f90d079d
3 changed files with 29 additions and 17 deletions

View file

@ -16,7 +16,7 @@
<div id="gz_title"><h1>Frequently asked questions</h1></div>
<div id="contents">
<p><strong>Q:</strong> When I create a new map, I see only Doom-related game configuratopns. Where are configurations for other games?<br />
<p><strong>Q:</strong> When I create a new map, I see only Doom-related game configurations. Where are configurations for other games?<br />
<strong>A:</strong> Copy &quot;&lt;EngineName&gt;_&lt;Game&gt;&lt;MapType&gt;.cfg&quot; from &quot;&lt;GZDoom Builder&gt;\Configurations\Configs for other games\&quot; to &quot;&lt;GZDoom Builder&gt;\Configurations\&quot;.</p>
</div>
</body>

View file

@ -1508,29 +1508,29 @@ namespace CodeImp.DoomBuilder.Geometry
}
}
//mxd. This is used only on new lines, so we don't bother with scales or checking existing values
//mxd
private static void autoAlignTexturesOnSidesUDMF(List<Linedef> lines, float totalLength, bool reversed) {
float curLength = 0f;
foreach(Linedef l in lines) {
if(l.Front != null) {
if(l.Front.MiddleRequired() && l.Front.MiddleTexture.Length > 1 && General.Map.Data.GetFlatExists(l.Front.MiddleTexture)) {
if(!l.Front.Fields.ContainsKey("offsetx_mid") && l.Front.MiddleRequired() && l.Front.MiddleTexture.Length > 1 && General.Map.Data.GetFlatExists(l.Front.MiddleTexture)) {
ImageData texture = General.Map.Data.GetFlatImage(l.Front.MiddleTexture);
float offset = (int)Math.Round((reversed ? totalLength - curLength - l.Length : curLength)) % texture.Width;
if(offset > 0)
l.Front.Fields.Add("offsetx_mid", new UniValue(UniversalType.Float, offset));
}
if(l.Front.HighRequired() && l.Front.HighTexture.Length > 1 && General.Map.Data.GetFlatExists(l.Front.HighTexture)) {
if(!l.Front.Fields.ContainsKey("offsetx_top") && l.Front.HighRequired() && l.Front.HighTexture.Length > 1 && General.Map.Data.GetFlatExists(l.Front.HighTexture)) {
ImageData texture = General.Map.Data.GetFlatImage(l.Front.HighTexture);
float offset = (int)Math.Round((reversed ? totalLength - curLength - l.Length : curLength)) % texture.Width;
if(offset > 0)
l.Front.Fields.Add("offsetx_top", new UniValue(UniversalType.Float, offset));
}
if(l.Front.LowRequired() && l.Front.LowTexture.Length > 1 && General.Map.Data.GetFlatExists(l.Front.LowTexture)) {
}
if(!l.Front.Fields.ContainsKey("offsetx_bottom") && l.Front.LowRequired() && l.Front.LowTexture.Length > 1 && General.Map.Data.GetFlatExists(l.Front.LowTexture)) {
ImageData texture = General.Map.Data.GetFlatImage(l.Front.LowTexture);
float offset = (int)Math.Round((reversed ? totalLength - curLength - l.Length : curLength)) % texture.Width;
@ -1540,23 +1540,23 @@ namespace CodeImp.DoomBuilder.Geometry
}
if(l.Back != null) {
if(l.Back.MiddleRequired() && l.Back.MiddleTexture.Length > 1 && General.Map.Data.GetFlatExists(l.Back.MiddleTexture)) {
if(!l.Back.Fields.ContainsKey("offsetx_mid") && l.Back.MiddleRequired() && l.Back.MiddleTexture.Length > 1 && General.Map.Data.GetFlatExists(l.Back.MiddleTexture)) {
ImageData texture = General.Map.Data.GetFlatImage(l.Back.MiddleTexture);
float offset = (int)Math.Round((reversed ? totalLength - curLength - l.Length : curLength)) % texture.Width;
if(offset > 0)
l.Front.Fields.Add("offsetx_mid", new UniValue(UniversalType.Float, offset));
}
if(l.Back.HighRequired() && l.Back.HighTexture.Length > 1 && General.Map.Data.GetFlatExists(l.Back.HighTexture)) {
}
if(!l.Back.Fields.ContainsKey("offsetx_top") && l.Back.HighRequired() && l.Back.HighTexture.Length > 1 && General.Map.Data.GetFlatExists(l.Back.HighTexture)) {
ImageData texture = General.Map.Data.GetFlatImage(l.Back.HighTexture);
float offset = (int)Math.Round((reversed ? totalLength - curLength - l.Length : curLength)) % texture.Width;
if(offset > 0)
l.Front.Fields.Add("offsetx_top", new UniValue(UniversalType.Float, offset));
}
if(l.Back.LowRequired() && l.Back.LowTexture.Length > 1 && General.Map.Data.GetFlatExists(l.Back.LowTexture)) {
}
if(!l.Back.Fields.ContainsKey("offsetx_bottom") && l.Back.LowRequired() && l.Back.LowTexture.Length > 1 && General.Map.Data.GetFlatExists(l.Back.LowTexture)) {
ImageData texture = General.Map.Data.GetFlatImage(l.Back.LowTexture);
float offset = (int)Math.Round((reversed ? totalLength - curLength - l.Length : curLength)) % texture.Width;

View file

@ -93,7 +93,7 @@ drawrectanglemode
{
title = "Start Rectangle Drawing";
category = "drawing";
description = "Starts drawing rectangle. Increase / Decrease Sudivision Level and Increase /Decrease Corners Bevel actions are avaliable in this mode.";
description = "Starts drawing rectangle. Increase/Decrease Subdivision Level and Increase/Decrease Corners Bevel actions are avaliable in this mode.";
allowkeys = true;
allowmouse = true;
allowscroll = true;
@ -105,13 +105,25 @@ drawellipsemode
{
title = "Start Ellipse Drawing";
category = "drawing";
description = "Starts drawing ellipse. Increase / Decrease Sudivision Level and Increase /Decrease Corners Bevel actions are avaliable in this mode.";
description = "Starts drawing ellipse. Increase/Decrease Subdivision Level and Increase/Decrease Corners Bevel actions are avaliable in this mode.";
allowkeys = true;
allowmouse = true;
allowscroll = true;
default = 327748;
}
//mxd
drawcurvemode
{
title = "Start Curve Drawing";
category = "drawing";
description = "Starts drawing a curve. Increase/Decrease Subdivision Level actions are avaliable in this mode.";
allowkeys = true;
allowmouse = true;
allowscroll = true;
//default = 327748;
}
//mxd
increasesubdivlevel
{