2
3
mirror of https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git synced 2025-07-14 10:37:41 -04:00

Track NPC clones

Manual state management in python was kind of fiddly, so let's track all
avatar clones in the NetApp and unload them as needed. This also seems to
fix a potential bug in plNPCSpawnMod (is that even used?).
This commit is contained in:
2012-05-06 19:22:03 -04:00
parent b8b8e6d730
commit 3b69a4aee3
10 changed files with 89 additions and 54 deletions

View File

@ -2700,7 +2700,7 @@ PyObject* cyMisc::LoadAvatarModel(const char* modelName, pyKey& spawnPoint, cons
void cyMisc::UnLoadAvatarModel(pyKey& avatar)
{
plAvatarMgr::GetInstance()->UnLoadAvatar(avatar.getKey(), false);
plAvatarMgr::GetInstance()->UnLoadAvatar(avatar.getKey(), false, true);
}
void cyMisc::ForceCursorHidden()

View File

@ -374,7 +374,8 @@ PYTHON_GLOBAL_METHOD_DEFINITION(PtLoadAvatarModel, args, "Params: modelName, spa
return cyMisc::LoadAvatarModel(modelName, *key, userStr.c_str());
}
PYTHON_GLOBAL_METHOD_DEFINITION(PtUnLoadAvatarModel, args, "Params: avatarKey\nUnloads the specified avatar model")
PYTHON_GLOBAL_METHOD_DEFINITION(PtUnLoadAvatarModel, args, "Params: avatarKey\nForcibly unloads the specified avatar model.\n"
"Do not use this method unless you require fine-grained control of avatar unloading.")
{
PyObject* keyObj = NULL;
if (!PyArg_ParseTuple(args, "O", &keyObj))