mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2025-01-18 22:41:46 +00:00
- updated ZDoom UDMF config to support ZDoom UDMF version 1.3
- added more handling for 'invalid' UDMF types to cast them to the correct type
This commit is contained in:
parent
d8096f6dfb
commit
21febe7ded
14 changed files with 64 additions and 47 deletions
|
@ -343,6 +343,12 @@ universalfields
|
|||
type = 1;
|
||||
default = 0.0f;
|
||||
}
|
||||
|
||||
smoothlighting
|
||||
{
|
||||
type = 3;
|
||||
default = false;
|
||||
}
|
||||
}
|
||||
|
||||
thing
|
||||
|
@ -424,13 +430,13 @@ universalfields
|
|||
|
||||
lightfloor
|
||||
{
|
||||
type = 1;
|
||||
type = 0;
|
||||
default = 0.0f;
|
||||
}
|
||||
|
||||
lightceiling
|
||||
{
|
||||
type = 1;
|
||||
type = 0;
|
||||
default = 0.0f;
|
||||
}
|
||||
|
||||
|
@ -487,6 +493,12 @@ universalfields
|
|||
type = 3;
|
||||
default = false;
|
||||
}
|
||||
|
||||
norespawn
|
||||
{
|
||||
type = 3;
|
||||
default = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
===============================================================================
|
||||
Universal Doom Map Format ZDoom extensions v1.1 - 27.05.2008
|
||||
Universal Doom Map Format ZDoom extensions v1.2 - 21.08.2008
|
||||
|
||||
|
||||
Copyright (c) 2008 Christoph Oelckers.
|
||||
|
@ -119,6 +119,7 @@ Note: All <bool> fields default to false unless mentioned otherwise.
|
|||
lightabsolute = <bool>; // true = 'light' is an absolute value. Default is
|
||||
// relative to the owning sector's light level.
|
||||
nofakecontrast = <bool>; // Disables use of fake contrast on this sidedef.
|
||||
smoothlighting = <bool>; // Use smooth fake contrast.
|
||||
}
|
||||
|
||||
sector
|
||||
|
@ -133,8 +134,8 @@ Note: All <bool> fields default to false unless mentioned otherwise.
|
|||
yscaleceiling = <float>; // Y texture scale of ceiling texture, Default = 1.0.
|
||||
rotationfloor = <float>; // Rotation of floor texture in degrees, Default = 0.0.
|
||||
rotationceiling = <float>; // Rotation of ceiling texture in degrees, Default = 0.0.
|
||||
lightfloor = <float>; // The floor's light level. Default is 0.
|
||||
lightceiling = <float>; // The ceiling's light level. Default is 0.
|
||||
lightfloor = <integer>; // The floor's light level. Default is 0.
|
||||
lightceiling = <integer>; // The ceiling's light level. Default is 0.
|
||||
lightfloorabsolute = <bool>; // true = 'lightfloor' is an absolute value. Default is
|
||||
// relative to the owning sector's light level.
|
||||
lightceilingabsolute = <bool>; // true = 'lightceiling' is an absolute value. Default is
|
||||
|
@ -145,7 +146,8 @@ Note: All <bool> fields default to false unless mentioned otherwise.
|
|||
desaturation = <float>; // Color desaturation factor. 0 = none, 1 = full, default = 0.
|
||||
silent = <bool>; // Actors in this sector make no sound,
|
||||
nofallingdamage = <bool>; // Falling damage is disabled in this sector
|
||||
dropactors = <bool>; // Actors drop with instantly moving floors
|
||||
dropactors = <bool>; // Actors drop with instantly moving floors (*)
|
||||
norespawn = <bool>; // Players can not respawn in this sector
|
||||
|
||||
* Note about dropactors
|
||||
|
||||
|
@ -208,12 +210,21 @@ Note: All <bool> fields default to false unless mentioned otherwise.
|
|||
Changelog
|
||||
=======================================
|
||||
|
||||
1.1:
|
||||
1.1: 27.05.2008
|
||||
Changed default light mode for sectors and sidedefs to relative and renamed
|
||||
associated properties to avoid having a non-intuitive standard value for the
|
||||
light field.
|
||||
Added 'nofakecontrast' option to sidedefs.
|
||||
|
||||
1.2 21.08.2008
|
||||
Added smooth lighting option to linedefs
|
||||
|
||||
1.3 12.12.2008
|
||||
Added NoRespawn sector flag
|
||||
Fixed lightfloor and lightceiling properties for sectors. They are of type
|
||||
integer, not float
|
||||
|
||||
|
||||
===============================================================================
|
||||
EOF
|
||||
===============================================================================
|
|
@ -68,17 +68,17 @@ namespace CodeImp.DoomBuilder.Types
|
|||
public override void SetValue(object value)
|
||||
{
|
||||
float result;
|
||||
|
||||
|
||||
// Null?
|
||||
if(value == null)
|
||||
{
|
||||
this.value = 0.0f;
|
||||
}
|
||||
// Already an int or float?
|
||||
else if((value is int) || (value is float))
|
||||
// Compatible type?
|
||||
else if((value is int) || (value is float) || (value is bool))
|
||||
{
|
||||
// Set directly
|
||||
this.value = (float)value;
|
||||
this.value = Convert.ToSingle(value);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -72,11 +72,11 @@ namespace CodeImp.DoomBuilder.Types
|
|||
{
|
||||
this.value = 0;
|
||||
}
|
||||
// Already an int?
|
||||
else if(value is int)
|
||||
// Compatible type?
|
||||
else if((value is int) || (value is float) || (value is bool))
|
||||
{
|
||||
// Set directly
|
||||
this.value = (int)value;
|
||||
this.value = Convert.ToInt32(value);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -73,11 +73,11 @@ namespace CodeImp.DoomBuilder.Types
|
|||
{
|
||||
this.value = 0.0f;
|
||||
}
|
||||
// Already an int or float?
|
||||
else if((value is int) || (value is float))
|
||||
// Compatible type?
|
||||
else if((value is int) || (value is float) || (value is bool))
|
||||
{
|
||||
// Set directly
|
||||
this.value = (float)value;
|
||||
this.value = Convert.ToSingle(value);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -76,16 +76,10 @@ namespace CodeImp.DoomBuilder.Types
|
|||
{
|
||||
this.value = false;
|
||||
}
|
||||
// already bool?
|
||||
else if(value is bool)
|
||||
// Compatible type?
|
||||
else if((value is int) || (value is float) || (value is bool))
|
||||
{
|
||||
this.value = (bool)value;
|
||||
}
|
||||
// int or float?
|
||||
else if((value is int) || (value is float))
|
||||
{
|
||||
// Set directly
|
||||
this.value = (Math.Abs((float)value) > 0.0001f);
|
||||
this.value = Convert.ToBoolean(value);
|
||||
}
|
||||
// string?
|
||||
else if(value is string)
|
||||
|
|
|
@ -81,11 +81,11 @@ namespace CodeImp.DoomBuilder.Types
|
|||
{
|
||||
this.value = 0;
|
||||
}
|
||||
// Already an int or float?
|
||||
else if(value is int)
|
||||
// Compatible type?
|
||||
else if((value is int) || (value is float) || (value is bool))
|
||||
{
|
||||
// Set directly
|
||||
this.value = (int)value;
|
||||
this.value = Convert.ToInt32(value);
|
||||
}
|
||||
// String?
|
||||
else if(value is string)
|
||||
|
|
|
@ -82,11 +82,11 @@ namespace CodeImp.DoomBuilder.Types
|
|||
{
|
||||
this.value = 0;
|
||||
}
|
||||
// Already an int?
|
||||
else if(value is int)
|
||||
// Compatible type?
|
||||
else if((value is int) || (value is float) || (value is bool))
|
||||
{
|
||||
// Set directly
|
||||
this.value = (int)value;
|
||||
this.value = Convert.ToInt32(value);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -87,10 +87,10 @@ namespace CodeImp.DoomBuilder.Types
|
|||
}
|
||||
else
|
||||
{
|
||||
// Value is an integer?
|
||||
if(value is int)
|
||||
// Compatible type?
|
||||
if((value is int) || (value is float) || (value is bool))
|
||||
{
|
||||
int intvalue = (int)value;
|
||||
int intvalue = Convert.ToInt32(value);
|
||||
|
||||
// First try to match the value against the enum values
|
||||
foreach(EnumItem item in list)
|
||||
|
|
|
@ -58,11 +58,11 @@ namespace CodeImp.DoomBuilder.Types
|
|||
{
|
||||
this.value = 0.0f;
|
||||
}
|
||||
// Already an int or float?
|
||||
else if((value is int) || (value is float))
|
||||
// Compatible type?
|
||||
else if((value is int) || (value is float) || (value is bool))
|
||||
{
|
||||
// Set directly
|
||||
this.value = (float)value;
|
||||
this.value = Convert.ToSingle(value);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -58,11 +58,11 @@ namespace CodeImp.DoomBuilder.Types
|
|||
{
|
||||
this.value = 0;
|
||||
}
|
||||
// Already an int or float?
|
||||
else if((value is int) || (value is float))
|
||||
// Compatible type?
|
||||
else if((value is int) || (value is float) || (value is bool))
|
||||
{
|
||||
// Set directly
|
||||
this.value = (int)value;
|
||||
this.value = Convert.ToInt32(value);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -72,11 +72,11 @@ namespace CodeImp.DoomBuilder.Types
|
|||
{
|
||||
this.value = 0;
|
||||
}
|
||||
// Already an int or float?
|
||||
else if((value is int) || (value is float))
|
||||
// Compatible type?
|
||||
else if((value is int) || (value is float) || (value is bool))
|
||||
{
|
||||
// Set directly
|
||||
this.value = (int)value;
|
||||
this.value = Convert.ToInt32(value);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -72,11 +72,11 @@ namespace CodeImp.DoomBuilder.Types
|
|||
{
|
||||
this.value = 0;
|
||||
}
|
||||
// Already an int or float?
|
||||
else if((value is int) || (value is float))
|
||||
// Compatible type?
|
||||
else if((value is int) || (value is float) || (value is bool))
|
||||
{
|
||||
// Set directly
|
||||
this.value = (int)value;
|
||||
this.value = Convert.ToInt32(value);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Binary file not shown.
Loading…
Reference in a new issue