eliminate freeze when encountering players by preloading race motions

This commit is contained in:
savis
2026-01-04 10:41:48 +01:00
parent 4c21fe697c
commit 2550008f6d
4 changed files with 57 additions and 1 deletions

View File

@@ -713,6 +713,12 @@ PyObject * chrmgrIsPossibleEmoticon(PyObject* poSelf, PyObject* poArgs)
return Py_BuildValue("i", result);
}
PyObject * chrmgrPreloadRaceMotions(PyObject* poSelf, PyObject* poArgs)
{
CRaceManager::PreloadPlayerRaceMotions();
return Py_BuildNone();
}
void initchrmgr()
{
static PyMethodDef s_methods[] =
@@ -746,6 +752,7 @@ void initchrmgr()
{ "SetAffect", chrmgrSetAffect, METH_VARARGS },
{ "SetEmoticon", chrmgrSetEmoticon, METH_VARARGS },
{ "IsPossibleEmoticon", chrmgrIsPossibleEmoticon, METH_VARARGS },
{ "PreloadRaceMotions", chrmgrPreloadRaceMotions, METH_VARARGS },
{ "RegisterEffect", chrmgrRegisterEffect, METH_VARARGS },
{ "RegisterCacheEffect", chrmgrRegisterCacheEffect, METH_VARARGS },
{ "RegisterPointEffect", chrmgrRegisterPointEffect, METH_VARARGS },