mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-16 18:19:55 +00:00
[Client] Reimplement temporary fix from c65d6c1328
The real reason for the crash remains to be fixed.
This commit is contained in:
parent
afa704ce95
commit
ceb16bb6f8
1 changed files with 23 additions and 4 deletions
|
@ -388,8 +388,17 @@ MWWorld::ContainerStoreIterator MWWorld::ContainerStore::add (const Ptr& itemPtr
|
||||||
item.getRefData().getLocals().setVarByInt(script, "onpcadd", 1);
|
item.getRefData().getLocals().setVarByInt(script, "onpcadd", 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mListener && !actorPtr.getClass().hasInventoryStore(actorPtr))
|
/*
|
||||||
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
|
||||||
|
*/
|
||||||
|
//if (mListener && !actorPtr.getClass().hasInventoryStore(actorPtr))
|
||||||
|
// mListener->itemAdded(item, count);
|
||||||
|
/*
|
||||||
|
End of tes3mp change (major)
|
||||||
|
*/
|
||||||
|
|
||||||
return it;
|
return it;
|
||||||
}
|
}
|
||||||
|
@ -527,8 +536,18 @@ int MWWorld::ContainerStore::remove(const Ptr& item, int count, const Ptr& actor
|
||||||
flagAsModified();
|
flagAsModified();
|
||||||
|
|
||||||
// we should not fire event for InventoryStore yet - it has some custom logic
|
// we should not fire event for InventoryStore yet - it has some custom logic
|
||||||
if (mListener && !actor.getClass().hasInventoryStore(actor))
|
|
||||||
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
|
||||||
|
*/
|
||||||
|
//if (mListener && !actor.getClass().hasInventoryStore(actor))
|
||||||
|
// 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…
Reference in a new issue