mirror of https://github.com/AxioDL/metaforce.git
CFireFlea: Mark helper functions as const
These don't modify internal member state at all and can be marked as such.
This commit is contained in:
parent
97f2576e2a
commit
d9dde388f5
|
@ -128,7 +128,7 @@ void CFireFlea::TargetPatrol(CStateManager& mgr, EStateMsg msg, float arg) {
|
|||
}
|
||||
}
|
||||
|
||||
zeus::CVector3f CFireFlea::FindSafeRoute(CStateManager& mgr, const zeus::CVector3f& forward) {
|
||||
zeus::CVector3f CFireFlea::FindSafeRoute(CStateManager& mgr, const zeus::CVector3f& forward) const {
|
||||
const float mag = forward.magnitude();
|
||||
if (mag <= 0.f) {
|
||||
return {};
|
||||
|
@ -171,11 +171,11 @@ zeus::CVector3f CFireFlea::FindSafeRoute(CStateManager& mgr, const zeus::CVector
|
|||
return -forward;
|
||||
}
|
||||
|
||||
bool CFireFlea::CheckNearWater(const CStateManager& mgr, const zeus::CVector3f& dir) {
|
||||
bool CFireFlea::CheckNearWater(const CStateManager& mgr, const zeus::CVector3f& dir) const {
|
||||
rstl::reserved_vector<TUniqueId, 1024> nearList;
|
||||
mgr.BuildNearList(nearList, GetTranslation(), dir, 2.f, CMaterialFilter::skPassEverything, nullptr);
|
||||
|
||||
for (TUniqueId id : nearList) {
|
||||
for (const TUniqueId id : nearList) {
|
||||
if (TCastToConstPtr<CScriptWater>(mgr.GetObjectById(id)))
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -33,8 +33,8 @@ class CFireFlea : public CPatterned {
|
|||
CPathFindSearch xd8c_pathFind;
|
||||
|
||||
static s32 sLightIdx;
|
||||
zeus::CVector3f FindSafeRoute(CStateManager& mgr, const zeus::CVector3f& forward);
|
||||
bool CheckNearWater(const CStateManager&, const zeus::CVector3f& dir);
|
||||
zeus::CVector3f FindSafeRoute(CStateManager& mgr, const zeus::CVector3f& forward) const;
|
||||
bool CheckNearWater(const CStateManager&, const zeus::CVector3f& dir) const;
|
||||
|
||||
public:
|
||||
DEFINE_PATTERNED(FireFlea)
|
||||
|
|
Loading…
Reference in New Issue