1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-08 09:37:53 +00:00

disabled items placing handling

This commit is contained in:
greye 2012-07-26 19:06:48 +04:00
parent 26595f22f6
commit aa5f63ffcc
2 changed files with 8 additions and 3 deletions

View File

@ -233,7 +233,11 @@ namespace MWWorld
Ptr newPtr = copyToCellImpl(ptr, cell);
newPtr.getRefData().setCount(ptr.getRefData().getCount());
newPtr.getRefData().enable();
if (ptr.getRefData().isEnabled()) {
newPtr.getRefData().enable();
} else {
newPtr.getRefData().disable();
}
return newPtr;
}

View File

@ -1054,8 +1054,9 @@ namespace MWWorld
}
if (mWorldScene->isCellActive(cell)) {
mWorldScene->addObjectToScene(dropped);
if (dropped.getRefData().isEnabled()) {
mWorldScene->addObjectToScene(dropped);
}
std::string script = MWWorld::Class::get(dropped).getScript(dropped);
if (!script.empty()) {
mLocalScripts.add(script, dropped);