mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-21 07:23:54 +00:00
bug-fixes: actors were registered twice at cell change; disabled references were rendered at cell change
This commit is contained in:
parent
dbd42386da
commit
5543c84586
2 changed files with 2 additions and 23 deletions
|
@ -19,9 +19,10 @@ void insertCellRefList (CellRenderImp& cellRender, MWWorld::Environment& environ
|
||||||
for (typename T::List::iterator it = cellRefList.list.begin();
|
for (typename T::List::iterator it = cellRefList.list.begin();
|
||||||
it != cellRefList.list.end(); it++)
|
it != cellRefList.list.end(); it++)
|
||||||
{
|
{
|
||||||
if (it->mData.getCount())
|
if (it->mData.getCount() || it->mData.isEnabled())
|
||||||
{
|
{
|
||||||
MWWorld::Ptr ptr (&*it, &cell);
|
MWWorld::Ptr ptr (&*it, &cell);
|
||||||
|
|
||||||
class_.insertObj (ptr, cellRender, environment);
|
class_.insertObj (ptr, cellRender, environment);
|
||||||
class_.enable (ptr, environment);
|
class_.enable (ptr, environment);
|
||||||
}
|
}
|
||||||
|
|
|
@ -562,28 +562,6 @@ namespace MWWorld
|
||||||
mEnvironment.mMechanicsManager->addActor (mPlayerPos->getPlayer());
|
mEnvironment.mMechanicsManager->addActor (mPlayerPos->getPlayer());
|
||||||
mEnvironment.mMechanicsManager->watchActor (mPlayerPos->getPlayer());
|
mEnvironment.mMechanicsManager->watchActor (mPlayerPos->getPlayer());
|
||||||
|
|
||||||
for (ESMS::CellRefList<ESM::Creature, RefData>::List::iterator iter (
|
|
||||||
cell->creatures.list.begin());
|
|
||||||
iter!=cell->creatures.list.end(); ++iter)
|
|
||||||
{
|
|
||||||
if (iter->mData.isEnabled())
|
|
||||||
{
|
|
||||||
Ptr ptr (&*iter, cell);
|
|
||||||
mEnvironment.mMechanicsManager->addActor (ptr);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
for (ESMS::CellRefList<ESM::NPC, RefData>::List::iterator iter (
|
|
||||||
cell->npcs.list.begin());
|
|
||||||
iter!=cell->npcs.list.end(); ++iter)
|
|
||||||
{
|
|
||||||
if (iter->mData.isEnabled())
|
|
||||||
{
|
|
||||||
Ptr ptr (&*iter, cell);
|
|
||||||
mEnvironment.mMechanicsManager->addActor (ptr);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Sky system
|
// Sky system
|
||||||
if (mSky)
|
if (mSky)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue