Commit graph

206 commits

Author SHA1 Message Date
Rémi Verschelde
1426cd3b3a
One Copyright Update to rule them all
As many open source projects have started doing it, we're removing the
current year from the copyright notice, so that we don't need to bump
it every year.

It seems like only the first year of publication is technically
relevant for copyright notices, and even that seems to be something
that many companies stopped listing altogether (in a version controlled
codebase, the commits are a much better source of date of publication
than a hardcoded copyright statement).

We also now list Godot Engine contributors first as we're collectively
the current maintainers of the project, and we clarify that the
"exclusive" copyright of the co-founders covers the timespan before
opensourcing (their further contributions are included as part of Godot
Engine contributors).

Also fixed "cf." Frenchism - it's meant as "refer to / see".

Backported from #70885.
2023-01-10 15:26:54 +01:00
smix8
881e49c375 Fix TileMaps with origin offset placing NavPolygons wrong without a Navigation2D node
The legacy navigation was positioning baked TileMap navpolygons relative to the current Navigation2D node assuming that it is usually one of the parent nodes.

Without the deprecated Navigation2D node the default navigation map of the world_2d is used. This navigation map has no relative Node2D so it needs to use the global_transform of the TileMap to place navregions with the correct offset in case the TileMap is moved from the origin.
2022-09-22 17:14:51 +02:00
smix8
30d4555c65 Fix TileMap error msg when optional navigation node is not set
Fixes TileMap error msg spam when bake_navigation=true but the optional and depr navigation node is not set.
2022-08-06 21:58:47 +02:00
smix8
8bd7c6188b [3.5] Update NavigationServer backport
Backports features and bugfixes from current Godot 4.0 to 3.5 and brings functions and codebase of both version largely in sync to make tutorials more compatible and future backports easier.
2022-06-14 05:55:14 +02:00
smix8
3aa05b7b67 [3.5] Fix TileMap texture offset for navigationmesh and collisionshapes
[3.5] Fix TileMap texture offset for navigationmesh and collisionshapes
2022-06-08 19:30:52 +02:00
Rémi Verschelde
2834332591 TileMap: Use const ref for all Vector2 parameters 2022-04-30 14:05:57 +02:00
Haoyu Qiu
5c039ccc72 Free region RID when cleaning NavPoly in TileMap 2022-04-08 19:19:09 +08:00
Rémi Verschelde
a627cdafc5
Update copyright statements to 2022
Happy new year to the wonderful Godot community!
2022-01-13 15:54:13 +01:00
Wilson E. Alvarez
4106f95f30
Expose autotile_coord parameter in TileMap.set_cellv 2022-01-05 21:24:35 -05:00
Jake Young
09bc9eb101
Backport NavigationServer with RVO2 to 3.x
Change the entire navigation system.
Remove editor prefix from nav mesh generator class. It is now used for baking
at runtime as well.
Navigation supports obstacle avoidance now with the RVO2 library.
Nav system will also automatically link all nav meshes together to form one
overall complete nav map.
2022-01-05 16:00:56 +01:00
Cory Petkovsek
3d20218dae Clears RIDs wherever they are freed by VisualServer or PhysicsServer and possibly reused. Fixes #53374 2021-12-10 02:31:30 +08:00
lawnjelly
3d981b8265 Add option to use handles to RID
Adds an option to compile an alternative implementation for RIDs, which allows checks for erroneous usage patterns as well as providing leak tests.
2021-12-06 14:43:34 +00:00
robfram
cf9220b7d5 Only visible TileMaps should add light occluders 2021-10-30 23:15:07 +02:00
kleonc
2eeed26d67 TileMap Fix trying to get data for tile not existing in attached TileSet 2021-08-06 18:52:04 +02:00
Haoyu Qiu
eb31a39e82
Add check to internal methods to prevent crash
(cherry picked from commit 448295cd51)
2021-07-27 12:17:14 +02:00
Rafał Mikrut
cb5faca39a
Prevent setting too big or too small Collision Mask and Layer 2021-06-27 17:40:07 +02:00
PouleyKetchoupp
114da550ec Fix logic for showing tilemap debug collision
In editor: only when show_collision property is enabled
In game: only when 'Visible collision shapes' is enabled
2021-05-25 11:49:47 -07:00
kleonc
1184013fcf
TileMap::world_to_map Ensure half offset is added according to the returned value
Decide whether half offset should be added based on the value used for calculating the return value of this method.

(cherry picked from commit f1420c7cbf)
2021-05-09 17:15:44 +02:00
Rémi Verschelde
140350d767
Style: Enforce braces around if blocks and loops
Using clang-tidy's `readability-braces-around-statements`.
https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
2021-05-05 15:02:01 +02:00
Rémi Verschelde
a828398655
Style: Replaces uses of 0/NULL by nullptr (C++11)
Using clang-tidy's `modernize-use-nullptr`.
https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-nullptr.html
2021-05-04 16:30:23 +02:00
Rémi Verschelde
b5e1e05ef2
Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2021-05-04 14:45:16 +02:00
Rémi Verschelde
3d15f04668
Style: clang-format: Disable AllowShortIfStatementsOnASingleLine 2021-05-04 14:45:15 +02:00
janglee
7b6cc3e687 Added show_collision property.
If true, collision shapes are shown in the editor and at run-time.
Requires Visible Collision Shapes to be enabled in the Debug menu,
for collision shapes to be visible at run-time.
2021-03-05 01:21:40 +05:30
Rémi Verschelde
49646383f1
Update copyright statements to 2021
Happy new year to the wonderful Godot community!

2020 has been a tough year for most of us personally, but a good year for
Godot development nonetheless with a huge amount of work done towards Godot
4.0 and great improvements backported to the long-lived 3.2 branch.

We've had close to 400 contributors to engine code this year, authoring near
7,000 commit! (And that's only for the `master` branch and for the engine code,
there's a lot more when counting docs, demos and other first-party repos.)

Here's to a great year 2021 for all Godot users 🎆

(cherry picked from commit b5334d14f7)
2021-01-13 16:17:06 +01:00
Rafał Mikrut
927010e90f
Do not iterate over map when removing its values
(cherry picked from commit 29b2882381)
2021-01-05 20:49:00 +01:00
Thomas Riedmair
7e669123f9 Fix performance issue in update_bitmask_region fallback
(cherry picked from commit e0f084b924)
2020-05-04 16:10:22 +02:00
Gilles Roudière
b5251eb00f Don't compile editor-only function when tools=no 2020-01-09 22:15:48 +01:00
Rémi Verschelde
a7f49ac9a1 Update copyright statements to 2020
Happy new year to the wonderful Godot community!

We're starting a new decade with a well-established, non-profit, free
and open source game engine, and tons of further improvements in the
pipeline from hundreds of contributors.

Godot will keep getting better, and we're looking forward to all the
games that the community will keep developing and releasing with it.
2020-01-01 11:16:22 +01:00
Rafał Mikrut
99d8626f4a Fix some overflows and unitialized variables 2019-11-20 16:22:16 +01:00
qarmin
bb685147f9 Fix crash in TileMap::update_cell_bitmask 2019-10-08 15:46:38 +02:00
qarmin
f435a6f0b6 Fix crash in TileMap::fix_invalid_tiles 2019-10-05 11:37:38 +02:00
bob
943471dd02 Fix TileMap world_to_map rounding issue for negative integers
The previous code would fail for negative integer values like -3.0
(would return -4 instead of -3).

Fixes #31468.
2019-09-26 08:47:24 +02:00
qarmin
17732fe698 Added some obvious errors explanations 2019-09-25 10:28:50 +02:00
Bhupendra Aole
0b5a600564 Initialize TileMap Custom Transform
Initialize TileMap Custom Transform to same as Cell Size (64).
Fixes #30948.
2019-09-01 19:33:45 -04:00
Bojidar Marinov
141ee27dad
Fix corrupted TileMap saves due to missing/wrong format
Fixes #29312
2019-08-08 09:30:55 +03:00
Hugo Locurcio
ff7184c5cb
Improve the node configuration warning display
- Refer to properties explicitly when possible
- When multiple warnings are returned, always separate them by one
  blank line to make them easier to distinguish
- Improve grammar and formatting
2019-07-09 00:18:00 +02:00
Bojidar Marinov
ebf2a4d553
Fix some issue with TileMap's and other nodes' boundaries
Fixes #30348
Addresses a small part of #30012
2019-07-08 12:35:52 +03:00
Ibrahn Sahir
4e4697b1c4 Added release function to PoolVector::Access.
For clarity, assign-to-release idiom for PoolVector::Read/Write
replaced with a function call.
Existing uses replaced (or removed if already handled by scope)
2019-07-06 12:04:27 +01:00
Ranoller
14e2a99129 Tilemap fix displaced textures and shapes and added center texture and compatibility mode
This commit fix #22989 #15249 #28206. Main problem is that tilemap displace textures in different tile origins in a strange way and doesn´t respect coincidence between texture and shapes in not uniform tiles. This issue is present in godot 3.0 and godot 3.1. To maintain compatibility are added a compatibility mode and a center texture option. Other related issues and pull request: #28896 #29487 #29519 #29961. Idications of #30204 are added
2019-07-02 17:12:58 +02:00
Rémi Verschelde
850a54a2a5 Fix uninitialized variables in Line2D, JSONParseResult and TileMap 2019-06-30 13:58:07 +02:00
Bojidar Marinov
583f7adb51
Allow ColisionObject2D to get shapes from tilemaps
Fixes #4454 and likely resolves #22285
2019-06-27 21:16:54 +03:00
Ranoller
f26e9daab5 Make tilemap texture origin point top-left.
Fix https://github.com/godotengine/godot/issues/29487. In this commit: https://github.com/godotengine/godot/pull/28896 bad offset of textures and shapes was fixed, but a center of texture was added too, and this seems not dessired by default because breaks too much compatibility with demos and user projects. A future Check box for center texture can be added
2019-06-05 23:23:36 +02:00
Rémi Verschelde
4b399034aa
Merge pull request #24560 from guilhermefelipecgs/fix_24549
Add EDITMODE_PRIORITY for ATLAS_TILE
2019-06-01 09:49:18 +02:00
Rémi Verschelde
84331549db
Merge pull request #28896 from Ranoller/master
Fix tilemap displaced textures and shapes
2019-05-28 22:25:18 +02:00
Rémi Verschelde
e0574e1d98 Fix typos with codespell
Using codespell 1.15.0.

Method:
```
$ cat > ../godot-word-whitelist.txt << EOF
ang
curvelinear
doubleclick
leapyear
lod
merchantibility
nd
numer
ois
ony
que
seeked
synching
te
uint
unselect
webp
EOF

$ codespell -w -q 3 -I ../godot-word-whitelist.txt --skip="./thirdparty,*.po"
$ git diff // undo unwanted changes
```
2019-05-19 13:10:35 +02:00
Ranoller
7a8e4f64b8 Fix tilemap displaced textures and shapes with origin point BOTTOM_LEFT and CENTER and other casuistry
This commit fix https://github.com/godotengine/godot/issues/22989 fixing displaced textures and not coincident shapes in tilemap. Fix too: https://github.com/godotengine/godot/issues/15249, https://github.com/godotengine/godot/issues/28206, https://github.com/godotengine/godot/issues/28610 and probably others
2019-05-15 04:14:27 +02:00
Rémi Verschelde
ac0369e9ff
Merge pull request #27845 from samdze/master
Make TileMap overridable "set_cell" function called on undo/redo
2019-04-30 10:55:53 +02:00
Samuele Zolfanelli
e2dd0c101e Make TileMap overridable "set_cell" function called on undo/redo 2019-04-27 17:20:32 +02:00
Rémi Verschelde
c8994b56f9 Style: Apply new changes from clang-format 8.0
It seems to stay compatible with formatting done by clang-format 6.0 and 7.0,
so contributors can keep using those versions for now (they will not undo those
changes).
2019-04-09 17:09:48 +02:00
Mariano Javier Suligoy
bfc3ba5af0
Merge pull request #27365 from Byteron/tile_map_negative_offset
TileMap, negative Y and X Offset
2019-04-05 09:24:32 -03:00