From 65aa1c4084da69d0eefc030ef096d28dfc820543 Mon Sep 17 00:00:00 2001 From: Relintai Date: Fri, 13 Jan 2023 23:53:46 +0100 Subject: [PATCH] Make virtuals actually virtuals. --- modules/steering_ai/gsai_group_behavior.h | 2 +- modules/steering_ai/gsai_steering_behavior.h | 2 +- modules/steering_ai/proximities/gsai_proximity.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/steering_ai/gsai_group_behavior.h b/modules/steering_ai/gsai_group_behavior.h index b430b04f8..64ce05eb2 100644 --- a/modules/steering_ai/gsai_group_behavior.h +++ b/modules/steering_ai/gsai_group_behavior.h @@ -21,7 +21,7 @@ public: Ref get_callback(); void set_callback(const Ref &val); - bool _report_neighbor(const Ref &neighbor); + virtual bool _report_neighbor(const Ref &neighbor); GSAIGroupBehavior(); ~GSAIGroupBehavior(); diff --git a/modules/steering_ai/gsai_steering_behavior.h b/modules/steering_ai/gsai_steering_behavior.h index ec8c2c800..92238e03c 100644 --- a/modules/steering_ai/gsai_steering_behavior.h +++ b/modules/steering_ai/gsai_steering_behavior.h @@ -29,7 +29,7 @@ public: // The `calculate_steering` function is the entry point for all behaviors. // Sets the `acceleration` with the behavior's desired amount of acceleration. void calculate_steering(Ref acceleration); - void _calculate_steering(Ref acceleration); + virtual void _calculate_steering(Ref acceleration); GSAISteeringBehavior(); ~GSAISteeringBehavior(); diff --git a/modules/steering_ai/proximities/gsai_proximity.h b/modules/steering_ai/proximities/gsai_proximity.h index d43d8a35c..8be90ef6e 100644 --- a/modules/steering_ai/proximities/gsai_proximity.h +++ b/modules/steering_ai/proximities/gsai_proximity.h @@ -23,7 +23,7 @@ public: void set_agents_arr(const Array &arr); int find_neighbors(const Ref &callback); - int _find_neighbors(Ref callback); + virtual int _find_neighbors(Ref callback); GSAIProximity(); ~GSAIProximity();