Assign team id to Alien eggs created during produce()

fix-squashed-planets
lb_ii 2021-08-25 01:09:58 +03:00
parent ea62a449d4
commit 91a290dade
1 changed files with 2 additions and 1 deletions

View File

@ -1667,7 +1667,8 @@ bool CScriptFunctions::rProduce(CBotVar* var, CBotVar* result, int& exception, v
params.type == OBJECT_WORM )
{
object = CObjectManager::GetInstancePointer()->CreateObject(params);
CObjectManager::GetInstancePointer()->CreateObject(params.pos, params.angle, OBJECT_EGG);
params.type = OBJECT_EGG;
CObjectManager::GetInstancePointer()->CreateObject(params);
if (object->Implements(ObjectInterfaceType::Programmable))
{
dynamic_cast<CProgrammableObject&>(*object).SetActivity(false);