mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2025-01-19 06:51:09 +00:00
UDMF type handler: fixed a problem where default values provided as integers for floating point fields failed to convert properly
This commit is contained in:
parent
ef444b5c8e
commit
1f21b797cf
1 changed files with 2 additions and 1 deletions
|
@ -52,7 +52,8 @@ namespace CodeImp.DoomBuilder.Types
|
|||
|
||||
public override void SetupField(TypeHandlerAttribute attr, UniversalFieldInfo fieldinfo)
|
||||
{
|
||||
defaultvalue = (fieldinfo == null || fieldinfo.Default == null) ? 0.0 : (double)fieldinfo.Default;
|
||||
// The default value might be given as int instead as a floating point number, so try to convert it
|
||||
defaultvalue = (fieldinfo == null || fieldinfo.Default == null) ? 0.0 : Convert.ToDouble(fieldinfo.Default);
|
||||
base.SetupField(attr, fieldinfo);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue