mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-08-03 15:27:13 -04:00
Merge branch 'logiut_kopio' into 'master'
Restore forcegreet with disabled actors See merge request OpenMW/openmw!4705
This commit is contained in:
commit
261a8ee91f
@ -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())
|
||||
|
@ -298,6 +298,11 @@ namespace
|
||||
iter->mData.enable();
|
||||
MWBase::Environment::get().getWorld()->disable(ptr);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (state.mVersion < ESM::OpenMW0_50SaveGameFormatVersion)
|
||||
iter->mData.flagAsResolved();
|
||||
}
|
||||
MWBase::Environment::get().getWorldModel()->registerPtr(ptr);
|
||||
return;
|
||||
}
|
||||
|
@ -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
|
||||
};
|
||||
}
|
||||
|
||||
@ -133,7 +134,7 @@ namespace MWWorld
|
||||
try
|
||||
{
|
||||
copy(refData);
|
||||
mFlags &= ~(Flag_SuppressActivate | Flag_OnActivate | Flag_ActivationBuffered);
|
||||
mFlags &= ~(Flag_SuppressActivate | Flag_OnActivate | Flag_ActivationBuffered | Flag_Resolved);
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
@ -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);
|
||||
}
|
||||
|
||||
|
@ -28,7 +28,7 @@ namespace ESM
|
||||
inline constexpr FormatVersion MaxOldCountFormatVersion = 30;
|
||||
inline constexpr FormatVersion MaxActiveSpellTypeVersion = 31;
|
||||
inline constexpr FormatVersion MaxPlayerBeforeCellDataFormatVersion = 32;
|
||||
inline constexpr FormatVersion CurrentSaveGameFormatVersion = 34;
|
||||
inline constexpr FormatVersion CurrentSaveGameFormatVersion = 35;
|
||||
|
||||
inline constexpr FormatVersion MinSupportedSaveGameFormatVersion = 5;
|
||||
inline constexpr FormatVersion OpenMW0_48SaveGameFormatVersion = 21;
|
||||
|
Loading…
x
Reference in New Issue
Block a user