mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-02-19 17:09:40 +00:00
Creature::isFlagBitSet() changed to free function.
This commit is contained in:
parent
95d2d82abf
commit
300c48329d
2 changed files with 5 additions and 13 deletions
|
@ -58,6 +58,11 @@ namespace
|
|||
cloned->mContainerStore = mContainerStore->clone();
|
||||
return cloned;
|
||||
}
|
||||
|
||||
bool isFlagBitSet(const MWWorld::Ptr &ptr, ESM::Creature::Flags bitMask)
|
||||
{
|
||||
return (ptr.get<ESM::Creature>()->mBase->mFlags & bitMask) != 0;
|
||||
}
|
||||
}
|
||||
|
||||
namespace MWClass
|
||||
|
@ -774,10 +779,4 @@ namespace MWClass
|
|||
MWWorld::LiveCellRef<ESM::Creature> *ref = ptr.get<ESM::Creature>();
|
||||
scale *= ref->mBase->mScale;
|
||||
}
|
||||
|
||||
bool Creature::isFlagBitSet(const MWWorld::Ptr &ptr, ESM::Creature::Flags bitMask) const
|
||||
{
|
||||
MWWorld::LiveCellRef<ESM::Creature> *ref = ptr.get<ESM::Creature>();
|
||||
return (ref->mBase->mFlags & bitMask) != 0;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
#ifndef GAME_MWCLASS_CREATURE_H
|
||||
#define GAME_MWCLASS_CREATURE_H
|
||||
|
||||
#include <components/esm/loadcrea.hpp>
|
||||
|
||||
#include "actor.hpp"
|
||||
|
||||
namespace ESM
|
||||
|
@ -136,11 +134,6 @@ namespace MWClass
|
|||
virtual int getBaseFightRating(const MWWorld::Ptr &ptr) const;
|
||||
|
||||
virtual void adjustScale(const MWWorld::Ptr& ptr, osg::Vec3f& scale) const;
|
||||
|
||||
private:
|
||||
|
||||
/// \return true if any of the indicated bits in Creature's mFlags is set
|
||||
bool isFlagBitSet(const MWWorld::Ptr &ptr, ESM::Creature::Flags bitMask) const;
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue