Fixed crash in AI caused by missing virtual declarations.
This commit is contained in:
parent
76dc8c8763
commit
5143ae97ea
@ -188,14 +188,14 @@ public:
|
|||||||
return 0;
|
return 0;
|
||||||
} // getGraphNode
|
} // getGraphNode
|
||||||
// -----------------------------------------------------------------------
|
// -----------------------------------------------------------------------
|
||||||
const Vec3 *getAvoidancePoint(bool left) const
|
virtual const Vec3 *getAvoidancePoint(bool left) const
|
||||||
{
|
{
|
||||||
Log::fatal("ItemState", "getAvoidancePoint() called for ItemState.");
|
Log::fatal("ItemState", "getAvoidancePoint() called for ItemState.");
|
||||||
// Return doesn't matter, fatal aborts
|
// Return doesn't matter, fatal aborts
|
||||||
return &m_xyz;
|
return &m_xyz;
|
||||||
} // getAvoidancePoint
|
} // getAvoidancePoint
|
||||||
// -----------------------------------------------------------------------
|
// -----------------------------------------------------------------------
|
||||||
float getDistanceFromCenter() const
|
virtual float getDistanceFromCenter() const
|
||||||
{
|
{
|
||||||
Log::fatal("itemState",
|
Log::fatal("itemState",
|
||||||
"getDistanceFromCentre() called for ItemState.");
|
"getDistanceFromCentre() called for ItemState.");
|
||||||
@ -414,13 +414,16 @@ public:
|
|||||||
// ------------------------------------------------------------------------
|
// ------------------------------------------------------------------------
|
||||||
/** Returns the distance from center: negative means left of center,
|
/** Returns the distance from center: negative means left of center,
|
||||||
* positive means right of center. */
|
* positive means right of center. */
|
||||||
float getDistanceFromCenter() const { return m_distance_from_center; }
|
virtual float getDistanceFromCenter() const OVERRIDE
|
||||||
|
{
|
||||||
|
return m_distance_from_center;
|
||||||
|
} // getDistanceFromCenter
|
||||||
// ------------------------------------------------------------------------
|
// ------------------------------------------------------------------------
|
||||||
/** Returns a point to the left or right of the item which will not trigger
|
/** Returns a point to the left or right of the item which will not trigger
|
||||||
* a collection of this item.
|
* a collection of this item.
|
||||||
* \param left If true, return a point to the left, else a point to
|
* \param left If true, return a point to the left, else a point to
|
||||||
* the right. */
|
* the right. */
|
||||||
const Vec3 *getAvoidancePoint(bool left) const
|
virtual const Vec3 *getAvoidancePoint(bool left) const OVERRIDE
|
||||||
{
|
{
|
||||||
if(left) return m_avoidance_points[0];
|
if(left) return m_avoidance_points[0];
|
||||||
return m_avoidance_points[1];
|
return m_avoidance_points[1];
|
||||||
|
Loading…
Reference in New Issue
Block a user