[Client] Disable mListener methods in mwworld/containerstore

This should put an end to frequent crashes until I can fix the problem properly.
pull/484/head
David Cernat 6 years ago
parent 1baf82db32
commit c65d6c1328

@ -366,8 +366,18 @@ MWWorld::ContainerStoreIterator MWWorld::ContainerStore::add (const Ptr& itemPtr
item.getRefData().getLocals().setVarByInt(script, "onpcadd", 1); item.getRefData().getLocals().setVarByInt(script, "onpcadd", 1);
} }
if (mListener) /*
mListener->itemAdded(item, count); Start of tes3mp change (major)
Disable the listener here because it keeps causing crashes; this should only be
a temporary solution that doesn't affect much anyway given that the listener is
only used in relation to light-emitting items
*/
//if (mListener)
// mListener->itemAdded(item, count);
/*
End of tes3mp change (major)
*/
return it; return it;
} }
@ -493,8 +503,18 @@ int MWWorld::ContainerStore::remove(const Ptr& item, int count, const Ptr& actor
flagAsModified(); flagAsModified();
if (mListener) /*
mListener->itemRemoved(item, count - toRemove); Start of tes3mp change (major)
Disable the listener here because it keeps causing crashes; this should only be
a temporary solution that doesn't affect much anyway given that the listener is
only used in relation to light-emitting items
*/
//if (mListener)
// mListener->itemRemoved(item, count - toRemove);
/*
End of tes3mp change (major)
*/
// number of removed items // number of removed items
return count - toRemove; return count - toRemove;

Loading…
Cancel
Save