mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-26 09:35:28 +00:00
Accept a ConstPtr in canFly, canSwim & canWalk
This commit is contained in:
parent
b09bdd6af5
commit
954186fe1e
@ -604,17 +604,17 @@ namespace MWClass
|
||||
return isFlagBitSet(ptr, ESM::Creature::Bipedal);
|
||||
}
|
||||
|
||||
bool Creature::canFly(const MWWorld::Ptr &ptr) const
|
||||
bool Creature::canFly(const MWWorld::ConstPtr &ptr) const
|
||||
{
|
||||
return isFlagBitSet(ptr, ESM::Creature::Flies);
|
||||
}
|
||||
|
||||
bool Creature::canSwim(const MWWorld::Ptr &ptr) const
|
||||
bool Creature::canSwim(const MWWorld::ConstPtr &ptr) const
|
||||
{
|
||||
return isFlagBitSet(ptr, static_cast<ESM::Creature::Flags>(ESM::Creature::Swims | ESM::Creature::Bipedal));
|
||||
}
|
||||
|
||||
bool Creature::canWalk(const MWWorld::Ptr &ptr) const
|
||||
bool Creature::canWalk(const MWWorld::ConstPtr &ptr) const
|
||||
{
|
||||
return isFlagBitSet(ptr, static_cast<ESM::Creature::Flags>(ESM::Creature::Walks | ESM::Creature::Bipedal));
|
||||
}
|
||||
|
@ -108,9 +108,9 @@ namespace MWClass
|
||||
}
|
||||
|
||||
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;
|
||||
virtual bool canFly (const MWWorld::ConstPtr &ptr) const;
|
||||
virtual bool canSwim (const MWWorld::ConstPtr &ptr) const;
|
||||
virtual bool canWalk (const MWWorld::ConstPtr &ptr) const;
|
||||
|
||||
virtual int getSkill(const MWWorld::Ptr &ptr, int skill) const;
|
||||
|
||||
|
@ -360,17 +360,17 @@ namespace MWWorld
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Class::canFly(const Ptr &ptr) const
|
||||
bool Class::canFly(const ConstPtr &ptr) const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Class::canSwim(const Ptr &ptr) const
|
||||
bool Class::canSwim(const ConstPtr &ptr) const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Class::canWalk(const Ptr &ptr) const
|
||||
bool Class::canWalk(const ConstPtr &ptr) const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
@ -301,9 +301,9 @@ namespace MWWorld
|
||||
}
|
||||
|
||||
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;
|
||||
virtual bool canFly(const MWWorld::ConstPtr& ptr) const;
|
||||
virtual bool canSwim(const MWWorld::ConstPtr& ptr) const;
|
||||
virtual bool canWalk(const MWWorld::ConstPtr& ptr) const;
|
||||
bool isPureWaterCreature(const MWWorld::Ptr& ptr) const;
|
||||
bool isMobile(const MWWorld::Ptr& ptr) const;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user