mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-09-08 11:51:23 -04:00
Restore forcegreet with disabled actors
This commit is contained in:
parent
c30964feb2
commit
f3d23dc57e
@ -165,7 +165,7 @@ namespace MWScript
|
||||
{
|
||||
MWWorld::Ptr ptr = R()(runtime);
|
||||
|
||||
if (!ptr.getRefData().isEnabled())
|
||||
if (!ptr.getRefData().isEnabled() && !ptr.getRefData().isResolved())
|
||||
return;
|
||||
|
||||
if (!ptr.getClass().isActor())
|
||||
|
@ -19,7 +19,8 @@ namespace
|
||||
Flag_SuppressActivate = 1, // If set, activation will be suppressed and redirected to the OnActivate flag, which
|
||||
// can then be handled by a script.
|
||||
Flag_OnActivate = 2,
|
||||
Flag_ActivationBuffered = 4
|
||||
Flag_ActivationBuffered = 4,
|
||||
Flag_Resolved = 8,
|
||||
};
|
||||
}
|
||||
|
||||
@ -312,4 +313,14 @@ namespace MWWorld
|
||||
return mAnimationState;
|
||||
}
|
||||
|
||||
void RefData::flagAsResolved()
|
||||
{
|
||||
mFlags |= Flag_Resolved;
|
||||
}
|
||||
|
||||
bool RefData::isResolved() const
|
||||
{
|
||||
return mFlags & Flag_Resolved;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -146,6 +146,9 @@ namespace MWWorld
|
||||
|
||||
const ESM::AnimationState& getAnimationState() const;
|
||||
ESM::AnimationState& getAnimationState();
|
||||
|
||||
void flagAsResolved();
|
||||
bool isResolved() const;
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -138,6 +138,8 @@ namespace
|
||||
if (!model.empty())
|
||||
ptr.getClass().insertObject(ptr, model, rotation, physics);
|
||||
|
||||
ptr.getRefData().flagAsResolved();
|
||||
|
||||
MWBase::Environment::get().getLuaManager()->objectAddedToScene(ptr);
|
||||
}
|
||||
|
||||
@ -1132,7 +1134,7 @@ namespace MWWorld
|
||||
{
|
||||
const VFS::Path::Normalized meshPath = useAnim
|
||||
? Misc::ResourceHelpers::correctActorModelPath(
|
||||
VFS::Path::toNormalized(mesh), mRendering.getResourceSystem()->getVFS())
|
||||
VFS::Path::toNormalized(mesh), mRendering.getResourceSystem()->getVFS())
|
||||
: VFS::Path::toNormalized(mesh);
|
||||
|
||||
if (mRendering.getResourceSystem()->getSceneManager()->checkLoaded(meshPath, mRendering.getReferenceTime()))
|
||||
|
Loading…
x
Reference in New Issue
Block a user