mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-30 04:45:33 +00:00
Merge pull request #126 from OpenMW/master
Add OpenMW commits up to 14 Jan
This commit is contained in:
commit
70b43ecef6
1 changed files with 18 additions and 23 deletions
|
@ -13,7 +13,8 @@ namespace
|
|||
enum RefDataFlags
|
||||
{
|
||||
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_OnActivate = 2,
|
||||
Flag_ActivationBuffered = 4
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -241,38 +242,32 @@ namespace MWWorld
|
|||
return mChanged || !mAnimationState.empty();
|
||||
}
|
||||
|
||||
bool RefData::activateByScript()
|
||||
{
|
||||
bool ret = (mFlags & Flag_ActivationBuffered);
|
||||
mFlags &= ~(Flag_SuppressActivate|Flag_OnActivate);
|
||||
return ret;
|
||||
}
|
||||
|
||||
bool RefData::activate()
|
||||
{
|
||||
if (!(mFlags & Flag_SuppressActivate))
|
||||
return true;
|
||||
if (mFlags & Flag_SuppressActivate)
|
||||
{
|
||||
mFlags |= Flag_OnActivate|Flag_ActivationBuffered;
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
mFlags |= Flag_OnActivate;
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
bool RefData::onActivate()
|
||||
{
|
||||
bool ret = mFlags & Flag_OnActivate;
|
||||
mFlags |= Flag_SuppressActivate;
|
||||
|
||||
if (mFlags & Flag_OnActivate)
|
||||
{
|
||||
mFlags &= (~Flag_OnActivate);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool RefData::activateByScript()
|
||||
{
|
||||
if (mFlags & Flag_SuppressActivate)
|
||||
{
|
||||
mFlags &= (~Flag_SuppressActivate);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
return false;
|
||||
mFlags &= (~Flag_OnActivate);
|
||||
return ret;
|
||||
}
|
||||
|
||||
const ESM::AnimationState& RefData::getAnimationState() const
|
||||
|
|
Loading…
Reference in a new issue