Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Fixed LevelController
- Loading branch information
Showing
with
6 additions
and
3 deletions.
-
+1
−1
src/level/robotmain.cpp
-
+1
−0
src/object/object_factory.cpp
-
+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; |
|
|
} |
|
|
|
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session.
You signed out in another tab or window. Reload to refresh your session.