Use a const float* for PathDelta()

This commit is contained in:
smallmodel 2023-10-15 17:50:28 +02:00
parent a5532ad67b
commit c7c3fcd0e0
No known key found for this signature in database
GPG key ID: 9F2D623CEDF08512
3 changed files with 4 additions and 4 deletions

View file

@ -5877,7 +5877,7 @@ Move on path with squad.
*/ */
bool Actor::MoveOnPathWithSquad(void) bool Actor::MoveOnPathWithSquad(void)
{ {
float* pvMyDir, *pvHisDir; const float* pvMyDir, *pvHisDir;
vec2_t vDelta; vec2_t vDelta;
Sentient* pSquadMate; Sentient* pSquadMate;
float fIntervalSquared; float fIntervalSquared;
@ -6132,7 +6132,7 @@ bool Actor::MoveToPatrolCurrentNode(void)
return false; return false;
} }
float *delta = PathDelta(); const float *delta = PathDelta();
return VectorLength2DSquared(delta) <= m_fMoveDoneRadiusSquared; return VectorLength2DSquared(delta) <= m_fMoveDoneRadiusSquared;
} }
} }

View file

@ -460,7 +460,7 @@ bool SimpleActor::PathGoalSlowdownStarted(void) const
return m_fPathGoalTime >= level.time; return m_fPathGoalTime >= level.time;
} }
float *SimpleActor::PathDelta(void) const const float *SimpleActor::PathDelta(void) const
{ {
return m_Path.CurrentDelta(); return m_Path.CurrentDelta();
} }

View file

@ -172,7 +172,7 @@ public:
float PathDist(void) const; float PathDist(void) const;
bool PathHasCompleteLookahead(void) const; bool PathHasCompleteLookahead(void) const;
Vector PathGoal(void) const; Vector PathGoal(void) const;
float *PathDelta(void) const; const float *PathDelta(void) const;
bool PathGoalSlowdownStarted(void) const; bool PathGoalSlowdownStarted(void) const;
void SetDest(vec3_t dest); void SetDest(vec3_t dest);
void StopTurning(void); void StopTurning(void);