Commit Graph

2955 Commits

Author SHA1 Message Date
Rémi Verschelde baab976d0f
Merge pull request #10643 from BastiaanOlij/camera_server
CameraServer class
2019-06-16 10:22:26 +02:00
Rémi Verschelde 182b1fb9f1
Merge pull request #29797 from akien-mga/fix-warnings
Fix compilation warnings in JS and Windows builds
2019-06-15 22:52:35 +02:00
Rémi Verschelde 89ce9a6f46 Mono: Fix -Wduplicated-branches warning 2019-06-15 18:01:34 +02:00
Fabio Alessandrelli 5b2f098ed4 Expose WebSocket set_buffers and document it. 2019-06-15 17:21:08 +02:00
Fabio Alessandrelli ee90da4acb Allow setting websocket buffers sizes internally.
Needed by LSP.
2019-06-15 16:57:23 +02:00
Rémi Verschelde 68735d2a88 Fix compilation warnings in JS and Windows builds
Warnings raised by Emscripten 1.38.0 and MinGW64 5.0.4 / GCC 8.3.0.

JS can now build with `werror=yes warnings=extra`.
MinGW64 still has a few warnings to resolve with `warnings=extra`,
and only one with `warnings=all`.

Part of #29033 and #29801.
2019-06-15 14:40:45 +02:00
BastiaanOlij 02ea99129e Adding a new Camera Server implementation to Godot.
This is a new singleton where camera sources such as webcams or cameras on a mobile phone can register themselves with the Server.
Other parts of Godot can interact with this to obtain images from the camera as textures.
This work includes additions to the Visual Server to use this functionality to present the camera image in the background. This is specifically targetted at AR applications.
2019-06-15 21:30:32 +10:00
Rémi Verschelde 63b8c00d55
Merge pull request #29793 from Faless/enet/bind
Fix ENet incorrectly binding to wildcard.
2019-06-15 10:28:49 +02:00
Fabio Alessandrelli abe2c22966 Fix ENet incorrectly binding to wildcard.
Values were not properly initialized, and wildcard would evaluate to
true in most cases.
2019-06-15 05:59:50 +02:00
Rémi Verschelde 9a173e5814 doc: Fix formatting, typos and some descriptions in new docstrings 2019-06-15 00:11:41 +02:00
Rémi Verschelde 146c1612ed
Merge pull request #29755 from Faless/webrtc/multiplayer_server_pr
WebRTC Multiplayer peer, documentation
2019-06-14 15:01:51 +02:00
Fabio Alessandrelli c72b78a6eb Add documentation for WebRTC classes. 2019-06-14 10:35:00 +02:00
jfons 051ef5ead2 Take CSG into account for nav-mesh generation 2019-06-13 13:44:41 +02:00
Rémi Verschelde 082f398481
Merge pull request #28735 from aqnuep/dss_loader_fixes
Fixes to the DDS loader
2019-06-12 14:36:26 +02:00
Rémi Verschelde 971b5160c6
Merge pull request #29306 from qarmin/small_code_fixes
Small fixes to unrechable code, possibly overflows, using NULL pointers
2019-06-12 12:49:21 +02:00
Rémi Verschelde 4043c8a8c9
Merge pull request #29678 from akien-mga/err-macros-semicolon
Fix error macro calls not ending with semicolon
2019-06-11 19:01:26 +02:00
Rémi Verschelde c205f25e17
Merge pull request #29578 from mrcdk/export_layers_gdscript
Added export hint to 2D and 3D physics and render layers.
2019-06-11 15:09:01 +02:00
Rémi Verschelde 7842f4ca5c
Merge pull request #29262 from DarknessCatt/issue-27476
Automatically add new line to scripts
2019-06-11 15:07:09 +02:00
Rémi Verschelde 6d16f2f053 Fix error macro calls not ending with semicolon
It's not necessary, but the vast majority of calls of error macros
do have an ending semicolon, so it's best to be consistent.
Most WARN_DEPRECATED calls did *not* have a semicolon, but there's
no reason for them to be treated differently.
2019-06-11 14:49:34 +02:00
Rémi Verschelde 99acec63f1 bullet: Sync with current upstream master branch
This updates our local copy to commit 5ec8339b6fc491e3f09a34a4516e82787f053fcc.
We need a recent master commit for some new features that we use in Godot
(see #25543 and #28909).

To avoid warnings generated by Bullet headers included in our own module,
we include those headers with -isystem on GCC and Clang.

Fixes #29503.
2019-06-11 13:19:42 +02:00
Ignacio Roldán Etcheverry abbbde87e2
Merge pull request #29606 from neikeq/remove-unneeded-mono-patches
Remove obsolete mono patch for pthread_mutexattr_setprotocol
2019-06-08 21:14:15 +02:00
Ignacio Etcheverry 26f9d907d4 Remove obsolete mono patch for pthread_mutexattr_setprotocol
This has already been fixed in Mono both master and 2019-06 (no other branch other than the skipped 2019-04 branch uses pthread_mutexattr_setprotocol).
2019-06-08 17:00:02 +02:00
MrCdK 74d336d0f4 Added export hint to 2D and 3D physics and render layers. 2019-06-07 16:30:54 +02:00
Fabio Alessandrelli 61cd8ed441 Normalize WebRTCDataChannel properties. 2019-06-05 18:10:51 +02:00
Fabio Alessandrelli 0bccf96c73 Add WebRTCMultiplayer 2019-06-05 18:08:54 +02:00
Rémi Verschelde 1c950415b0
Merge pull request #29473 from neikeq/fix-envvars-mono
Mono: Fix SCons options added to the wrong environment
2019-06-04 22:31:58 +02:00
Ignacio Etcheverry ff0c863cb1 Mono: Fix SCons options added to the wrong environment 2019-06-04 16:15:00 +02:00
qarmin 8245db869f Small fixes to unrechable code, possibly overflows, using NULL pointers 2019-06-03 21:52:50 +02:00
Rémi Verschelde 8cc8383a7f
Merge pull request #29433 from bojidar-bg/29406-dictionary-constant
Properly catch certain errors in Dictionary and Array declarations
2019-06-03 20:53:02 +02:00
Ignacio Etcheverry 14df9e5cb2 Android build and export for the mono module 2019-06-03 17:09:24 +02:00
Bojidar Marinov b5bbedb45a
Properly catch certain errors in Dictionary declarations
Fixes #29406
2019-06-03 17:29:05 +03:00
Rémi Verschelde b9dc2e7e4d
Merge pull request #28099 from lupoDharkael/fix-completion
Fix code completion not working with class_name
2019-06-03 14:01:07 +02:00
geequlim eed5967c02 Fix GDSCript inner classes be freed after compile 2019-06-02 19:57:33 +08:00
Rémi Verschelde 3c4fab295b
Merge pull request #27789 from Giacom/move_towards
Added move_toward functions for float, Vector2 and Vector3
2019-06-01 12:05:18 +02:00
fhuya 2c3536810a Setup Godot to support the Oculus Mobile SDK. 2019-05-30 16:35:50 -07:00
Rémi Verschelde 24dd8e29ea
Merge pull request #29296 from jbuck3/cleanup
Remove some redundant lines
2019-05-30 12:52:23 +02:00
Matheus Lima Cunha 7fbb6d986f Automatically add new line to scripts 2019-05-29 18:13:29 -03:00
Goral aabd9980d1 Changing method signature in other class in not recognized in working class in typed GDScript #28685 2019-05-29 22:27:16 +02:00
James Buck 4f4513f99c Remove some redundant lines 2019-05-29 15:20:39 -05:00
Ignacio Roldán Etcheverry 8c923fc617
Merge pull request #29290 from ShyRed/godefquo
Escape quote char for non-Windows OS
2019-05-29 21:01:29 +02:00
ShyRed 5dc50327cf Escape quote char for non-Windows OS
Quote char appears to be ignored by ProcessStartInfo on non-Windows operating systems, so it needs to be escaped.
2019-05-29 19:13:16 +02:00
Rémi Verschelde 36591b1ae8
Merge pull request #28416 from JellyWX/binary-literals
Support for binary literals in GDScript
2019-05-29 08:41:05 +02:00
qarmin 66a36ba474 Fix some unincialised variables 2019-05-28 19:12:19 +02:00
Giacom c00427add3 Added move_toward functions for float, Vector2 and Vector3 2019-05-28 11:39:35 +01:00
Rémi Verschelde 633af46a66
Merge pull request #27987 from lupoDharkael/classname-duplicate
Prevent using multiple class_name in a class
2019-05-28 11:56:21 +02:00
Rémi Verschelde e3735a5d5a
Merge pull request #28606 from bojidar-bg/25889-indexed-set-defaults
Fix default values not being read correctly in VS, take two
2019-05-28 10:54:49 +02:00
Rémi Verschelde 1f72126ad0
Merge pull request #28762 from Lisapple/gridmap-release-floor-field
Release GridMap floor field focus when mouse exited
2019-05-28 10:35:55 +02:00
Rémi Verschelde 4686d9470e
Merge pull request #29185 from hilfazer/enum-autocomplete
Autocomplete for enum values
2019-05-28 10:21:27 +02:00
Rémi Verschelde 7487d2f852
Merge pull request #28957 from aaronfranke/basis-optimize
Optimize Basis constructor for Axis Angle
2019-05-27 17:42:43 +02:00
Rémi Verschelde 4c77332e32
Merge pull request #29118 from JFonS/improve_navmesh_generation
Various improvements to NavigationMesh generation
2019-05-27 17:27:14 +02:00
Ignacio Roldán Etcheverry df17cf06d4
Merge pull request #29184 from aaronfranke/mono-tan-xy-yx
[Mono] Change Atan2 arguments to (y, x)
2019-05-26 17:15:29 +02:00
Aaron Franke 19786f77ef
[Mono] Change Atan2 arguments to Y X 2019-05-26 03:15:56 -04:00
hilfazer ca1932636f autocomplete for enum values 2019-05-26 09:09:11 +02:00
ShyRed 60e711a115 Add Godot constants to Mono project builds
This adds constants to projects build via Godot Mono which allows project to conditionally react to different operating systems and 32/64 Bit architecture. Additionally .NET libraries could support multiple engines like Unity and Godot at the same time when compiled from Godot and reacting to definitions.
2019-05-26 08:07:55 +02:00
Ignacio Roldán Etcheverry 0d8f1ba6a9
Merge pull request #29021 from aaronfranke/mono-tuple
[Mono] Misc Basis and AABB improvements
2019-05-26 01:46:07 +02:00
Rémi Verschelde b09ed50020
Merge pull request #29145 from GodotExplorer/gdscript-extend-fix
Fix parse error when inherits from subclass of named classes
2019-05-24 22:40:47 +02:00
Rémi Verschelde 3887fb3e6a
Merge pull request #28836 from Jummit/vs-fix-default-call-modes
Change the call mode to self when adding nodes via the node search
2019-05-24 17:44:54 +02:00
Rémi Verschelde 49e95d2cc7
Merge pull request #28980 from Jummit/vs-rename-change-base-type
Fix VisualScript Change Base Type title
2019-05-24 13:45:09 +02:00
Geequlim ebcfe28475 Fix parse error when extends from subclass of named classes 2019-05-24 11:56:44 +08:00
Ignacio Etcheverry 04ebf294f3 C#: Implement ScriptInstance::to_string
Create a blacklist of methods that must not be generated. Includes: "to_string", "_to_string" and "_init".
2019-05-24 00:40:20 +02:00
Rémi Verschelde 1deb41226d
Merge pull request #28738 from 2shady4u/master
Added native binding for dictionary duplication
2019-05-23 13:47:36 +02:00
shaderbeast 48bd2e459f Added native binding for dictionary duplication
Added entry in gdnative_api.json


Added function to header as well


Fixed versioning
2019-05-23 10:23:47 +02:00
jfons 1add4c15ab Various improvements to NavigationMesh generation
* Expose EditorNavigationMeshGenerator as an engine singleton so users
  can generate navmesehes from `tool` scripts.

* Add support for generating navmeshes from static colliders. All
  collision shapes are supported except for Plane (since Plane is an
  infinite collider and navmeshes need to have finite geometry).

* When using static colliders as a geometry source, a layer mask can be
  specified to ignore certain colliders.

* Don't rely on global transform. It still should give the exact same
  results but allows for building navmeshes on nodes that are not in the
  tree (useful in `tool` scripts).

* Update navigation gizmos after every new bake.

This work has been kindly sponsored by IMVU.
2019-05-23 08:37:58 +02:00
Aaron Franke 7b6473fec5
[Mono] Misc Basis and AABB improvements 2019-05-22 15:23:51 -04:00
thomas.herzog c1e733466b [GDNative] fix godot_variant_evaluate function
Fixes #28984
2019-05-22 09:10:06 +02:00
Ignacio Roldán Etcheverry e2375f487c
Merge pull request #29079 from neikeq/oopsie
Fix C# build error in MarshalUtils debug code
2019-05-21 19:54:34 +02:00
Ignacio Roldán Etcheverry 9c45432309
Merge pull request #29052 from neikeq/fixes-28667------i-think
Replace call to 'mono_runtime_object_init' with manual ctor invoking
2019-05-21 19:15:32 +02:00
Ignacio Etcheverry 9b76c56098 Fix C# build error in MarshalUtils debug code 2019-05-21 19:09:00 +02:00
Rémi Verschelde 26e0cc7aa3
Merge pull request #29041 from hbina/add_const
add const to methods that return literals
2019-05-21 15:16:41 +02:00
Rémi Verschelde f62638367f
Merge pull request #28964 from Faless/webrtc/channels_pr
WebRTC refactor. data channels, STUN/TURN support.
2019-05-21 13:49:32 +02:00
Rémi Verschelde 2bee15eee1
Merge pull request #29050 from hbina/redundant_null_checks
removed a redundant null check in assimp editor
2019-05-21 12:07:38 +02:00
hbina085 f78baa5f93 added a const keyword for a methods that return constant literal... 2019-05-21 02:16:30 -04:00
hbina085 13680885b6 removed a redundant NULL check in assimp editor of a pointer to an array declared in the same statement block 2019-05-20 18:08:59 -04:00
Ignacio Etcheverry 66b930a266 Replace call to 'mono_runtime_object_init' with manual ctor invoking 2019-05-21 00:06:04 +02:00
Rémi Verschelde defd960276
Merge pull request #27886 from LeonardMeagher2/obj_to_string
Allow overriding how scripted objects are converted to strings
2019-05-20 22:37:01 +02:00
Swarnim Arun 7155477caa Fix history state setup in VisualScript 2019-05-20 22:15:43 +05:30
Rémi Verschelde 6110bdee13
Merge pull request #28975 from RameshRavone/type_tag
NULL global_tag for non exposed classes
2019-05-20 13:00:02 +02:00
Rémi Verschelde 8b0ea33777
Merge pull request #28965 from jkirsons/csgpolygon-weird-end-cap
Resolve: #24682 CSGPolygon - weird end cap
2019-05-20 11:25:53 +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
Ignacio Roldán Etcheverry f54becfee2
Merge pull request #28974 from neikeq/moshi-moshi_git-desu-ka
C#: Marshalling support for IEnumerable<> and IDictionary<,>
2019-05-18 20:36:26 +02:00
Ignacio Etcheverry 5a4bf4f369 C#: Marshalling support for IEnumerable<> and IDictionary<,>
Also fixed the hint string of exported members.
2019-05-18 19:39:56 +02:00
Jummit bd8f345e71 Fix VisualScript Change Base Type title 2019-05-18 10:07:12 +02:00
RameshRavone 71808b38bc
NULL global_tag for non exposed classes 2019-05-18 07:55:48 +05:30
Jason 89a9f4621f Resolve: #24682 CSGPolygon - weird end cap 2019-05-17 20:49:24 +02:00
Aaron Franke 9ff708f008
Optimize Basis constructor for Axis Angle 2019-05-17 05:11:12 -04:00
Max Hilbrunner c67bb5f145
Merge pull request #28595 from godotengine/AndreaCatania-patch-1
Improved CCD calculation algorithm
2019-05-16 23:11:12 +02:00
Andrea Catania c1c8555565 Improved CCD calculation algorithm 2019-05-16 18:56:37 +02:00
Fabio Alessandrelli 729b1e9941 WebRTC refactor. Data channels, STUN/TURN support.
A big refactor to the WebRTC module. API is now considered quite stable.

Highlights:

- Renamed `WebRTCPeer` to `WebRTCPeerConnection`.
- `WebRTCPeerConnection` no longer act as `PacketPeer`, it only handle the connection itself (a bit like `TCP_Server`)
- Added new `WebRTCDataChannel` class which inherits from `PacketPeer` to handle data transfer.
- Add `WebRTCPeerConnection.initialize` method to create a new connection with the desired configuration provided as dictionary ([see MDN docs](https://developer.mozilla.org/en-US/docs/Web/API/RTCPeerConnection/RTCPeerConnection#RTCConfiguration_dictionary)).
- Add `WebRTCPeerConnection.create_data_channel` method to create a data channel for the given connection. The connection must be in `STATE_NEW` as specified by the standard ([see MDN docs for options](https://developer.mozilla.org/en-US/docs/Web/API/RTCPeerConnection/createDataChannel#RTCDataChannelInit_dictionary)).
- Add a `data_channel_received` signal to `WebRTCPeerConnection` for in-band (not negotiated) channels.
- Renamed `WebRTCPeerConnection` `offer_created` signal to `session_description_created`.
- Renamed `WebRTCPeerConnection` `new_ice_candidate` signal to `ice_candidate_created`
2019-05-16 11:21:20 +02:00
Rémi Verschelde c38d9180df
Revert "Revert "Implemented terrain raycast acceleration"" 2019-05-16 10:18:48 +02:00
Rémi Verschelde eded8d52e3
Merge pull request #28917 from Faless/gdnative/singleton_editor_fix_pr
Update GDNativeLibrarySingletonEditor.
2019-05-16 08:59:02 +02:00
Frank Secilia a4a0e64245 Fix indexing failure in NativeScriptLanguage::unregister_binding_functions.
binding_functions.size() and an instance's binding_data.size() can get out of sync. They sync up when an instance's bindings are requested. When binding functions are registered after creating an instance's bindings, the instance's bindings are out of sync until requested again. If they're never requested, they're never synced.

unregister_binding_functions indexes into binding_data, but only checks that its safe to index into binding_functions. When they're out of sync, indexing fails.

This revision checks that it's safe to index into binding_data.
2019-05-15 15:28:55 -04:00
Fabio Alessandrelli a95563208f Update GDNativeLibrarySingletonEditor.
Moved GDNative singletons discoverer from register_types to
GDNativeSingletonEditor.
Fix enable/disable switch in GDNativeLibrarySingletonEditor.
Separate `gdnative/singletons` and `gdnative/singletons_disabled`
project settings, keeping "on by default" behavior.
2019-05-15 18:08:17 +02:00
Rémi Verschelde 9beb26cef3
Merge pull request #28809 from bojidar-bg/x-navmesh-wrong-vertex-order
Fix orientation of generated navmeshes
2019-05-13 13:49:02 +02:00
Rémi Verschelde abc6dd7fa2
Merge pull request #28839 from Faless/gdnative/lib_resource_fix
Fix GDNative library resource loading.
2019-05-13 13:33:10 +02:00
Rémi Verschelde 647021e864
Merge pull request #28326 from BastiaanOlij/center_heightmap
Center shape according to logic Bullet applies
2019-05-13 12:58:00 +02:00
Fabio Alessandrelli aecbb330f3 Fix GDNative library resource loading.
Store general properties in ConfigFile too when modifying them.
Additionally set config_file property as internal as it's not editable
from inspector. It also does not appear to get saved in a meaningful way
(saved as Object(ConfigFile, ...))
2019-05-12 21:26:22 +02:00
Jummit 1d056d3921 change call mode to self when adding nodes with node search
fixes #28614
2019-05-12 09:27:05 +02:00
Bojidar Marinov 4cf3113a1a
Fix orientation of generated navmeshes
Fixes #23817
2019-05-11 21:39:52 +03:00
Ryan Stein 42d6205e8c Add RegEx substitution testcase and fix relevant docs
(cherry picked from commit a31bbb4bd9)
2019-05-11 09:03:19 +02:00
Aaron Franke 702b539405
Change "ID" to lowercase "id"
Reasoning: ID is not an acronym, it is simply short for identification, so it logically should not be capitalized. But even if it was an acronym, other acronyms in Godot are not capitalized, like p_rid, p_ip, and p_json.
2019-05-09 06:25:32 -04:00