Fixed two bugs in dc81cda4b1
* win/end scene animations * produce() was producing empty cellsdev-ui
parent
3d7017525b
commit
90437d1765
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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 )
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue