Fixed LevelController

dev-time-step
krzys-h 2016-01-30 17:24:02 +01:00
parent e0fcaf3a64
commit 9749419b87
3 changed files with 6 additions and 3 deletions

View File

@ -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);
}

View File

@ -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:

View File

@ -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;
}