Fixed bug with object loading introduced in 083f216529

master
krzys-h 2015-07-22 12:51:29 +02:00
parent 083f216529
commit cba3863d75
2 changed files with 2 additions and 2 deletions

View File

@ -1006,7 +1006,6 @@ void COldObject::Read(CLevelParserLine* line)
SetProxyDistance(line->GetParam("proxyDistance")->AsFloat(15.0f)*g_unit);
SetRange(line->GetParam("range")->AsFloat(30.0f));
SetMagnifyDamage(line->GetParam("magnifyDamage")->AsFloat(1.0f));
SetTeam(line->GetParam("team")->AsInt(0));
SetGunGoalV(line->GetParam("aimV")->AsFloat(0.0f));
SetGunGoalH(line->GetParam("aimH")->AsFloat(0.0f));

View File

@ -5065,8 +5065,9 @@ CObject* CRobotMain::IOReadObject(CLevelParserLine *line, const char* filename,
bool trainer = line->GetParam("trainer")->AsBool(false);
bool toy = line->GetParam("toy")->AsBool(false);
int option = line->GetParam("option")->AsInt(0);
int team = line->GetParam("team")->AsInt(0);
CObject* obj = m_objMan->CreateObject(pos, dir.y, type, 0.0f, 1.0f, 0.0f, trainer, toy, option, id);
CObject* obj = m_objMan->CreateObject(pos, dir.y, type, 0.0f, 1.0f, 0.0f, trainer, toy, option, team, id);
if (obj->Implements(ObjectInterfaceType::Old))
{