From 178ad876d74acc405026e604c780f391f56bcbcc Mon Sep 17 00:00:00 2001 From: scrawl Date: Wed, 16 May 2012 22:17:13 +0200 Subject: [PATCH] fix for objects other than Miscellaneous. --- apps/openmw/mwworld/scene.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/apps/openmw/mwworld/scene.cpp b/apps/openmw/mwworld/scene.cpp index 311f8770bb..8fa7658c6c 100644 --- a/apps/openmw/mwworld/scene.cpp +++ b/apps/openmw/mwworld/scene.cpp @@ -336,68 +336,68 @@ namespace MWWorld if (type == typeid(ESM::Potion).name()) { ESMS::LiveCellRef* ref = ptr.get(); - newPtr = MWWorld::Ptr(ref, cell); cell->potions.list.push_back( *ref ); + newPtr = MWWorld::Ptr(&cell->potions.list.back(), cell); } else if (type == typeid(ESM::Apparatus).name()) { ESMS::LiveCellRef* ref = ptr.get(); - newPtr = MWWorld::Ptr(ref, cell); cell->appas.list.push_back( *ref ); + newPtr = MWWorld::Ptr(&cell->appas.list.back(), cell); } else if (type == typeid(ESM::Armor).name()) { ESMS::LiveCellRef* ref = ptr.get(); - newPtr = MWWorld::Ptr(ref, cell); cell->armors.list.push_back( *ref ); + newPtr = MWWorld::Ptr(&cell->armors.list.back(), cell); } else if (type == typeid(ESM::Book).name()) { ESMS::LiveCellRef* ref = ptr.get(); - newPtr = MWWorld::Ptr(ref, cell); cell->books.list.push_back( *ref ); + newPtr = MWWorld::Ptr(&cell->books.list.back(), cell); } else if (type == typeid(ESM::Clothing).name()) { ESMS::LiveCellRef* ref = ptr.get(); - newPtr = MWWorld::Ptr(ref, cell); cell->clothes.list.push_back( *ref ); + newPtr = MWWorld::Ptr(&cell->clothes.list.back(), cell); } else if (type == typeid(ESM::Ingredient).name()) { ESMS::LiveCellRef* ref = ptr.get(); - newPtr = MWWorld::Ptr(ref, cell); cell->ingreds.list.push_back( *ref ); + newPtr = MWWorld::Ptr(&cell->ingreds.list.back(), cell); } else if (type == typeid(ESM::Light).name()) { ESMS::LiveCellRef* ref = ptr.get(); - newPtr = MWWorld::Ptr(ref, cell); cell->lights.list.push_back( *ref ); + newPtr = MWWorld::Ptr(&cell->lights.list.back(), cell); } else if (type == typeid(ESM::Tool).name()) { ESMS::LiveCellRef* ref = ptr.get(); - newPtr = MWWorld::Ptr(ref, cell); cell->lockpicks.list.push_back( *ref ); + newPtr = MWWorld::Ptr(&cell->lockpicks.list.back(), cell); } else if (type == typeid(ESM::Repair).name()) { ESMS::LiveCellRef* ref = ptr.get(); - newPtr = MWWorld::Ptr(ref, cell); cell->repairs.list.push_back( *ref ); + newPtr = MWWorld::Ptr(&cell->repairs.list.back(), cell); } else if (type == typeid(ESM::Probe).name()) { ESMS::LiveCellRef* ref = ptr.get(); - newPtr = MWWorld::Ptr(ref, cell); cell->probes.list.push_back( *ref ); + newPtr = MWWorld::Ptr(&cell->probes.list.back(), cell); } else if (type == typeid(ESM::Weapon).name()) { ESMS::LiveCellRef* ref = ptr.get(); - newPtr = MWWorld::Ptr(ref, cell); cell->weapons.list.push_back( *ref ); + newPtr = MWWorld::Ptr(&cell->weapons.list.back(), cell); } else if (type == typeid(ESM::Miscellaneous).name()) {