1
0
forked from 0ad/0ad

Fix deserialization of actor components

This was SVN commit r10425.
This commit is contained in:
Ykkrosh 2011-10-24 12:24:04 +00:00
parent 79faed2ee2
commit 0f3119e36a

View File

@ -104,8 +104,10 @@ public:
{
m_Unit = NULL;
m_R = m_G = m_B = fixed::FromInt(1);
if (!GetSimContext().HasUnitManager())
return; // do nothing if graphics are disabled
return; // do nothing further if graphics are disabled
// TODO: we should do some fancy animation of under-construction buildings rising from the ground,
// but for now we'll just use the foundation actor and ignore the normal one
@ -114,8 +116,6 @@ public:
else
m_ActorName = paramNode.GetChild("Actor").ToString();
m_R = m_G = m_B = fixed::FromInt(1);
std::set<CStr> selections;
m_Unit = GetSimContext().GetUnitManager().CreateUnit(m_ActorName, GetActorSeed(), selections);
if (!m_Unit)