summaryrefslogtreecommitdiff
path: root/modules/navigation/godot_navigation_server.h
diff options
context:
space:
mode:
Diffstat (limited to 'modules/navigation/godot_navigation_server.h')
-rw-r--r--modules/navigation/godot_navigation_server.h19
1 files changed, 7 insertions, 12 deletions
diff --git a/modules/navigation/godot_navigation_server.h b/modules/navigation/godot_navigation_server.h
index a87a88d3bc..0b113b77d4 100644
--- a/modules/navigation/godot_navigation_server.h
+++ b/modules/navigation/godot_navigation_server.h
@@ -36,10 +36,10 @@
#include "core/templates/rid_owner.h"
#include "servers/navigation_server_3d.h"
+#include "nav_agent.h"
#include "nav_link.h"
#include "nav_map.h"
#include "nav_region.h"
-#include "rvo_agent.h"
/// The commands are functions executed during the `sync` phase.
@@ -54,10 +54,6 @@
virtual void F_NAME(T_0 D_0, T_1 D_1) override; \
void MERGE(_cmd_, F_NAME)(T_0 D_0, T_1 D_1)
-#define COMMAND_4_DEF(F_NAME, T_0, D_0, T_1, D_1, T_2, D_2, T_3, D_3, D_3_DEF) \
- virtual void F_NAME(T_0 D_0, T_1 D_1, T_2 D_2, T_3 D_3 = D_3_DEF) override; \
- void MERGE(_cmd_, F_NAME)(T_0 D_0, T_1 D_1, T_2 D_2, T_3 D_3)
-
class GodotNavigationServer;
struct SetCommand {
@@ -75,7 +71,7 @@ class GodotNavigationServer : public NavigationServer3D {
mutable RID_Owner<NavLink> link_owner;
mutable RID_Owner<NavMap> map_owner;
mutable RID_Owner<NavRegion> region_owner;
- mutable RID_Owner<RvoAgent> agent_owner;
+ mutable RID_Owner<NavAgent> agent_owner;
bool active = true;
LocalVector<NavMap *> active_maps;
@@ -158,10 +154,10 @@ public:
virtual bool link_is_bidirectional(RID p_link) const override;
COMMAND_2(link_set_navigation_layers, RID, p_link, uint32_t, p_navigation_layers);
virtual uint32_t link_get_navigation_layers(RID p_link) const override;
- COMMAND_2(link_set_start_location, RID, p_link, Vector3, p_location);
- virtual Vector3 link_get_start_location(RID p_link) const override;
- COMMAND_2(link_set_end_location, RID, p_link, Vector3, p_location);
- virtual Vector3 link_get_end_location(RID p_link) const override;
+ COMMAND_2(link_set_start_position, RID, p_link, Vector3, p_position);
+ virtual Vector3 link_get_start_position(RID p_link) const override;
+ COMMAND_2(link_set_end_position, RID, p_link, Vector3, p_position);
+ virtual Vector3 link_get_end_position(RID p_link) const override;
COMMAND_2(link_set_enter_cost, RID, p_link, real_t, p_enter_cost);
virtual real_t link_get_enter_cost(RID p_link) const override;
COMMAND_2(link_set_travel_cost, RID, p_link, real_t, p_travel_cost);
@@ -182,7 +178,7 @@ public:
COMMAND_2(agent_set_position, RID, p_agent, Vector3, p_position);
COMMAND_2(agent_set_ignore_y, RID, p_agent, bool, p_ignore);
virtual bool agent_is_map_changed(RID p_agent) const override;
- COMMAND_4_DEF(agent_set_callback, RID, p_agent, ObjectID, p_object_id, StringName, p_method, Variant, p_udata, Variant());
+ COMMAND_2(agent_set_callback, RID, p_agent, Callable, p_callback);
COMMAND_1(free, RID, p_object);
@@ -198,6 +194,5 @@ public:
#undef COMMAND_1
#undef COMMAND_2
-#undef COMMAND_4_DEF
#endif // GODOT_NAVIGATION_SERVER_H