Fixed bug with object loading introduced in 083f216529
parent
083f216529
commit
cba3863d75
|
@ -1006,7 +1006,6 @@ void COldObject::Read(CLevelParserLine* line)
|
||||||
SetProxyDistance(line->GetParam("proxyDistance")->AsFloat(15.0f)*g_unit);
|
SetProxyDistance(line->GetParam("proxyDistance")->AsFloat(15.0f)*g_unit);
|
||||||
SetRange(line->GetParam("range")->AsFloat(30.0f));
|
SetRange(line->GetParam("range")->AsFloat(30.0f));
|
||||||
SetMagnifyDamage(line->GetParam("magnifyDamage")->AsFloat(1.0f));
|
SetMagnifyDamage(line->GetParam("magnifyDamage")->AsFloat(1.0f));
|
||||||
SetTeam(line->GetParam("team")->AsInt(0));
|
|
||||||
SetGunGoalV(line->GetParam("aimV")->AsFloat(0.0f));
|
SetGunGoalV(line->GetParam("aimV")->AsFloat(0.0f));
|
||||||
SetGunGoalH(line->GetParam("aimH")->AsFloat(0.0f));
|
SetGunGoalH(line->GetParam("aimH")->AsFloat(0.0f));
|
||||||
|
|
||||||
|
|
|
@ -5065,8 +5065,9 @@ CObject* CRobotMain::IOReadObject(CLevelParserLine *line, const char* filename,
|
||||||
bool trainer = line->GetParam("trainer")->AsBool(false);
|
bool trainer = line->GetParam("trainer")->AsBool(false);
|
||||||
bool toy = line->GetParam("toy")->AsBool(false);
|
bool toy = line->GetParam("toy")->AsBool(false);
|
||||||
int option = line->GetParam("option")->AsInt(0);
|
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))
|
if (obj->Implements(ObjectInterfaceType::Old))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue