Commit graph

96 commits

Author SHA1 Message Date
Rémi Verschelde b97401f304 Update copyright statements to 2020
And apply clang-format 10 to the codebase.
2020-08-13 22:58:13 +02:00
Rémi Verschelde 7562ce053a Update copyright statements to 2019 2019-06-04 11:41:49 +02:00
Juan Linietsky 531fb3b8e6 Remove node from list before calling queries, fixes #10886
(cherry picked from commit 4deac219b0)

Fixes #17793.
2018-09-18 13:04:50 +02:00
Rémi Verschelde 2712014744 Update copyright statements to 2018
Happy new year to the wonderful Godot community!
2018-01-02 11:27:24 +01:00
Xavier Sellier 487773ed24 Remove funny output during when exporting a project or loading Godot Engine 2017-12-11 11:13:04 -05:00
Rémi Verschelde 6a4e7198c5 Style: apply clang-format (5.0.0) to current source 2017-12-11 15:31:49 +01:00
Pedro J. Estébanez cc98dbff04 Remove joint freeing logic from physics servers
Since joint resources are created by joint nodes and also they take care of freeing them, the physics server doesn't need to free bodies' joints explicitly.

The logic for clearing the constraints map/set is still relevant as there may be collision pairs and in their case its the server itself the one creating them and therefore releasing them.

(cherry picked from commit fbeb27b01d)
2017-09-09 21:47:20 +02:00
Rémi Verschelde 9d598833d2 Use HTTPS URL for Godot's website in the headers 2017-08-27 14:11:45 +02:00
Pedro J. Estébanez a30dd8494c Fix initial collision pairs being cleared
This affected both 2D & 3D physics and was a regression introduced by my
physics mega-fix (#8999).
2017-07-05 19:38:11 +02:00
Rémi Verschelde 5e7fb570e8 Merge pull request #8714 from RandomShaper/fix-owc-2.1
Fix one-way collision detection (2.1)
2017-06-25 11:14:31 +02:00
Pedro J. Estébanez 3e5e8b6c9e Fix multiple issues with 2D & 3D physics
- Use `NOTIFICATION_ENTER`/`EXIT_WORLD` for `Area` (intead of `*_TREE`).
- Now both bodies' and areas' constraints are cleaned up.
- And now also that happens as soon as the space is set to null (i.e., when exiting the tree) instead of only at freeing time.
- When clearing constraints, the loop goes on to the next if the current is already released, instead of breaking.
- When one has been already released, no error is shown from now on, as it's something expected, since a pair (our kind of constraint of interest) can be freed by any of its involved collision objects and the other will try again.
- Implement index shifting (or marking as -1) for shapes indices in collision pairs shapes are removed.
- Standarize behavior of bodies and areas so that anything that invalidates a given pair gives the same result (collision mask, actual collision, etc); for instance, triggering area enter/exit signals.
- Add missing member initializations.
- Extend the new-space-equals-area/body-current-space test to every case.
- Fix 3D ray-casts early accepting Areas (skipping the mask check).
- Fix unpairing of large elements (2D's `BroadPhase2DHashGrid`).

Some of these prevent random crashes caused by constraints with dangling pointers to involved objects.
Fixes #8856.
Fixes #7589.
Fixes #6676.
And maybe others.
2017-06-19 12:02:50 +02:00
Pedro J. Estébanez 5e4216fd49 Fix one-way-collision detection
Also, change the explanation of the one-way collision direction in the docs to reflect how it is actually used by the engine and clear up the usage of the "max depth" property.
2017-05-11 02:45:48 +02:00
Rémi Verschelde e9b045d9e5 Add "Godot Engine contributors" copyright line 2017-04-08 00:45:24 +02:00
Rémi Verschelde f8db8a3faa Bring that Whole New World to the Old Continent too
Applies the clang-format style to the 2.1 branch as done for master in
5dbf1809c6.
2017-03-19 00:36:26 +01:00
Rémi Verschelde dbf0137576 Style: Fix statements ending with ';;'
(cherry picked from commit f44ee891be)
2017-03-18 21:14:33 +01:00
Pedro J. Estébanez 95a5d9e617 Fix KinematicBody2D wrong motion origin
Got part of the fix from 5fc084c28e
Added an engine setting to enable the fix (physics_2d/motion_fix_enabled) which is false by default so the default behavior is the same as always
Added motion methods with a from parameter, the same as 3.0 does
2017-03-06 05:10:15 +01:00
Rémi Verschelde d8223ffa75 Welcome in 2017, dear changelog reader!
That year should bring the long-awaited OpenGL ES 3.0 compatible renderer
with state-of-the-art rendering techniques tuned to work as low as middle
end handheld devices - without compromising with the possibilities given
for higher end desktop games of course. Great times ahead for the Godot
community and the gamers that will play our games!

(cherry picked from commit c7bc44d5ad)
2017-01-12 19:15:30 +01:00
Rémi Verschelde e259bf8bbb style: Fix PEP8 whitespace issues in Python files
Done with `autopep8 --select=E2,W2`, fixes:

- E201 - Remove extraneous whitespace.
- E202 - Remove extraneous whitespace.
- E203 - Remove extraneous whitespace.
- E211 - Remove extraneous whitespace.
- E221 - Fix extraneous whitespace around keywords.
- E222 - Fix extraneous whitespace around keywords.
- E223 - Fix extraneous whitespace around keywords.
- E224 - Remove extraneous whitespace around operator.
- E225 - Fix missing whitespace around operator.
- E226 - Fix missing whitespace around operator.
- E227 - Fix missing whitespace around operator.
- E228 - Fix missing whitespace around operator.
- E231 - Add missing whitespace.
- E231 - Fix various deprecated code (via lib2to3).
- E241 - Fix extraneous whitespace around keywords.
- E242 - Remove extraneous whitespace around operator.
- E251 - Remove whitespace around parameter '=' sign.
- E261 - Fix spacing after comment hash.
- E262 - Fix spacing after comment hash.
- E265 - Format block comments.
- E271 - Fix extraneous whitespace around keywords.
- E272 - Fix extraneous whitespace around keywords.
- E273 - Fix extraneous whitespace around keywords.
- E274 - Fix extraneous whitespace around keywords.
- W291 - Remove trailing whitespace.
- W293 - Remove trailing whitespace.
2016-11-02 22:28:28 +01:00
Rémi Verschelde 5a49e45d21 SCsub: Add python shebang as a hint for syntax highlighting
Also switch existing shebangs to "better" /usr/bin/env python.

(cherry picked from commit fc8ccd5b8c)
2016-10-30 14:51:34 +01:00
Fabio Alessandrelli 359b5f3b25 Expose more 2D/3D physics options in project settings
(cherry picked from commit 1d09c27ba4)
2016-10-09 17:33:47 +02:00
Victor Seiji Hariki a3c58999e2 Now ignoring remaining collision shapes.
(cherry picked from commit e5edd50d62)
2016-10-09 17:22:48 +02:00
anneomcl 12edde80f2 Fix for #6158. Converting Vector2 to Size2 for scaling functions.
(cherry picked from commit aa5ade834c)
2016-10-09 17:18:54 +02:00
Rémi Verschelde 3725114a16 Merge pull request #5383 from Ovnuniarchos/OptimizeOneWay
Optimized one-way collision loops.
2016-07-18 16:37:50 +02:00
Rémi Verschelde f40f360a2c Remove unused variables (fourth pass) + dead code
Also fix a potential regression from 3fcb9b1ec1.
2016-07-08 16:47:55 +02:00
Ovnuniarchos b09b449615 Optimized one way collision loops. 2016-06-24 08:43:23 +02:00
Juan Linietsky 4b05181397 Fixed a stupid bug with segment-segment collision in SAT physics, closes #4801 , closes #4984 2016-06-18 18:32:10 -03:00
Juan Linietsky b4b80625d1 Change hash grid in 2D physics to contemplate large objects as separate cases, to avoid huge memory and performance penalty. Fixes #4662 2016-06-18 17:21:53 -03:00
Rémi Verschelde 80727b6896 Drop empty .cpp files for header-only classes
Part of #5272
2016-06-18 20:00:08 +02:00
Rémi Verschelde a7fc04626a Add missing license headers in our source files (#5255)
Also removes a couple wrong Godot headers from third-party source files.
2016-06-18 14:46:12 +02:00
Juan Linietsky a75f896338 First version of Profiler
It is now possible to profile GDScript as well as some parts of Godot
internals.
2016-05-21 21:18:16 -03:00
Josh Grams a7b4127481 RigidBody2D (add_force, set_inertia): new methods. 2016-04-26 08:15:15 -04:00
Josh Grams ffaced87a6 RigidBody2D: rename apply_impulse(pos) to offset. 2016-04-24 04:36:51 -04:00
Josh Grams f7d31cec38 RigidBody2D: add and bind get_inertia() method.
You can't set this value very well, since it's automatically computed
from the mass and the collision shapes. But since the values are higher
than many people might suspect, so being able to read it helps estimate
the amount of torque you might need to apply.
2016-04-20 20:49:37 -04:00
Marc Gilleron d239e6bc0e Fixed #4163 (intersect_shape crashes on results limit) 2016-04-12 02:18:41 +02:00
Rémi Verschelde b5f873c9d1 Merge pull request #3999 from neikeq/issues_3650_3990
Fix crash when resizing ConcavePolygonShape2D segments
2016-03-10 06:29:20 +01:00
Ignacio Etcheverry 3fc16d4025 Fix crash when resizing ConcavePolygonShape2D segments 2016-03-09 19:52:15 +01:00
Hubert Jarosz 4a4f247914
remove trailing whitespace 2016-03-09 00:00:52 +01:00
Biliogadafr e8c5b41dd8 Physics2D: Allow to use 'intersect_point' with objects which is not 'pickable' 2016-02-01 04:30:16 +03:00
Juan Linietsky d01f55a78e Merge pull request #2698 from Faless/add_area_fix
Fix bug in Body(2D)SW::add_area
2016-01-23 23:07:23 -03:00
Juan Linietsky 0e71d49ef4 -Fix crash at exit due to unnecesary check in command queue, fixes #2034
-Fix memory corruption due to using wrong singleton in multithreaded physics, fixes #2760
2016-01-04 00:00:33 -03:00
Juan Linietsky 606729fa2d physics state properly returns contact metadata, closes #1979 2016-01-03 20:23:44 -03:00
Juan Linietsky 27c47e09a1 skip the first integration in physics bodies, fixes #2213 2016-01-02 13:28:18 -03:00
Juan Linietsky 0ed864d876 properly removing unprocessed objects from physics islands fixes one way platforms for rigidbodies, closes #2345 2016-01-01 12:13:17 -03:00
George Marques 5be9ff7b67 Update copyright to 2016 in headers 2016-01-01 11:50:53 -02:00
Juan Linietsky 1e65c3c701 remove error print in area collision, should be a valid situation, closes #2463 2015-12-31 11:15:49 -03:00
Ovnuniarchos 89efebbf56 New and corrected are override modes. 2015-12-14 02:56:49 +01:00
Ovnuniarchos 43b2c9c7a4 Areas now calculate their dampenings the same way as their gravity. 2015-12-08 18:45:14 +01:00
Fabio Alessandrelli 1231c795de Fix Body (and Body2D) add_area / remove_area when area have multiple shapes 2015-12-02 11:30:48 +01:00
Juan Linietsky d3eb9e8c54 -remove Vector2.atan2() replaced by Vector2.angle(), fixes #2260 2015-11-19 10:41:20 -03:00
Rémi Verschelde 399b1b0474 Cosmetic fixes to SCons buildsystem
- Removed trailing spaces
- Made sure all indentation is done using tabs (fixes #39)
- Potentially fixed an identation issue for openssl check
2015-11-01 20:53:26 +01:00