Skip to content
Permalink
Browse files
Fixed LevelController
  • Loading branch information
krzys-h committed Jan 30, 2016
1 parent e0fcaf3 commit 9749419b8715b74a11fb0646a533b680f857f080
Showing with 6 additions and 3 deletions.
  1. +1 −1 src/level/robotmain.cpp
  2. +1 −0 src/object/object_factory.cpp
  3. +4 −2 src/object/old_object.cpp
@@ -3369,7 +3369,7 @@ void CRobotMain::CreateScene(bool soluce, bool fixScene, bool resetObject)
{
CProgramStorageObject* programStorage = dynamic_cast<CProgramStorageObject*>(m_controller);
Program* program = programStorage->AddProgram();
programStorage->ReadProgram(program, "../" + line->GetParam("script")->AsPath("ai"));
programStorage->ReadProgram(program, line->GetParam("script")->AsPath("ai"));
program->readOnly = true;
dynamic_cast<CProgrammableObject*>(m_controller)->RunProgram(program);
}
@@ -305,6 +305,7 @@ CObjectUPtr CObjectFactory::CreateObject(const ObjectCreateParams& params)
case OBJECT_MOBILEit:
case OBJECT_MOBILEdr:
case OBJECT_APOLLO2:
case OBJECT_CONTROLLER:
return CBaseRobot::Create(params, m_oldModelManager, m_engine);

case OBJECT_MOBILErs:
@@ -666,7 +666,8 @@ void COldObject::SetType(ObjectType type)
m_type == OBJECT_MOBILEfi || // WingedOrgaShooter
m_type == OBJECT_MOBILEft || // winged PracticeBot (unused)
m_type == OBJECT_HUMAN || // Me
m_type == OBJECT_TECH ) // Tech
m_type == OBJECT_TECH || // Tech
m_type == OBJECT_CONTROLLER)
{
m_implementedInterfaces[static_cast<int>(ObjectInterfaceType::Flying)] = true;
m_implementedInterfaces[static_cast<int>(ObjectInterfaceType::JetFlying)] = true;
@@ -880,7 +881,8 @@ void COldObject::SetType(ObjectType type)
m_type == OBJECT_WORM ||
m_type == OBJECT_SPIDER ||
m_type == OBJECT_BEE ||
m_type == OBJECT_MOTHER )
m_type == OBJECT_MOTHER ||
m_type == OBJECT_CONTROLLER)
{
m_implementedInterfaces[static_cast<int>(ObjectInterfaceType::Controllable)] = true;
}

0 comments on commit 9749419

Please sign in to comment.