Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
godot
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
community
godot
Commits
38caa412
Commit
38caa412
authored
Dec 15, 2017
by
Nathan Warden
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Renamed navmesh/poly_create to navmesh/poly_add since no navmesh is created.
parent
b872439e
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
17 additions
and
17 deletions
+17
-17
Navigation.xml
doc/classes/Navigation.xml
+1
-1
Navigation2D.xml
doc/classes/Navigation2D.xml
+1
-1
grid_map.cpp
modules/gridmap/grid_map.cpp
+2
-2
navigation2d.cpp
scene/2d/navigation2d.cpp
+2
-2
navigation2d.h
scene/2d/navigation2d.h
+1
-1
navigation_polygon.cpp
scene/2d/navigation_polygon.cpp
+3
-3
tile_map.cpp
scene/2d/tile_map.cpp
+1
-1
navigation.cpp
scene/3d/navigation.cpp
+2
-2
navigation.h
scene/3d/navigation.h
+1
-1
navigation_mesh.cpp
scene/3d/navigation_mesh.cpp
+3
-3
No files found.
doc/classes/Navigation.xml
View file @
38caa412
...
...
@@ -57,7 +57,7 @@
<description>
</description>
</method>
<method
name=
"navmesh_
create
"
>
<method
name=
"navmesh_
add
"
>
<return
type=
"int"
>
</return>
<argument
index=
"0"
name=
"mesh"
type=
"NavigationMesh"
>
...
...
doc/classes/Navigation2D.xml
View file @
38caa412
...
...
@@ -37,7 +37,7 @@
<description>
</description>
</method>
<method
name=
"navpoly_
create
"
>
<method
name=
"navpoly_
add
"
>
<return
type=
"int"
>
</return>
<argument
index=
"0"
name=
"mesh"
type=
"NavigationPolygon"
>
...
...
modules/gridmap/grid_map.cpp
View file @
38caa412
...
...
@@ -469,7 +469,7 @@ bool GridMap::_octant_update(const OctantKey &p_key) {
nm
.
xform
=
xform
;
if
(
navigation
)
{
nm
.
id
=
navigation
->
navmesh_
create
(
navmesh
,
xform
,
this
);
nm
.
id
=
navigation
->
navmesh_
add
(
navmesh
,
xform
,
this
);
}
else
{
nm
.
id
=
-
1
;
}
...
...
@@ -556,7 +556,7 @@ void GridMap::_octant_enter_world(const OctantKey &p_key) {
if
(
cell_map
.
has
(
F
->
key
())
&&
F
->
get
().
id
<
0
)
{
Ref
<
NavigationMesh
>
nm
=
theme
->
get_item_navmesh
(
cell_map
[
F
->
key
()].
item
);
if
(
nm
.
is_valid
())
{
F
->
get
().
id
=
navigation
->
navmesh_
create
(
nm
,
F
->
get
().
xform
,
this
);
F
->
get
().
id
=
navigation
->
navmesh_
add
(
nm
,
F
->
get
().
xform
,
this
);
}
}
}
...
...
scene/2d/navigation2d.cpp
View file @
38caa412
...
...
@@ -205,7 +205,7 @@ void Navigation2D::_navpoly_unlink(int p_id) {
nm
.
linked
=
false
;
}
int
Navigation2D
::
navpoly_
create
(
const
Ref
<
NavigationPolygon
>
&
p_mesh
,
const
Transform2D
&
p_xform
,
Object
*
p_owner
)
{
int
Navigation2D
::
navpoly_
add
(
const
Ref
<
NavigationPolygon
>
&
p_mesh
,
const
Transform2D
&
p_xform
,
Object
*
p_owner
)
{
int
id
=
last_id
++
;
NavMesh
nm
;
...
...
@@ -708,7 +708,7 @@ Object *Navigation2D::get_closest_point_owner(const Vector2 &p_point) {
void
Navigation2D
::
_bind_methods
()
{
ClassDB
::
bind_method
(
D_METHOD
(
"navpoly_
create"
,
"mesh"
,
"xform"
,
"owner"
),
&
Navigation2D
::
navpoly_create
,
DEFVAL
(
Variant
()));
ClassDB
::
bind_method
(
D_METHOD
(
"navpoly_
add"
,
"mesh"
,
"xform"
,
"owner"
),
&
Navigation2D
::
navpoly_add
,
DEFVAL
(
Variant
()));
ClassDB
::
bind_method
(
D_METHOD
(
"navpoly_set_transform"
,
"id"
,
"xform"
),
&
Navigation2D
::
navpoly_set_transform
);
ClassDB
::
bind_method
(
D_METHOD
(
"navpoly_remove"
,
"id"
),
&
Navigation2D
::
navpoly_remove
);
...
...
scene/2d/navigation2d.h
View file @
38caa412
...
...
@@ -159,7 +159,7 @@ protected:
public
:
//API should be as dynamic as possible
int
navpoly_
create
(
const
Ref
<
NavigationPolygon
>
&
p_mesh
,
const
Transform2D
&
p_xform
,
Object
*
p_owner
=
NULL
);
int
navpoly_
add
(
const
Ref
<
NavigationPolygon
>
&
p_mesh
,
const
Transform2D
&
p_xform
,
Object
*
p_owner
=
NULL
);
void
navpoly_set_transform
(
int
p_id
,
const
Transform2D
&
p_xform
);
void
navpoly_remove
(
int
p_id
);
...
...
scene/2d/navigation_polygon.cpp
View file @
38caa412
...
...
@@ -293,7 +293,7 @@ void NavigationPolygonInstance::set_enabled(bool p_enabled) {
if
(
navpoly
.
is_valid
())
{
nav_id
=
navigation
->
navpoly_
create
(
navpoly
,
get_relative_transform_to_parent
(
navigation
),
this
);
nav_id
=
navigation
->
navpoly_
add
(
navpoly
,
get_relative_transform_to_parent
(
navigation
),
this
);
}
}
}
...
...
@@ -324,7 +324,7 @@ void NavigationPolygonInstance::_notification(int p_what) {
if
(
enabled
&&
navpoly
.
is_valid
())
{
nav_id
=
navigation
->
navpoly_
create
(
navpoly
,
get_relative_transform_to_parent
(
navigation
),
this
);
nav_id
=
navigation
->
navpoly_
add
(
navpoly
,
get_relative_transform_to_parent
(
navigation
),
this
);
}
break
;
}
...
...
@@ -419,7 +419,7 @@ void NavigationPolygonInstance::set_navigation_polygon(const Ref<NavigationPolyg
}
if
(
navigation
&&
navpoly
.
is_valid
()
&&
enabled
)
{
nav_id
=
navigation
->
navpoly_
create
(
navpoly
,
get_relative_transform_to_parent
(
navigation
),
this
);
nav_id
=
navigation
->
navpoly_
add
(
navpoly
,
get_relative_transform_to_parent
(
navigation
),
this
);
}
//update_gizmo();
_change_notify
(
"navpoly"
);
...
...
scene/2d/tile_map.cpp
View file @
38caa412
...
...
@@ -486,7 +486,7 @@ void TileMap::_update_dirty_quadrants() {
xform
.
set_origin
(
offset
.
floor
()
+
q
.
pos
);
_fix_cell_transform
(
xform
,
c
,
npoly_ofs
+
center_ofs
,
s
);
int
pid
=
navigation
->
navpoly_
create
(
navpoly
,
nav_rel
*
xform
);
int
pid
=
navigation
->
navpoly_
add
(
navpoly
,
nav_rel
*
xform
);
Quadrant
::
NavPoly
np
;
np
.
id
=
pid
;
...
...
scene/3d/navigation.cpp
View file @
38caa412
...
...
@@ -202,7 +202,7 @@ void Navigation::_navmesh_unlink(int p_id) {
nm
.
linked
=
false
;
}
int
Navigation
::
navmesh_
create
(
const
Ref
<
NavigationMesh
>
&
p_mesh
,
const
Transform
&
p_xform
,
Object
*
p_owner
)
{
int
Navigation
::
navmesh_
add
(
const
Ref
<
NavigationMesh
>
&
p_mesh
,
const
Transform
&
p_xform
,
Object
*
p_owner
)
{
int
id
=
last_id
++
;
NavMesh
nm
;
...
...
@@ -686,7 +686,7 @@ Vector3 Navigation::get_up_vector() const {
void
Navigation
::
_bind_methods
()
{
ClassDB
::
bind_method
(
D_METHOD
(
"navmesh_
create"
,
"mesh"
,
"xform"
,
"owner"
),
&
Navigation
::
navmesh_create
,
DEFVAL
(
Variant
()));
ClassDB
::
bind_method
(
D_METHOD
(
"navmesh_
add"
,
"mesh"
,
"xform"
,
"owner"
),
&
Navigation
::
navmesh_add
,
DEFVAL
(
Variant
()));
ClassDB
::
bind_method
(
D_METHOD
(
"navmesh_set_transform"
,
"id"
,
"xform"
),
&
Navigation
::
navmesh_set_transform
);
ClassDB
::
bind_method
(
D_METHOD
(
"navmesh_remove"
,
"id"
),
&
Navigation
::
navmesh_remove
);
...
...
scene/3d/navigation.h
View file @
38caa412
...
...
@@ -166,7 +166,7 @@ public:
Vector3
get_up_vector
()
const
;
//API should be as dynamic as possible
int
navmesh_
create
(
const
Ref
<
NavigationMesh
>
&
p_mesh
,
const
Transform
&
p_xform
,
Object
*
p_owner
=
NULL
);
int
navmesh_
add
(
const
Ref
<
NavigationMesh
>
&
p_mesh
,
const
Transform
&
p_xform
,
Object
*
p_owner
=
NULL
);
void
navmesh_set_transform
(
int
p_id
,
const
Transform
&
p_xform
);
void
navmesh_remove
(
int
p_id
);
...
...
scene/3d/navigation_mesh.cpp
View file @
38caa412
...
...
@@ -471,7 +471,7 @@ void NavigationMeshInstance::set_enabled(bool p_enabled) {
if
(
navmesh
.
is_valid
())
{
nav_id
=
navigation
->
navmesh_
create
(
navmesh
,
get_relative_transform
(
navigation
),
this
);
nav_id
=
navigation
->
navmesh_
add
(
navmesh
,
get_relative_transform
(
navigation
),
this
);
}
}
}
...
...
@@ -508,7 +508,7 @@ void NavigationMeshInstance::_notification(int p_what) {
if
(
enabled
&&
navmesh
.
is_valid
())
{
nav_id
=
navigation
->
navmesh_
create
(
navmesh
,
get_relative_transform
(
navigation
),
this
);
nav_id
=
navigation
->
navmesh_
add
(
navmesh
,
get_relative_transform
(
navigation
),
this
);
}
break
;
}
...
...
@@ -568,7 +568,7 @@ void NavigationMeshInstance::set_navigation_mesh(const Ref<NavigationMesh> &p_na
navmesh
=
p_navmesh
;
if
(
navigation
&&
navmesh
.
is_valid
()
&&
enabled
)
{
nav_id
=
navigation
->
navmesh_
create
(
navmesh
,
get_relative_transform
(
navigation
),
this
);
nav_id
=
navigation
->
navmesh_
add
(
navmesh
,
get_relative_transform
(
navigation
),
this
);
}
if
(
debug_view
&&
navmesh
.
is_valid
())
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment