Game configurations: added "sidedefcompressionignoresaction" property. When set to true, sidedefs will be compressed regardless of linedef action (DB2 behaviour). When set to false, sidedefs, which belong to a line with an action, will be skipped when compressing sidedefs. Default value is false.

This commit is contained in:
MaxED 2016-05-07 20:21:53 +00:00
parent 751e2dd3e3
commit 95db4cc750
4 changed files with 18 additions and 0 deletions

View file

@ -33,6 +33,9 @@ common
defaulttexturescale = 1.0f; defaulttexturescale = 1.0f;
defaultflatscale = 1.0f; defaultflatscale = 1.0f;
scaledtextureoffsets = true; scaledtextureoffsets = true;
//mxd. Sidedefs compression
sidedefcompressionignoresaction = true;
// Texture sources // Texture sources
textures textures

View file

@ -152,6 +152,10 @@ defaultskytextures
Enables support for long (> 8 chars) texture names. This is used by GZDoom Builder to limit the input fields in the user interface and to check the validity of texture names in resources. This setting should only be enabled for UDMF game configurations. Enabling this setting will make maps incompatible with Doom Builder 2 and can lead to problems in Slade 3 This does NOT determine the actual limitation on the texture names in the map file format.<br /> Enables support for long (> 8 chars) texture names. This is used by GZDoom Builder to limit the input fields in the user interface and to check the validity of texture names in resources. This setting should only be enabled for UDMF game configurations. Enabling this setting will make maps incompatible with Doom Builder 2 and can lead to problems in Slade 3 This does NOT determine the actual limitation on the texture names in the map file format.<br />
Default value is <b>false</b>.<br /> Default value is <b>false</b>.<br />
<br /> <br />
<b class="fat">sidedefcompressionignoresaction</b> (boolean) - <span class="red">GZDB only</span>.<br />
When set to true, sidedefs will be compressed regardless of linedef action (DB2 behaviour, can potentially cause problems when target source port doesn't decompress sidedefs).<br />
When set to false, sidedefs, which belong to a line with an action, will be skipped when compressing sidedefs.<br />
Default value is <b>false</b>.<br />
</p> </p>
</div> </div>
</body> </body>

View file

@ -86,6 +86,7 @@ namespace CodeImp.DoomBuilder.Config
private readonly bool doomlightlevels; private readonly bool doomlightlevels;
private readonly string actionspecialhelp; //mxd private readonly string actionspecialhelp; //mxd
private readonly string thingclasshelp; //mxd private readonly string thingclasshelp; //mxd
private readonly bool sidedefcompressionignoresaction; //mxd
// Skills // Skills
private readonly List<SkillInfo> skills; private readonly List<SkillInfo> skills;
@ -207,6 +208,7 @@ namespace CodeImp.DoomBuilder.Config
public bool DoomLightLevels { get { return doomlightlevels; } } public bool DoomLightLevels { get { return doomlightlevels; } }
public string ActionSpecialHelp { get { return actionspecialhelp; } } //mxd public string ActionSpecialHelp { get { return actionspecialhelp; } } //mxd
public string ThingClassHelp { get { return thingclasshelp; } } //mxd public string ThingClassHelp { get { return thingclasshelp; } } //mxd
internal bool SidedefCompressionIgnoresAction { get { return sidedefcompressionignoresaction; } } //mxd
// Skills // Skills
public List<SkillInfo> Skills { get { return skills; } } public List<SkillInfo> Skills { get { return skills; } }
@ -357,6 +359,7 @@ namespace CodeImp.DoomBuilder.Config
doomlightlevels = cfg.ReadSetting("doomlightlevels", true); doomlightlevels = cfg.ReadSetting("doomlightlevels", true);
actionspecialhelp = cfg.ReadSetting("actionspecialhelp", string.Empty); //mxd actionspecialhelp = cfg.ReadSetting("actionspecialhelp", string.Empty); //mxd
thingclasshelp = cfg.ReadSetting("thingclasshelp", string.Empty); //mxd thingclasshelp = cfg.ReadSetting("thingclasshelp", string.Empty); //mxd
sidedefcompressionignoresaction = cfg.ReadSetting("sidedefcompressionignoresaction", false); //mxd
defaultlinedefactivation = cfg.ReadSetting("defaultlinedefactivation", ""); //mxd defaultlinedefactivation = cfg.ReadSetting("defaultlinedefactivation", ""); //mxd
for(int i = 0; i < Linedef.NUM_ARGS; i++) makedoorargs[i] = cfg.ReadSetting("makedoorarg" + i.ToString(CultureInfo.InvariantCulture), 0); for(int i = 0; i < Linedef.NUM_ARGS; i++) makedoorargs[i] = cfg.ReadSetting("makedoorarg" + i.ToString(CultureInfo.InvariantCulture), 0);

View file

@ -3216,6 +3216,14 @@ namespace CodeImp.DoomBuilder.Map
Sidedef stored = null; Sidedef stored = null;
Sidedef snsd = sidedefs[sn]; Sidedef snsd = sidedefs[sn];
//mxd. Skip sidedef if it belongs to a linedef with an action?
if(!General.Map.Config.SidedefCompressionIgnoresAction && snsd.Line.Action != 0)
{
// Next!
sn++;
continue;
}
// Check if checksum is stored // Check if checksum is stored
bool samesidedef = false; bool samesidedef = false;
uint checksum = snsd.GetChecksum(); uint checksum = snsd.GetChecksum();