* Fix for issue #1221 * Removed object array and implemented GetObjectName method in it's place. * Fixed indentation issue. * Fixed white space at end of lines 1571, 1572.fix-quicksave-sim-speed-crash
parent
0a3cdd342b
commit
d64d78acfc
|
@ -1565,7 +1565,11 @@ bool CScriptFunctions::rProduce(CBotVar* var, CBotVar* result, int& exception, v
|
||||||
{
|
{
|
||||||
power = 1.0f;
|
power = 1.0f;
|
||||||
}
|
}
|
||||||
object = CObjectManager::GetInstancePointer()->CreateObject(pos, angle, type, power);
|
bool exists = !std::string(GetObjectName(type)).empty(); //The object type exists in object_type.h
|
||||||
|
if (exists)
|
||||||
|
{
|
||||||
|
object = CObjectManager::GetInstancePointer()->CreateObject(pos, angle, type, power);
|
||||||
|
}
|
||||||
if (object == nullptr)
|
if (object == nullptr)
|
||||||
{
|
{
|
||||||
result->SetValInt(1); // error
|
result->SetValInt(1); // error
|
||||||
|
|
Loading…
Reference in New Issue