Commit Graph

5784 Commits

Author SHA1 Message Date
volzhs ddd01332ef Fix crash when change project settings 2017-04-03 17:49:02 +09:00
Rémi Verschelde e3d6d863af Merge pull request #8170 from RandomShaper/fix-uniform-move-2.1
Include uniform (Shift down) mode in only-one-Node2D dragging (2.1)
2017-03-27 08:57:05 +02:00
Rémi Verschelde b3d1113ae3 Merge pull request #8152 from Hinsbart/input_id_2.1
[2.1] Better handling of joypad device IDs.
2017-03-27 08:51:15 +02:00
Rémi Verschelde 93107f4245 Merge pull request #8141 from elasota/fix-unshaded-spillover
Fix renderer sometimes not applying "unshaded" flag (2.1)
2017-03-27 08:47:15 +02:00
Pedro J. Estébanez 3bdb29b077 Include uniform (Shift down) mode in only-one-Node2D dragging 2017-03-27 01:32:16 +02:00
Rémi Verschelde 62d8f96720 Remove redundant subfolder in iOS template
(cherry picked from commit 1a0d1bb18d)
2017-03-26 22:04:29 +02:00
Rémi Verschelde d3e6f58c25 Merge pull request #8142 from akien-mga/2.1-warnings-option
SCons: Add option to toggle warnings (on by default)
2017-03-26 21:54:30 +02:00
Andreas Haas 8c06da0d49
Better handling of joypad device IDs.
Now InputDefault is responsible for giving out joypad device IDs to the platform, instead of each platform handling this itself.
This makes it possible for c++ modules to add their own "custom" gamepad devices, without the risk of messing up events in case the user also has regular gamepads attached (using the OS code).
For now, it's implemented for the main desktop platforms.
Possible targets for future work: android, uwp, javascript
2017-03-26 00:12:11 +01:00
Rémi Verschelde 31107daa1a SCons: Add option to toggle warnings (on by default)
All the warnings are factored out of the platform-specific files and moved to
SConstruct. Will have to check that it does not introduce regressions on some
platforms/compilers.
2017-03-25 09:24:29 +01:00
elasota 5d691350c4 Fixed "unshaded" flag not being updated if light_type and receive_shadows_state didn't change. 2017-03-24 20:27:06 -04:00
Andreas Haas ed3134088b Input: Update mouse position on mouse-button events.
(cherry picked from commit 468719c480)
2017-03-24 23:19:49 +01: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 0c650c2511 Make inline blocks in GDScript more pythonic
Fixes #8001

(cherry picked from commit 18ab88b3f1)
2017-03-24 23:19:14 +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 8f5b15754c Merge pull request #8114 from RandomShaper/improve-snapping-2.1
Improved 2D snapping behavior (2.1)
2017-03-24 22:51:09 +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
Rémi Verschelde 2c95976ef7 Merge pull request #8099 from RandomShaper/close-output-2.1
Add editor option for automatically closing the output when stopping the game (2.1)
2017-03-24 22:50:02 +01:00
Rémi Verschelde 492f6e06c0 Merge pull request #8088 from BastiaanOlij/android_gravity_2.1
Android gravity vector Godot 2.1
2017-03-24 22:49:23 +01:00
Rémi Verschelde 15b6eadba7 i18n: Sync templates and translations with current code 2017-03-24 22:27:22 +01:00
Rémi Verschelde d2e8a21cb1 i18n: Adapt script to tools/editor -> editor move 2017-03-24 22:24:56 +01:00
Pedro J. Estébanez adf36faee8 Improved 2D snapping behavior
Make snapping affect nodes created by drag & drop
Make snapping for a single Node2D refer to its pivot
Refactor duplicate drag setup code
2017-03-24 21:27:37 +01:00
Rémi Verschelde a531051a61 Only assume HiDPI mode if DPI >= 192 and width > 2000
Also use single-dock column if width < 1200.

Manually adapted from bfe67a3b87
and c103f32ea3.

Fixes #6096.
2017-03-24 18:26:56 +01:00
Rémi Verschelde fd17d301d0 Merge pull request #8100 from BastiaanOlij/ios_magnetometer_2.1
Fixing magnetometer on iOS
2017-03-23 09:57:29 +01:00
Rémi Verschelde aaf4e3ab9f Merge pull request #8108 from Faless/2.1-v6fix-cherry
Cherry pick #7510 and #7581 to 2.1
2017-03-23 08:29:08 +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 15ecdb5f00 Fix buffer size check in UDP socket.
We were reserving 12 bytes from the buffer for ip, port, and length, but since
IPv6 introduction we should be reserving 24 (IPv6 are 16 bytes)

(cherry picked from commit 5dc7c920bf)
2017-03-22 21:11:49 +01:00
Fabio Alessandrelli 994df5df5c Use default UDP ring buffer size of 65536 for clients
We should probably create a specific function for setting the
recv buffer anyway. UDP sockets does not need to bind (listen)
to be able to call recvfrom. This is especially useful for clients
who just call set_send_address and start communicating with a server.

(cherry picked from commit 9336857132)
2017-03-22 21:07:27 +01:00
Fabio Alessandrelli 7dbccc9a57 Fix bug causing UDP socket to close after the first send if not listening
The ring buffer for receiving packets was not resized in constructor

(cherry picked from commit 68dc969f8c)
2017-03-22 21:05:27 +01:00
Fabio Alessandrelli cab9ad7657 Update docs reference for TCP_Server::listen and UDPPacketPeer::listen
(cherry picked from commit e5e4e7b6a9)
2017-03-22 21:05:02 +01:00
Fabio Alessandrelli 9f41c0a356 Avoid deadlock when writing/reading data on a connecting TCP socket
TCP status polling is always performed as non blocking.
Trying to put a packet on a connecting socket will fail immediately.

(cherry picked from commit fa0cb7da0e)
2017-03-22 21:03:26 +01:00
Fabio Alessandrelli 86de0bd081 Bind to IPv4 on OpenBSD when using wildcard
OpenBSD does not support binding on both IPv4 and IPv6 using the same socket

(cherry picked from commit 619e7a2c8b)
2017-03-22 21:01:14 +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
Fabio Alessandrelli aeffe74a27 Avoid calling close when polling a UDP peer without socket
(cherry picked from commit e4b9b37ccf)
2017-03-22 20:01:13 +01:00
Fabio Alessandrelli ccf37c4ca2 TCP connect always opens correct socket type
TCP client connections does not need to rely on ipv6 dual stack sockets

(cherry picked from commit 55b4f3686d)
2017-03-22 15:40:31 +01:00
BastiaanOlij 4b7d1d8c15 Fixing magnetometer on iOS 2017-03-21 23:50:53 +11:00
Pedro J. Estébanez e1d18e6481 Add editor option for automatically closing the output when stopping the game
(back-ported from 1bd1af776c)
2017-03-21 12:47:05 +01:00
BastiaanOlij cc6810c030 Android gravity vector Godot 2.1 2017-03-21 22:45:24 +11:00
Rémi Verschelde a14ad02d15 Merge pull request #8094 from RandomShaper/fix-yield-crash-2.1
Fix random crashes when using yield() (2.1)
2017-03-21 11:07:34 +01:00
Pedro J. Estébanez 48da11372e Fix random crashes when using yield() 2017-03-21 02:54:46 +01:00
Rémi Verschelde 9c75b9dddf Merge pull request #8091 from RandomShaper/fix-particles-2d-2.1
Fix Particles2D process mode back-compat issue (2.1)
2017-03-20 19:49:58 +01:00
Pedro J. Estébanez 98ba3db502 Fix Particles2D process mode back-compat issue 2017-03-20 19:47:25 +01:00
Rémi Verschelde ea987256f6 Revert "Fix drag and drop on 2d viewport"
This reverts commits a9d8da91b7
and 4230b22558.
2017-03-20 16:57:29 +01:00
Rémi Verschelde 51c5a12f43 Travis: Run clang-format static check
Commits or PRs that do not respect the clang-format style that we
enforce will fail the test.

Adding ubuntu-toolchain-r-test as its libstdc++ is necessary to install
libllvm-3.9.

(cherry picked from commit 6aee289b3e)
2017-03-19 16:14:53 +01:00
Rémi Verschelde 3251e93cee Fix linking order for builtin freetype
Before this change the libfreetype_builtin.a lib would be appended
at the very end of the linking flags, after system libs such as -lX11
or -lkernel32.

(cherry picked from commit 26c6c2b01a)
2017-03-19 16:14:47 +01:00
Rémi Verschelde 4230b22558 Fix cherry-pick mistake using 3.0 method
Bug introduced in a9d8da91b7.
2017-03-19 10:01:53 +01:00
Rémi Verschelde f4f0a6c609 Merge pull request #8073 from Hinsbart/bind_parse_ev
Input: bind parse_input_event() [2.1]
2017-03-19 10:00:00 +01:00