forked from 0ad/0ad
Stop relying on XML default values from DTDs
This was SVN commit r6767.
This commit is contained in:
parent
f74f772a41
commit
2bc48fc1e7
@ -182,8 +182,10 @@ void CTerrainProperties::ReadPassability(bool passable, XMBElement node, CXeromy
|
||||
#undef ATTR
|
||||
|
||||
STerrainPassability pass(passable);
|
||||
// Set default speed
|
||||
pass.m_SpeedFactor = 100;
|
||||
|
||||
bool hasType = false;
|
||||
bool hasSpeed;
|
||||
XMBAttributeList attribs = node.GetAttributes();
|
||||
for (int i=0;i<attribs.Count;i++)
|
||||
{
|
||||
@ -205,7 +207,6 @@ void CTerrainProperties::ReadPassability(bool passable, XMBElement node, CXeromy
|
||||
pass.m_SpeedFactor /= 100.0;
|
||||
}
|
||||
// FIXME speed=0 could/should be made to set the terrain impassable
|
||||
hasSpeed = true;
|
||||
}
|
||||
else if (attr.Name == attr_effect)
|
||||
{
|
||||
|
@ -1207,6 +1207,8 @@ void CGUI::Xeromyces_ReadObject(XMBElement Element, CXeromyces* pFile, IGUIObjec
|
||||
|
||||
// Well first of all we need to determine the type
|
||||
CStr type (attributes.GetNamedItem(pFile->GetAttributeID("type")));
|
||||
if (type.empty())
|
||||
type = "empty";
|
||||
|
||||
// Construct object from specified type
|
||||
// henceforth, we need to do a rollback before aborting.
|
||||
|
Loading…
Reference in New Issue
Block a user