forked from teamnwah/openmw-tes3coop
Accept a ConstPtr in isBipedal
This commit is contained in:
parent
92a3acfa56
commit
b09bdd6af5
6 changed files with 19 additions and 13 deletions
|
@ -40,7 +40,7 @@
|
|||
|
||||
namespace
|
||||
{
|
||||
bool isFlagBitSet(const MWWorld::Ptr &ptr, ESM::Creature::Flags bitMask)
|
||||
bool isFlagBitSet(const MWWorld::ConstPtr &ptr, ESM::Creature::Flags bitMask)
|
||||
{
|
||||
return (ptr.get<ESM::Creature>()->mBase->mFlags & bitMask) != 0;
|
||||
}
|
||||
|
@ -599,7 +599,7 @@ namespace MWClass
|
|||
return MWWorld::Ptr(cell.insert(ref), &cell);
|
||||
}
|
||||
|
||||
bool Creature::isBipedal(const MWWorld::Ptr &ptr) const
|
||||
bool Creature::isBipedal(const MWWorld::ConstPtr &ptr) const
|
||||
{
|
||||
return isFlagBitSet(ptr, ESM::Creature::Bipedal);
|
||||
}
|
||||
|
|
|
@ -107,7 +107,7 @@ namespace MWClass
|
|||
return true;
|
||||
}
|
||||
|
||||
virtual bool isBipedal (const MWWorld::Ptr &ptr) const;
|
||||
virtual bool isBipedal (const MWWorld::ConstPtr &ptr) const;
|
||||
virtual bool canFly (const MWWorld::Ptr &ptr) const;
|
||||
virtual bool canSwim (const MWWorld::Ptr &ptr) const;
|
||||
virtual bool canWalk (const MWWorld::Ptr &ptr) const;
|
||||
|
|
|
@ -1208,6 +1208,16 @@ namespace MWClass
|
|||
return Misc::StringUtils::ciEqual(ptr.get<ESM::NPC>()->mBase->mClass, className);
|
||||
}
|
||||
|
||||
bool Npc::canSwim(const MWWorld::ConstPtr &ptr) const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Npc::canWalk(const MWWorld::ConstPtr &ptr) const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
void Npc::respawn(const MWWorld::Ptr &ptr) const
|
||||
{
|
||||
if (ptr.get<ESM::NPC>()->mBase->mFlags & ESM::NPC::Respawn)
|
||||
|
@ -1242,7 +1252,7 @@ namespace MWClass
|
|||
return ref->mBase->mAiData.mFight;
|
||||
}
|
||||
|
||||
bool Npc::isBipedal(const MWWorld::Ptr &ptr) const
|
||||
bool Npc::isBipedal(const MWWorld::ConstPtr &ptr) const
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -153,15 +153,11 @@ namespace MWClass
|
|||
|
||||
virtual bool isClass(const MWWorld::Ptr& ptr, const std::string &className) const;
|
||||
|
||||
virtual bool canSwim (const MWWorld::Ptr &ptr) const {
|
||||
return true;
|
||||
}
|
||||
virtual bool canSwim (const MWWorld::ConstPtr &ptr) const;
|
||||
|
||||
virtual bool canWalk (const MWWorld::Ptr &ptr) const {
|
||||
return true;
|
||||
}
|
||||
virtual bool canWalk (const MWWorld::ConstPtr &ptr) const;
|
||||
|
||||
virtual bool isBipedal (const MWWorld::Ptr &ptr) const;
|
||||
virtual bool isBipedal (const MWWorld::ConstPtr &ptr) const;
|
||||
|
||||
virtual void respawn (const MWWorld::Ptr& ptr) const;
|
||||
|
||||
|
|
|
@ -355,7 +355,7 @@ namespace MWWorld
|
|||
return newPtr;
|
||||
}
|
||||
|
||||
bool Class::isBipedal(const Ptr &ptr) const
|
||||
bool Class::isBipedal(const ConstPtr &ptr) const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -300,7 +300,7 @@ namespace MWWorld
|
|||
return false;
|
||||
}
|
||||
|
||||
virtual bool isBipedal(const MWWorld::Ptr& ptr) const;
|
||||
virtual bool isBipedal(const MWWorld::ConstPtr& ptr) const;
|
||||
virtual bool canFly(const MWWorld::Ptr& ptr) const;
|
||||
virtual bool canSwim(const MWWorld::Ptr& ptr) const;
|
||||
virtual bool canWalk(const MWWorld::Ptr& ptr) const;
|
||||
|
|
Loading…
Reference in a new issue