diff options
author | krzys-h <krzys_h@interia.pl> | 2014-01-01 16:45:08 +0100 |
---|---|---|
committer | krzys-h <krzys_h@interia.pl> | 2014-01-01 16:45:08 +0100 |
commit | 90437d1765eaf8b17cb9575632cb95739cfe80c2 (patch) | |
tree | f4188b4a5d6ba7bc79c77ae876584e28825d4886 | |
parent | 3d7017525bfe6563dc7cf93f5b1788e86bd98ce8 (diff) | |
download | colobot-90437d1765eaf8b17cb9575632cb95739cfe80c2.tar.gz colobot-90437d1765eaf8b17cb9575632cb95739cfe80c2.tar.bz2 colobot-90437d1765eaf8b17cb9575632cb95739cfe80c2.zip |
Fixed two bugs in dc81cda4b1f27af6fe8abcd566ffac03255f2642
* win/end scene animations
* produce() was producing empty cells
-rw-r--r-- | src/object/robotmain.cpp | 7 | ||||
-rw-r--r-- | src/script/script.cpp | 1 |
2 files changed, 8 insertions, 0 deletions
diff --git a/src/object/robotmain.cpp b/src/object/robotmain.cpp index f8db286..0d95907 100644 --- a/src/object/robotmain.cpp +++ b/src/object/robotmain.cpp @@ -4630,6 +4630,13 @@ void CRobotMain::CreateScene(bool soluce, bool fixScene, bool resetObject) trainer = OpInt(line, "trainer", 0), OpInt(line, "toy", 0), OpInt(line, "option", 0)); + + if (m_fixScene && type == OBJECT_HUMAN) + { + CMotion* motion = obj->GetMotion(); + if (m_phase == PHASE_WIN ) motion->SetAction(MHS_WIN, 0.4f); + if (m_phase == PHASE_LOST) motion->SetAction(MHS_LOST, 0.5f); + } if (obj != nullptr) { diff --git a/src/script/script.cpp b/src/script/script.cpp index 6fcd883..1a26e62 100644 --- a/src/script/script.cpp +++ b/src/script/script.cpp @@ -1905,6 +1905,7 @@ bool CScript::rProduce(CBotVar* var, CBotVar* result, int& exception, void* user } object->SetActivity(false); } else { + if ((type == OBJECT_POWER || type == OBJECT_ATOMIC) && power == -1.0f) power = 1.0f; object = CObjectManager::GetInstancePointer()->CreateObject(pos, angle, type, power); if ( object == nullptr ) { |