Browse Source

Merge branch 'ticket/49'

nextgen
rarified 2 years ago
parent
commit
e7758ccc10
  1. 2
      Sources/Plasma/FeatureLib/pfPython/cyMiscGlue3.cpp
  2. 2
      Sources/Plasma/FeatureLib/pfPython/cyMiscGlue4.cpp
  3. 6
      Sources/Plasma/FeatureLib/pfPython/plPythonSDLModifier.cpp

2
Sources/Plasma/FeatureLib/pfPython/cyMiscGlue3.cpp

@ -777,4 +777,4 @@ void cyMisc::AddPlasmaMethods3(std::vector<PyMethodDef> &methods)
PYTHON_GLOBAL_METHOD_NOARGS(methods, PtGetUserPath);
PYTHON_GLOBAL_METHOD_NOARGS(methods, PtGetInitPath);
}
}

2
Sources/Plasma/FeatureLib/pfPython/cyMiscGlue4.cpp

@ -853,4 +853,4 @@ void cyMisc::AddPlasmaMethods4(std::vector<PyMethodDef> &methods)
PYTHON_GLOBAL_METHOD(methods, PtGetAIAvatarsByModelName);
PYTHON_GLOBAL_METHOD(methods, PtForceVaultNodeUpdate);
PYTHON_GLOBAL_METHOD(methods, PtVaultDownload);
}
}

6
Sources/Plasma/FeatureLib/pfPython/plPythonSDLModifier.cpp

@ -474,6 +474,12 @@ void plPythonSDLModifier::IPythonVarToSDL(plStateDataRecord* state, const char*
int count = PyTuple_Size(pyVar);
plSimpleVarDescriptor::Type type = var->GetSimpleVarDescriptor()->GetType();
// Ensure that variable length arrays match.
if (var->GetSimpleVarDescriptor()->IsVariableLength()) {
if (var->GetCount() != count)
var->Alloc(count);
}
for (int i = 0; i < count; i++)
{
PyObject* pyVarItem = PyTuple_GetItem(pyVar, i);

Loading…
Cancel
Save