mirror of
https://github.com/opensim/opensim.git
synced 2026-08-08 18:25:33 +08:00
Allow Boolean nodes in XML to be specified as "0/1". AuroraSim does that.
This commit is contained in:
committed by
Justin Clark-Casey (justincc)
parent
70dd4cf152
commit
bc0ff5e7d4
@@ -2029,8 +2029,10 @@ namespace OpenSim.Framework
|
||||
#region Xml Serialization Utilities
|
||||
public static bool ReadBoolean(XmlTextReader reader)
|
||||
{
|
||||
// AuroraSim uses "int" for some fields that are boolean in OpenSim, e.g. "PassCollisions". Don't fail because of this.
|
||||
reader.ReadStartElement();
|
||||
bool result = Boolean.Parse(reader.ReadContentAsString().ToLower());
|
||||
string val = reader.ReadContentAsString().ToLower();
|
||||
bool result = val.Equals("true") || val.Equals("1");
|
||||
reader.ReadEndElement();
|
||||
|
||||
return result;
|
||||
|
||||
Reference in New Issue
Block a user