Commit graph

792 commits

Author SHA1 Message Date
Andreas Haas a46dcfe12f Core: fix possible memory leaks.
(cherry picked from commit a2734df7ed)
2017-05-26 17:38:05 +02:00
Pedro J. Estébanez fa4b09f63d Make MessageQueue::flush() reentrant 2017-05-18 13:01:12 +02:00
Rémi Verschelde aa046a85dc Merge pull request #8740 from pixelpicosean/scrollingWithFactor
Implemented scrolling factor for precision trackpads for 2.1
2017-05-15 07:57:05 +02:00
Sean Bohan ee670f3724 Implemented scrolling factor for smooth trackpad scrolling
Working platforms platform: OSX, Windows.
Support for almost all ui elements, including project list.

Ported from 304a1f5b5a (#7864).
Fixes #492 and #3913.
2017-05-15 06:44:00 +08:00
Fabio Alessandrelli 3044d0aed3 Compression::compress properly returns compressed size
selective pick from cbbcf72703
2017-05-12 20:01:53 +02:00
Fabio Alessandrelli 5521325068 Better explain out of memory error in message queue
Also effectively saves one unnecessary call when everything is fine.

(cherry picked from commit 1a7aafa90d)
2017-05-12 20:01:53 +02:00
Fabio Alessandrelli bd26eacc59 Allow non blocking UDP put_packet in C++.
- Add blocking mode option to PacketPeerUDP.
- put_packet returns ERR_UNAVAILABLE when operation would block.
- ENet module uses non-blocking UDP.

(cherry picked from commit 5f681d0b0f)
2017-05-12 20:01:53 +02:00
Pedro J. Estébanez 0469782d3c Fix infinite loop in DirAccessPack::get_current_dir() 2017-05-04 02:18:39 +02:00
volzhs cfa943a0eb Fix wrong fallback for locale 2017-04-26 04:45:52 +09:00
Rémi Verschelde 3b687c5474 Move VERSION_MKSTRING logic to version.h
Fixes a bug where the VERSION_PATCH define is not yet in scope if
typedefs.h is included before version.h at compilation time.
2017-04-10 23:08:28 +02:00
Rémi Verschelde e9b045d9e5 Add "Godot Engine contributors" copyright line 2017-04-08 00:45:24 +02:00
Fabian Mathews 1a1e25bfca Added ability to change A-star cost function
(cherry picked from commit b541402417)
2017-04-05 08:18:38 +02:00
Ferenc Arn f263274a25 Use atan2 rather than acos in Vector3.angle_to.
Fixes #8111.

(cherry picked from commit 3730e0533c)
2017-03-24 23:19:30 +01:00
Bojidar Marinov 0afb9b579f Suppress error messages when using ConfigFile::get_value and a default is given
Fixes #8097

(cherry picked from commit 927d15b815)
2017-03-24 23:17:08 +01:00
Rémi Verschelde a9d63bcf6f Merge pull request #8107 from RandomShaper/warped-panning-2.1
Implement warped mouse panning for 2D & 3D editors (2.1)
2017-03-24 22:50:34 +01:00
Pedro J. Estébanez 2c2c48ffb3 Implement warped mouse panning for 2D & 3D editors
Enabled by default as in Blender, but can be disabled separately for 2D & 3D;
the core functionality is in Input so this could be reused or even exposed to scripts in the future
2017-03-22 21:18:47 +01:00
Fabio Alessandrelli d9525082fe Remove set_ip_type from network classes (no longer needed)
- TCP:
  - `listen` bind to wildcard "*" -> dual stack socket
  - `listen` bind to address -> socket from address type
  - `connect` -> resolve using best protocol (UNSPEC), socket from address type

- UDP:
  - `listen` bind to wildcard "*" -> dual stack socket
  - `listen` bind to address -> socket from address type
  - `put_packet`/`put_var` -> resolve using TYPE_ANY (UNSPEC), socket from address type
    (to change socket type you must first call `close` it)

(cherry picked from commit 88a56ba783)
2017-03-22 21:00:23 +01:00
Fabio Alessandrelli 0b9684a085 Implement UDP listen bind address
(cherry picked from commit 2fe4ef6699)
2017-03-22 20:25:56 +01:00
Fabio Alessandrelli 43d992fc34 Implement TCP Server bind address
(cherry picked from commit b2839343ca)
2017-03-22 20:25:52 +01:00
Fabio Alessandrelli 90a747a52d IP_Address can now be a wildcard (not a valid IP, used for binding)
(cherry picked from commit 4198291cd4)
2017-03-22 20:01:41 +01:00
Fabio Alessandrelli 603105df18 Convert validity checks of IP_Address to is_valid method.
(cherry picked from commit 98a7e2b4e0)
2017-03-22 20:01:41 +01:00
Andreas Haas 2f1a0448a7
Input: bind parse_input_event()
When using get_tree().input_event(ev), the engine will JUST send the event down the SceneTree.
However, you won't get any of the benefits of the Input singleton:
- No InputMap actions will be emitted
- The internal input state won't be modified, so methods like `Input.get_mouse_pos()` or `Input.is_joy_button_pressed` won't return the expected output after sending the event.

This is fixed by using `Input.parse_input_event(ev)` instead.
I guess we'll also have to update the docs to reflect that this is the preferred method of sending custom InputEvents.
2017-03-19 08:33:07 +01: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 1d418afe86 Prevent cyclical dependency issue after clang-format includes reorder 2017-03-19 00:33:35 +01:00
Rémi Verschelde d4e0be7632 Add missing map.h include in color defs
(cherry picked from commit 5e13a762ec)
2017-03-19 00:32:58 +01:00
Rémi Verschelde 16b78da941 Style: Various fixes to play nice with clang-format
(cherry picked from commit 2a0ddc1e89)
2017-03-18 23:13:47 +01:00
Rémi Verschelde dbf0137576 Style: Fix statements ending with ';;'
(cherry picked from commit f44ee891be)
2017-03-18 21:14:33 +01:00
Rémi Verschelde 75bf6a9978 Style: Keep long lines for now
clang-format does not play well with tab-aligned multiline statements...
Some more research will be needed if we want to set a column limit.

(cherry picked from commit e2a3f06f3d)
2017-03-18 21:06:07 +01:00
Rémi Verschelde 4bfecab813 Style: No break before list brace
clang-format does not handle that well *at all*.

For the reference, found the relevant pieces of code with:
`ag "=[ "$'\t'"]?"$'\n'"[ "$'\t'"]?{" --ignore=thirdparty`

(cherry picked from commit 40323407df)
2017-03-18 21:05:58 +01:00
Andreas Haas 8015ab0db3 Add ClassDB binding for File.get_modified_time
Closes #7613

(cherry picked from commit 5ec0610c60)
2017-03-18 19:46:36 +01:00
Pedro J. Estébanez 6289997724 Fix ambiguity in StringName (null data vs. data with empty string) 2017-03-15 04:26:23 +01:00
BastiaanOlij 8436a34305 Core motion for Godot 2.x (based on PR 7127) 2017-03-09 21:46:38 +11:00
Rémi Verschelde cc265d5506 Merge pull request #7910 from RandomShaper/single-field-prop-edit-2.1
Implement single-field property change for multinode edit (2.1)
2017-03-05 13:43:35 +01:00
Pedro J. Estébanez e0170625ef Expose uncapped versions of closest-point-to-segment utilities 2017-03-04 22:57:53 +01:00
Pedro J. Estébanez 25aedb896a Expose Geometry::get_closest_point_to_segment_2d() 2017-03-04 01:49:16 +01:00
Pedro J. Estébanez e46e12906a Implement single-field property change for multinode edit 2017-03-02 10:48:24 +01:00
Juan Linietsky d5c2a6b76b Godot 2.1 to 3.0 conversion should be more or less final 2017-02-15 08:29:11 -03:00
Juan Linietsky ebb7d2cdb7 -WIP Exporter to Godot 3.0, only text scenes (no .scn) and still kind of buggy 2017-02-12 23:13:14 -03:00
Rémi Verschelde 6abe141579 Merge pull request #7756 from volzhs/str-format
Fix zero padding formatting
2017-02-12 23:20:13 +01:00
Rémi Verschelde 11b95cda45 Merge pull request #7750 from Faless/2.1.x_fix_7697
HTTPClient properly handle partial data in non-blocking mode
2017-02-12 23:19:10 +01:00
Rémi Verschelde 331ff9db77 Merge pull request #7742 from karroffel/json_parsing
JSON::parse reports errors on open-ended objects
2017-02-12 23:17:11 +01:00
Nuno Donato 7496b2f862 Added "Scots" locale name, fixing #7630
(cherry picked from commit 6b5c595e40)
2017-02-08 16:18:59 +01:00
volzhs 7ebb356a31 Fix zero padding formatting 2017-02-08 10:40:35 +09:00
Fabio Alessandrelli 1f08d17a98 HTTPClient properly handle partial data in non-blocking mode
Use block to send DVector::Write out of scope in
HTTPClient::read_response_body_chunk()

(cherry picked from commit 833994b294)
2017-02-07 11:05:14 +01:00
Karroffel 85793ccc4a JSON::parse reports errors on open-ended objects 2017-02-06 19:22:42 +00:00
Pedro J. Estébanez 888f8b31e7 Improve .tscn VCS
Serialize dictionaries adding newlines between key-value pairs
Serialize group lists also with newlines in between
Serialize string properties escaping only " and \ (needed for a good diff experience with built-in scripts and shaders)

Bonus:
Make AnimationPlayer serialize its blend times always sorted so their order is predictable in the .tscn file.

This PR is back-compat; won't break the load of existing files.

Cherry-picked from 7dbb1c0571
2017-01-25 20:11:10 +01:00
Rémi Verschelde 349e62835b i18n: Add support for Scots (sco) language
Fixes #6931.

(cherry picked from commit ede36aca8d)
2017-01-12 19:15:30 +01:00
karroffel b1fc41a301 exposed OS.set_exit_code and OS.get_exit_code to ObjectTypeDB
(cherry picked from commit fbfcc981d9)
2017-01-12 19:15:30 +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
Fabio Alessandrelli 6940830627 Properly localize absolute path.
Calling localize_path will return a localized path in res:// if the
path starts with the resource file-system/folder, and will return
the unchanged absolute path otherwise.

Closes #6979 and #7161.

(cherry picked from commit cdc97ca453)
2017-01-12 19:15:28 +01:00