Commit graph

2864 commits

Author SHA1 Message Date
Sebastian Hartte 7440295ad1 Add support for new MSBuild directory naming introduced in VS 2019. 2019-03-20 17:57:20 +01:00
Sebastian Hartte 34366bc27f Fix parsing of generic type declarations in C# source files. 2019-03-20 17:23:11 +01:00
PouleyKetchoupp 8346d90c5e Properly handle different border widths in rounded corner aa
Note: removed (unused and not implemented) support for multiple border colors
2019-03-19 11:51:32 +01:00
karroffel 197d642014 fix GDNative binding generation for object types 2019-03-17 21:31:26 +01:00
Timo Schwarzer 7a0dfc04aa
Allow whitespaces in warning-ignore comments 2019-03-17 18:42:59 +01:00
Bojidar Marinov 466a76ac2c
Fix GDScriptCompiler bugging out with identically-named inner class
Fixes #27111
2019-03-16 20:41:16 +02:00
Rémi Verschelde 6f404efd9a
Merge pull request #26309 from bojidar-bg/21536-resize-gridmap-previews
Add search box and size slider to GridMap (similar to TileMap's)
2019-03-16 11:15:41 -07:00
Rémi Verschelde 43f147b5aa
Merge pull request #26308 from bojidar-bg/11722-meshlibrary-transforms
Consider StaticBody and NavMesh position when converting to a MeshLibrary
2019-03-16 11:15:15 -07:00
Bojidar Marinov b64f9f03f8
Fix duplicated lines in GDScript bytecode
Fixes #26789
2019-03-14 18:38:07 +02:00
Rémi Verschelde 3b5a0f34d4
Merge pull request #27014 from neikeq/csharp-update-exports-only-in-editor
C#: Update exports only in the editor
2019-03-13 20:07:06 +01:00
Ignacio Etcheverry 5e354162f1 C#: Update exports only in the editor 2019-03-13 16:26:47 +01:00
Rémi Verschelde 4326fd5a7e Mono: Update welcome message with current state 2019-03-12 19:35:02 +01:00
Rémi Verschelde 6d86450a83
Merge pull request #26941 from JFonS/add_gizmos_priority
Add priority to gizmos and fix small issues
2019-03-12 01:19:39 +01:00
JFonS 2658e5d03d Add priority to gizmos and fix small issues
User defined gizmos will haave higher preference than editor gizmos by
default. Also fixed some inconsistencies in the gizmos menu when using
custom gizmos.
2019-03-12 00:30:50 +01:00
Anish bd22b1cbe6 Fixes segfault on opening incompatible files.
If a file cannot be opened by the plugin connected, the engine
would crash. This has been fixed by quitting the open_file() method
early.
2019-03-11 16:41:30 +05:30
Ignacio Etcheverry e9e7aab8eb Mono: Some assembly referencing changes and cleanup
Apparently we don't need to call mono_debug_close_image ourselves and we can call mono_image_close right away as it's not our duty to keep that reference.
2019-03-10 18:55:31 +01:00
Ignacio Etcheverry 4299332ecc Mono: Fix assemblies path String incorrectly constructed from utf8
Also fixed a wrong ifdef that was causing Mono to never be initialized if mscorlib was not found (which was the case with the utf8 assemblies path bug this commit fixes).
This condition was meant for exported projects only, not for the editor only.
2019-03-09 23:00:03 +01:00
karroffel 9786b51601 [GDNative] fix crash at shutdown when using singleton libraries and NativeScript
When a singleton library was exposing NativeScript functionality,
the NativeScriptLanguage would attempt to terminate the library at
shutdown.

Since the GDNative module itself handles singleton libraries,
it closes all singleton libraries at shutdown as well. This double free
could cause a crash, since the library referenced would no longer be alive.
2019-03-09 18:01:08 +01:00
Hugo Locurcio 5a574a4f29
Fix typo in GDScript narrowing conversion warning message
This closes #26790.
2019-03-08 14:28:33 +01:00
Ignacio Roldán Etcheverry 65487ed4ed
Merge pull request #26746 from shartte/godot-trace-listener
Add a custom TraceListener on Startup for Mono
2019-03-08 07:05:41 +01:00
Ignacio Etcheverry a4825c2f8b Fix CSharpInstance::set not working with base classes 2019-03-08 00:12:19 +01:00
Rémi Verschelde 6ee3002237
Merge pull request #26773 from neikeq/issue-26628
Mono: Fix crash with exported field of custom Reference derived type
2019-03-07 22:54:03 +01:00
Ignacio Etcheverry c5f8b0960a Mono: Fix crash with exported field of custom Reference derived type 2019-03-07 22:38:31 +01:00
Ignacio Etcheverry 17a55861f1
Merge pull request #26770 from neikeq/issue-26675
Mono: Partially implement some Godot debug api functions
2019-03-07 22:00:59 +01:00
Ignacio Etcheverry 47407ba2df
Merge pull request #26761 from Chaosus/fix_mono_wrap
Fix division by zero at wrap functions in mono
2019-03-07 21:34:03 +01:00
Ignacio Etcheverry 8e2e0795bb Mono: Partially implement some Godot debug api functions
Debug breaks sent with debug_break and debug_break_parse should display correctly in the Godot debugger now.
2019-03-07 21:02:57 +01:00
Sebastian Hartte 37d448fca7 Added a Godot TraceListener, which is automatically installed on startup. Fixes that Debug/Trace Assertions are simply swallowed by Godot. 2019-03-07 21:00:19 +01:00
Chaosus 752055ccba Fix division by zero at wrap functions in mono 2019-03-07 22:57:12 +03:00
Ignacio Etcheverry 4c0b0a6bdd
Merge pull request #26765 from neikeq/issue-25959
Mono: Fix crash when re-using script binding after domain reloading
2019-03-07 20:50:37 +01:00
Ignacio Etcheverry e904f814c8 Mono: Fix crash when re-using script binding after domain reloading 2019-03-07 19:55:40 +01:00
Sebastian Hartte f8a6a6c8a2 Update scripts exports even when normal script instances are created to better support tool scripts with exported variables. 2019-03-07 18:52:43 +01:00
Rémi Verschelde 8f5d9b6391 doc: Sync classref with current source 2019-03-07 10:54:42 +01:00
Anish 978c2a604a Fixed crash on loading GDNative videos.
Fixed issue with loading a resource supported by the gdnative videodecoders
that does not exist.
2019-03-06 22:56:36 +01:00
Rémi Verschelde 64923ff277
Merge pull request #26713 from neikeq/print-msbuild-command
Print MSBuild command if also printing output
2019-03-06 18:22:57 +01:00
Rémi Verschelde c67e9a4dd4
Merge pull request #26665 from bojidar-bg/19704-singleton-constants
Fix enums coming from other classes without preload
2019-03-06 18:20:48 +01:00
Ignacio Etcheverry 0b68677112 Print MSBuild command if also printing output 2019-03-06 17:10:14 +01:00
Ignacio Etcheverry db7928849b
Merge pull request #26712 from neikeq/issue-26681
Mono: Make 'Build' button generate solution if it doesn't exist
2019-03-06 16:54:51 +01:00
Ignacio Etcheverry c97db904a0 Mono: Make 'Build' button generate solution if it doesn't exist 2019-03-06 16:36:53 +01:00
Rémi Verschelde 97774f6f69
Merge pull request #26688 from Faless/net/lws_3.1
Update libwebsockets to 3.1, fix IPv6 issues
2019-03-06 14:47:37 +01:00
Fabio Alessandrelli 90210c4862 Update libwebsockets to 3.1 (plus UWP patch) 2019-03-06 02:02:52 +01:00
Ignacio Etcheverry 6492de800f
Merge pull request #26661 from neikeq/issue-17601
Mono: Fix array field being assigned MonoArray** instead of MonoArray*
2019-03-05 23:03:25 +01:00
Bojidar Marinov 9637e42705
Fix enums coming from other classes without preload
Fix #19704, fix #26001
2019-03-05 23:19:02 +02:00
Ignacio Etcheverry c6ac7333a6 Mono: Fix array field being assigned MonoArray** instead of MonoArray*
Fixes #17601
2019-03-05 21:46:55 +01:00
2017A7PS0002G a3ecfb7a82 Added get_noise_1d 2019-03-05 20:58:58 +05:30
Rémi Verschelde 8366811352
Merge pull request #26608 from dragmz/fix22231
Calculate inputs count from arg types instead of names
2019-03-04 21:52:47 +01:00
Marcin Zawiejski 0d35525f0b calculate inputs count from arg types instead of names 2019-03-04 21:39:17 +01:00
Rémi Verschelde d1ba3227c4
Merge pull request #26592 from clayjohn/noisetexture_strength
Changed default noisetexture strength
2019-03-04 20:48:56 +01:00
Rémi Verschelde e21a8f2922
Merge pull request #26604 from bojidar-bg/25889-vs-parameters-empty
Fix default values not being read correctly in VisualScript
2019-03-04 20:36:47 +01:00
Bojidar Marinov 4b3db1de3d
Fix default values not being read correctly in VisualScript
Fixes #25889
2019-03-04 20:41:50 +02:00
Rémi Verschelde 0a7de5472f
Merge pull request #26591 from neikeq/oi
Mono: Add option to print MSBuild output and improve out of sync error
2019-03-04 18:36:10 +01:00
clayjohn 30a88a5c08 changed default noisetexture strength 2019-03-04 07:59:08 -08:00
Ignacio Etcheverry 8877b07f4c Mono: Add option to print MSBuild output and improve out of sync error 2019-03-04 16:05:08 +01:00
Juan Linietsky b63c506ad8 Close file handles after use of new get_as_utf8_strings, fixes #26578 2019-03-04 09:53:02 -03:00
Ignacio Etcheverry 813d32499a
Merge pull request #26513 from cart/mono-log-profiler
Add mono log profiler support
2019-03-04 13:52:15 +01:00
Rémi Verschelde 93f6a065f8 libwebp: Sync with upstream 1.0.2 2019-03-04 13:13:33 +01:00
Rémi Verschelde 425ec6914c
Revert "Forbid implicit type conversion in GDScript" 2019-03-04 12:25:59 +01:00
Rémi Verschelde 49d82f245b
Merge pull request #26541 from clayjohn/noise_texture_scale
Added bump_strength to NoiseTexture
2019-03-04 10:49:53 +01:00
Rémi Verschelde 7889e9b7ca
Merge pull request #26562 from vnen/gdscript-no-implicit-cast
Forbid implicit type conversion in GDScript
2019-03-04 10:19:00 +01:00
George Marques 67fee40483
GDScript: Fix issue when detecting file class in inner class 2019-03-03 22:53:50 -03:00
George Marques d0b08342b8
GDScript: Forbid implicit type conversion
Since types are not present in release builds, this could cause issues
where a variable does not have the exact defined type.
2019-03-03 22:25:22 -03:00
George Marques b24cb92240
GDScript: Allow for iterator to be rededefined 2019-03-03 21:39:42 -03:00
Juan Linietsky a9fe834a8e
Merge pull request #26547 from vnen/gdscript-dependency-parse
Add a parse mode for GDScript which doesn't load dependencies
2019-03-03 18:00:12 -03:00
clayjohn 44b71a22ff added bump_strength to noisetexture 2019-03-03 12:33:44 -08:00
George Marques bda60bfa29
Add a dependency search mode for GDScript parser
- This mode avoids loading any other resource.
- Search for class_name now uses this mode, to avoid loading in the scan
thread.
- Implement get_dependencies() for GDScript loader, now exporting
dependencies only should include the preloaded resources.
2019-03-03 16:51:54 -03:00
George Marques 9db96d9f81
Merge pull request #26528 from bojidar-bg/26047-gdscript-object-argument
Allow parameters passed to GDScript functions to be nulled
2019-03-03 11:39:25 -03:00
George Marques bf2c6680ac
Merge pull request #26521 from bojidar-bg/25408-gdscript-constant-bug
Fix GDScript checking for assigning to a constant only in release
2019-03-03 11:31:27 -03:00
Bojidar Marinov f0efc7521e
Allow parameters passed to GDScript functions to be nulled
Previous version resulted in confusing (but actually right) errors about converting "from Object to Object", since CallError
does not include information about the actual types involved.
2019-03-03 15:24:06 +02:00
Bojidar Marinov f207b2fe0e
Fix GDScript checking for assigning to a constant only in release 2019-03-03 12:36:27 +02:00
Carter Anderson 839ed2d092 Add mono log profiler support 2019-03-02 23:32:03 -08:00
Rémi Verschelde 1807e0f135 SCons: Move platform-specific Opus config to its module 2019-03-02 10:30:25 +01:00
Juan Linietsky a73ca79402 Fix CSG crash, closes #26281 2019-03-01 13:36:21 -03:00
Ignacio Etcheverry 42c57eef13 C#: Fix parsing of class full name when the base has generics
Also we no longer ignore base classes with generics, since we don't really care about that.
2019-03-01 00:23:23 +01:00
Ignacio Etcheverry 22b41ab2fe Mono: Fail on script instance creation if constructor was not found
Previously this would result in NULL dereferencing. Now we fail with an error.
2019-02-28 23:22:46 +01:00
Ignacio Etcheverry 5a4475fce3 Mono: Make sure the generated RootNamespace is a valid identifier 2019-02-28 22:26:15 +01:00
Ignacio Etcheverry b69569415f
Merge pull request #26411 from neikeq/issue-26195
C#: Add Array.Resize(int) method
2019-02-28 18:53:14 +01:00
Ignacio Etcheverry 32cd8ba9bd C#: Add Array.Resize(int) method 2019-02-28 18:33:42 +01:00
Rémi Verschelde b09f3f93af opus: Better sync sources list with upstream buildsystem 2019-02-28 14:27:56 +01:00
Rémi Verschelde f2003b1a7e
Merge pull request #26034 from QbieShay/issue_25596
Inheriting from virtual class no longer causes the engine to crash.
2019-02-28 11:00:20 +01:00
QbieShay 8f22c2684f Inheriting from virtual class no longer causes the engine to crash, it prints an error instead.
Co-authored-by: Hein-Pieter van Braam <hp@tmm.cx>
2019-02-27 20:42:20 +01:00
Rémi Verschelde 372152220b
Merge pull request #26159 from marxin/fix-Wsuggest-attribute=format
Fix -Wsuggest-attribute=format warnings.
2019-02-27 09:23:26 +01:00
Rémi Verschelde 426a6fdc17
Merge pull request #26134 from marxin/fix-Wsign-compare
Fix -Wsign-compare warnings.
2019-02-27 09:22:47 +01:00
marxin e5f665c718 Fix -Wsign-compare warnings.
I decided to modify code in a defensive way. Ideally functions
like size() or length() should return an unsigned type.
2019-02-27 07:45:57 +01:00
marxin aff84ec55d Fix -Wsuggest-attribute=format warnings. 2019-02-27 06:56:50 +01:00
Ignacio Etcheverry df7541d2f9
Merge pull request #26333 from neikeq/ayaya
Mono: Some editor usability improvements
2019-02-27 03:16:02 +01:00
Ignacio Etcheverry 3e0846e65b Mono: Some editor usability improvements
- Move "Mono" popup menu from the top right corner to `Projects -> Tools` as a submenu.
- Add "Build solution" button to the top right corner. Makes it more visible and quicker to access.
- Fix build list in the bottom panel unselect an item when clicking on empty space. Previously it would hide the issues panel but the item would remain selected, making it impossible to display the issues panel again if there was only one item.
2019-02-27 02:45:21 +01:00
Ignacio Etcheverry 823fb59e10 Remove problematic VS Code hint path on Windows 2019-02-27 02:43:53 +01:00
Rémi Verschelde 28a57c2c29
Merge pull request #26304 from bojidar-bg/26066-fix-exported-poolarray
Fix GDScript exports having the wrong type of default value by converting it
2019-02-27 00:16:02 +01:00
Juan Linietsky f669ebeeaf -Properly handle missing ETC support on export
-Added ability for resource importers to save metadata
-Added ability for resource importers to validate depending on project settings
2019-02-26 18:45:06 -03:00
Eric Rybicki c9de8a6e68 Fix "No loader found for resource: res://" spam when NativeScript script_class_name is not empty.
fixes #26275
2019-02-26 17:07:53 +01:00
Bojidar Marinov a9ac4c012c
Add search box and size slider to GridMap (similar to TileMap's)
Closes #21536
2019-02-26 16:17:59 +02:00
Bojidar Marinov 1a397a7878
Consider StaticBody and NavMesh position when converting to a MeshLibrary
Would have added mesh transform, but realized that will cause problems when moving the mesh around the scene for visualization purposes.

Closes #11722
2019-02-26 15:38:23 +02:00
Bojidar Marinov db7864c1fd
Fix GDScript exports having the wrong type of default value by converting it
Also, initialize elements of PoolArrays when resizing them in the editor.
Fixes #26066.
2019-02-26 14:58:39 +02:00
Fabio Alessandrelli f112f5785b Fixing C compatiblity for GDNative NET module
Also add net interfaces to gdnative_api.json
2019-02-24 21:23:23 +01:00
George Marques 755c690252
Merge pull request #25018 from AllanDaemon/#24895
Fix support for optional parameters in setters
2019-02-24 10:45:50 -03:00
Ignacio Etcheverry da3776a40a C#: Fix Vector2.AngleToPoint
Fixes #26209
2019-02-23 23:28:31 +01:00
Rémi Verschelde 07fbc34195
Merge pull request #26203 from neikeq/csharp-basis
C#: Basis fixes and cleanup
2019-02-23 20:53:03 +01:00
Ignacio Etcheverry 2c26e7f174 C#: Basis fixes and cleanup
Fix Basis operator[int]. Now it returns columns instead of rows.
Fix Transform2D.AfficeInverse() mutating rather than returning a new Transform2D.
2019-02-23 18:22:30 +01:00
Rémi Verschelde e22f6e9ace
Revert "Optimized area check" 2019-02-22 12:46:54 +01:00
Rémi Verschelde 0c7c800880
Merge pull request #26133 from YeldhamDev/ttr_undoredo_actions
Make translatable some undo/redo operations in the editor
2019-02-22 09:58:51 +01:00
Rémi Verschelde 726f31e992
Merge pull request #26132 from marxin/fix-Wignored-qualifiers
Fix warnings seen with -Wignored-qualifiers.
2019-02-22 09:55:27 +01:00
Rémi Verschelde c700d714bb
Merge pull request #26130 from karroffel/gdnative-dictionary-fix
added godot_dictionary_get_with_default to GDNative
2019-02-22 09:54:20 +01:00
Rémi Verschelde 60fe9321ac
Merge pull request #26099 from marxin/fix-Wtype-limits-warnings
Fix all -Wtype-limits warnings.
2019-02-22 09:44:59 +01:00
20kdc b1f5cee7d9 webm/theora/yuv2rgb: Fix YUV conversion issues and add BGRP WEBM handling. (Now clang-format friendly.)
This should fix the various issues with colours in Ogg Theora and WEBM playback.
(A reference project is attached to PR #26051, which this commit should be part of.)

This version of the commit, rather than moving x->RGBA handling into libsimplewebm, uses a colourspace field added to libsimplewebm by a PR there.
Thus, the commit that precedes this should be the synchronization & cleanup commit for that.

Also, this version is now clang-format friendly. I hope.
2019-02-21 22:33:43 +00:00
Juan Linietsky d13ac2a413 Request to use load when cyclic reference is found, closes #26119 2019-02-21 17:27:07 -03:00
Michael Alexsander Silva Dias 3ef8238c1c Make translatable some undo/redo operations in the editor 2019-02-21 16:41:01 -03:00
marxin c11e7ffd0e Fix warnings seen with -Wignored-qualifiers. 2019-02-21 20:24:29 +01:00
karroffel 56bb22c988 added godot_dictionary_get_with_default to GDNative
Recently, Dictionary::get() was introduced, which acts like a index
operator but allows the caller to specify a default value to return
instead of issuing an error.

This commit adds a new GDNative function that includes the default value.
2019-02-21 20:12:57 +01:00
marxin 7de7f0ef17 Fix all -Wtype-limits warnings. 2019-02-21 19:34:35 +01:00
Rémi Verschelde ced77db950
Merge pull request #26111 from AndreaCatania/areaopti
Optimized area check
2019-02-21 13:58:38 +01:00
Andrea Catania b1934cfd0d Optimized area check 2019-02-21 08:41:31 +01:00
Daniel Spaniol 79176decd5 Require return in all match branches
Before the parser only checked if the catch-all branch has a return in
order to determine if the entire match block has a return.

This code block was assumed to always return.

    match value:
        "test":
            print("test")
        _:
            return

Now as soon as one of the branches has no return, the entire match block
is marked to not have a return.
2019-02-20 21:38:11 +01:00
marxin 8d51618949 Add -Wshadow=local to warnings and fix reported issues.
Fixes #25316.
2019-02-20 19:44:12 +01:00
Rémi Verschelde 643af210b1
Merge pull request #26096 from Faless/net/enet_id_check
Add check to validate client IDs in ENet.
2019-02-20 17:49:12 +01:00
Rémi Verschelde 6d0ec870e3
Merge pull request #26090 from aqnuep/ray_shape_fix2
Fix RayShape collision jitter when used with a RigidBody
2019-02-20 17:28:31 +01:00
Fabio Alessandrelli dc583a6225 Add check to validate client IDs in ENet.
Server now checks that the ID received from the client is not already
used by someone else and is a valid ID (>=2)
2019-02-20 16:28:53 +01:00
Rémi Verschelde 1a36141481
Merge pull request #26048 from akien-mga/free-switch-for-everyone
GDScript: Remove unused `switch`, `case` and `do` CF keywords
2019-02-20 15:26:46 +01:00
Daniel Rakos 6587024207 Fix RayShape collision jitter when used with a RigidBody
Scaling the depth was the wrong solution for the KinematicBody jitter
because it causes jitter with RigidBody. Instead scale the margin that
is ignored to allow KinematicBody to still pick up the ray shape in the
kinematic test when the shape is just at margin distance from another
one. This solution does not cause jitter with either KinematicBody or
RigidBody.
2019-02-20 15:06:08 +01:00
Rémi Verschelde d35003d92a GDScript: Remove unused switch, case and do CF keywords
They had been reserved for future implementation, but we now have the
`match` CF keyword which does the same and more.

According to @reduz `do` was even added by mistake when copying from
the shader language parser, it was never intended to add support for
`do`... `while` loops, as the syntax would be awkward in GDScript,
and the added sugar is not worth it.

Fixes #25787.
2019-02-20 14:05:08 +01:00
Rémi Verschelde 7376cbdc94
Merge pull request #26072 from Faless/net/mbedtls_1.16
Update mbedtls to 2.16.0 (LTS release) + ubsan hack
2019-02-20 10:47:44 +01:00
Fabio Alessandrelli 2b8b738391 Small hack to avoid runtime error when using ubsan
mbedtls_ssl_read cannot be called with a NULL buffer even if len is 0,
as those are passed to memcpy and compilers doesn't like that.
Always pass a single byte (still len 0 so nothing is actually copied)
2019-02-20 01:49:47 +01:00
Ignacio Etcheverry 9421da57ad C#: Add 'Singleton' property to singleton wrapper class
This property returns an instance of the singleton.
The purpose of this is to allow using methods from the base class like 'Connect'.
Since all Godot singletons inherit Object, the type of the returned instance is Godot.Object.
2019-02-19 22:38:22 +01:00
Ignacio Etcheverry aa5b99821b
Merge pull request #26065 from neikeq/csharp-fix-gd-range
C#: Make GD.Range return IEnumerable instead of array
2019-02-19 19:27:37 +01:00
Ignacio Etcheverry 0826b79035 C#: Make GD.Range return IEnumerable instead of array
- Make NodePath and RID sealed classes.
- Renamed rand_range to RandRange.
2019-02-19 18:46:18 +01:00
Ignacio Etcheverry 1174d10e3c
Merge pull request #25890 from neikeq/issue-25818
Fix Godot.Reference marshalling from MonoObject* to Variant
2019-02-19 15:05:05 +01:00
Rémi Verschelde 2f9b7e6b63
Merge pull request #25788 from aqnuep/rayshape_fix
Fix RayShape collision when used with a KinematicBody (Bullet Physics)
2019-02-19 14:42:04 +01:00
Daniel Rakos f7511511b1 Fix RayShape collision when used with a KinematicBody (Bullet Physics)
- Added code handling non-compound collision to recover_from_penetration_ray()
  which is now needed due to the optimization avoiding the use of compound
  collisions when only a single collision shape is used.
- Removed arbitrary margin applied in the collision algorithm of RayShapes
  which causes jittered movement. For lack of a better replacement and for
  lack of any explanation on why it has been introduced, it's now using the
  shape's margin property instead which is small enough to not show visible
  jitter.
- Tried to get rid of inconsistent uses of the collision margin.
- Removed hack from GodotDeepPenetrationContactResultCallback::addContactPoint
  for RayShape collision as it's no longer needed as the collision algorithm
  of RayShapes correctly calculates the contact normal for a while now.

Fixes #25227.
2019-02-19 11:16:05 +01:00
Ignacio Etcheverry 29fd942dd6
Merge pull request #26039 from neikeq/throw_objectdisposedexception
C#: Throw ObjectDisposedException from disposed wrapper classes
2019-02-19 01:02:20 +01:00
Ignacio Etcheverry e1f01bf2ac
Merge pull request #26038 from neikeq/csharp_rand_funcs
C#: Add random functions to GD class
2019-02-19 00:52:01 +01:00
Ignacio Etcheverry efd5d4bcf9 C#: Throw ObjectDisposedException from disposed wrapper classes 2019-02-19 00:37:15 +01:00
Ignacio Etcheverry ce67808818 C#: Add random functions to GD class 2019-02-19 00:35:19 +01:00
marxin 155cbe0b37 Fix warnings seen with warnings=all and recent GCC 8.2. 2019-02-18 21:54:31 +01:00
RomanAkberov 041a7bbeba C#: fix Quat.Equals. 2019-02-19 01:01:05 +07:00
Rémi Verschelde 049bb75f9e
Merge pull request #26014 from AndreaCatania/bugfix
Fixed area collision report with concave
2019-02-18 15:24:09 +01:00
Andrea Catania 66420aea9c Fixed area collision report with concave 2019-02-18 14:15:27 +01:00
Rémi Verschelde 98e4bda9f9
Merge pull request #26007 from marxin/fix-23015-cast
Make direct casting among Error and godot_error enums (#23015).
2019-02-18 13:51:16 +01:00
Rémi Verschelde f023e40f6e
Merge pull request #26011 from AndreaCatania/bugfix
Added support to scale areas, fixes #23448
2019-02-18 13:21:02 +01:00
Andrea Catania 90d05cbe30 Added support to scale areas 2019-02-18 12:57:55 +01:00
marxin 66a43898d4 Make direct casting among Error and godot_error enums (#23015). 2019-02-18 10:26:22 +01:00
Rémi Verschelde 1ffd1bc8f3 doc: Sync classref with current source 2019-02-18 09:35:29 +01:00
Rémi Verschelde fd60724c3d
Merge pull request #25715 from hpvb/fix-25598
Add a maximum recusion depth to _guess_expression_type
2019-02-16 14:39:57 +01:00
Ignacio Etcheverry f5477ee36f
Merge pull request #25917 from neikeq/zz
Mono: Get rid of irrelevant error and fix export template build errors
2019-02-15 20:08:41 +01:00
Ignacio Etcheverry a8dfe9ff7f Don't print 'Cannot find Mono in the registry' if bundled with Godot
Closes #24753
2019-02-15 19:52:32 +01:00
Ignacio Etcheverry d17ba9a140 Mono: Fix export template build errors
Fixes #25903
2019-02-15 19:52:22 +01:00
Ignacio Etcheverry b41a793592 Fix Godot.Reference marshalling from MonoObject* to Variant
Need to cast Ref<T> to Variant instead of constructing Variant from Object*, otherwise the Variant won't hold a reference.
2019-02-14 22:54:15 +01:00
Rémi Verschelde 89ca15693e
Merge pull request #25866 from neikeq/issue-25121
Fix exported property values being lost if base GDScript fails to parse
2019-02-14 09:21:19 +01:00
Ignacio Etcheverry 2f8d1a321a Fix exported property values being lost if base GDScript fails to parse 2019-02-14 02:36:19 +01:00
Rémi Verschelde 5fc86026ca Fix typos with codespell
Using codespell 1.14.0.

Method:
```
$ cat > ../godot-word-whitelist.txt << EOF
ang
doubleclick
lod
nd
numer
que
te
unselect
EOF
$ codespell -w -q 3 -I ../godot-word-whitelist.txt --skip="./thirdparty,*.po"
$ git diff // undo unwanted changes
```
2019-02-13 09:23:29 +01:00
Rémi Verschelde 55ca2a7c88
Merge pull request #25821 from akien-mga/sync-class-and-filenames
Ensure classes match their header filename
2019-02-13 08:49:39 +01:00
Aaron Franke f97eb6d881 [Mono] Fix Transform2D rotation and scale 2019-02-12 17:59:29 -05:00
Rémi Verschelde 322fad70bd Fix copyright year in VideoStreamGDNative 2019-02-12 23:05:30 +01:00
Rémi Verschelde fe7e11e008 Modules: Ensure classes match their header filename
Renamed:
- `modules/mono/mono_gd/gd_mono_class_member.h` -> `i_mono_class_member.h`
- `modules/upnp/upnpdevice.h` -> `upnp_device.h`
- `modules/websocket/websocket_multiplayer.h` -> `websocket_multiplayer_peer.h`
2019-02-12 22:59:56 +01:00
Rémi Verschelde c5dcbeb160 Scene: Ensure classes match their header filename
Also drop some unused files.

Renamed:
- `scene/2d/navigation2d.h` -> `navigation_2d.h`
- `scene/2d/screen_button.h` -> `touch_screen_button.h`
- `scene/3d/scenario_fx.h` -> `world_environment.h`
- `scene/audio/audio_player.h` -> `audio_stream_player.h`
- `scene/resources/bit_mask.h` -> `bit_map.h`
- `scene/resources/color_ramp.h` -> `gradient.h`
- `scene/resources/shape_line_2d.h` -> `line_shape_2d.h`
- `scene/resources/scene_format_text.h` -> `resource_format_text.h`
- `scene/resources/sky_box.h` -> `sky.h`

Dropped:
- `scene/resources/bounds.h`
2019-02-12 17:21:48 +01:00
Rémi Verschelde c4835c4345
Merge pull request #25721 from neikeq/ww
Use script instance binding for objects constructed from C#
2019-02-12 15:29:25 +01:00
Rémi Verschelde 75dae1b9a9 Drivers, main, servers: Ensure classes match their header filename
Renamed:
- `drivers/alsamidi/alsa_midi.h` -> `midi_driver_alsamidi.h`
  (same for `coremidi` and `winmidi`)
- `main/timer_sync.h` -> `main_timer_sync.h`
- `servers/visual/visual_server_global.h` -> `visual_server_globals.h`
2019-02-12 14:39:47 +01:00
Rémi Verschelde b7cc2bb1e2 Core: Ensure classes match their header filename
Also drop some unused files.

Renamed:
- `core/dvector.h` -> `pool_vector.h`
- `core/io/resource_import.h` -> `resource_importer.h`
- `core/sort.h` -> `sort_array.h`
- `core/string_db.h` -> `string_name.h`

Dropped:
- `core/allocators.h`
- `core/os/shell.h`
- `core/variant_construct_string.cpp`
2019-02-12 13:34:25 +01:00
Rémi Verschelde 13c50e8aa5
Merge pull request #25481 from hpvb/fix-ubsan-asan-reports
Fix many asan and ubsan reported issues
2019-02-12 12:21:01 +01:00
Rémi Verschelde e40395669c
Merge pull request #25550 from DualMatrix/fix-25357
Fixed Null appearing inside export variables with type hints and no default value
2019-02-12 12:01:22 +01:00
Rémi Verschelde f12b47b65e
Merge pull request #25783 from Xrayez/csg-shapes-visibility
Fix CSGShape not updating on changing visibility
2019-02-12 11:18:25 +01:00
Carter Anderson 22bf89e970 Use "origin" instead of "o" in Transform2D.Rotation 2019-02-11 23:46:55 -08:00
Ignacio Etcheverry be98a6ebbc
Merge pull request #25724 from aaronfranke/mono-transform
[Mono] Fix Transform2D origin
2019-02-11 22:27:49 +01:00
Ignacio Etcheverry 9115c6ab15
Merge pull request #25803 from neikeq/yy
Windows: Default to system MSBuild and add VSCode hint path
2019-02-11 22:25:11 +01:00
Ignacio Etcheverry da00c338a3 Add VSCode hint path for Windows 2019-02-11 22:03:51 +01:00
Ignacio Etcheverry 9a08b90472 Default to MSBuild from VS Build Tools instead of Mono's
Don't pass FrameworkPathOverride to MSBuild. It's causing issues with some nuget packages.
2019-02-11 22:03:37 +01:00
Andrii Doroshenko (Xrayez) 095f472a0b Fix CSGShape not updating on changing visibility
Hiding CSGShape should force the CSG operation to skip it which is intented
behaviour according to how CSGBrush is created for each shape.
2019-02-10 23:53:31 +02:00
Ignacio Etcheverry eda4be193f
Merge pull request #25773 from neikeq/xx
Do not initialize Mono if 'res://.mono/' and mscorlib are missing
2019-02-10 19:08:28 +01:00
Ignacio Etcheverry 3afd9deded
Merge pull request #25774 from neikeq/fix-noreturn-attr-check
Fix check to determine if [[noreturn]] attribute is usable
2019-02-10 19:08:15 +01:00
Ignacio Etcheverry b67955afca Fix check to determine if [[noreturn]] attribute is usable 2019-02-10 18:45:18 +01:00
Ignacio Etcheverry 7f596270f3 Fix exporting assemblies from wrong output path
This is the whole reason 'fill_search_dirs' was added for, yet somehow I forgot to pass the config parameter.
2019-02-10 18:37:42 +01:00
Ignacio Etcheverry 24a2ae7f3c Do not initialize Mono if 'res://.mono/' and mscorlib are missing
This is needed to avoid aborting due to missing mscorlib for projects that do not use C#.
If 'res://.mono/' exists, then we assume the project uses C#, in which case a missing mscorlib should still abort.
2019-02-10 18:34:37 +01:00
Rémi Verschelde f614f15506 doc: Misc formatting fixes 2019-02-10 13:30:48 +01:00
Rémi Verschelde 74932b905e doc: Sync classref with current source 2019-02-10 13:01:03 +01:00
Aaron Franke 25a90bcf1a [Mono] Fix Transform2D origin 2019-02-09 14:56:14 -05:00
Aaron Franke 3f837d5cc5 [Core] Rename Matrix3 file to Basis
The code already referred to "Basis", it's just the file name that was different for some reason.
2019-02-09 14:42:23 -05:00
Rémi Verschelde 2a0c9faac2
Merge pull request #25614 from QbieShay/issue_25425
Fix generating GDNative API struct for 1.1
2019-02-09 13:09:13 +01:00
Rémi Verschelde 6c243326bd
Merge pull request #25650 from willnationsdev/script-icon
Fix script class icons looking for paths at runtime
2019-02-09 12:22:51 +01:00
Ignacio Etcheverry 9df44c2d2c Use script instance binding for objects constructed from C#
Only possible if the object class is a "native type". If the object class is a user class (that derives a "native type") then a script is needed.
Since CSharpLanguage does cleanup of script instance bindings when finished, cases like #25621 will no longer cause problems.

Fixed ~Object() trying to free script instance bindings after the language has already been removed, which would result in a NULL dereference.
2019-02-09 00:32:18 +01:00
Ignacio Etcheverry 5f8c30fbca Mono: Create player script metadata when building manually
Previously this was only done when building the script for running the game. This was a problem because the user could want to build the project manually with the "Build project" button, to then run the game from the command line or similar.
2019-02-08 22:49:27 +01:00
Hein-Pieter van Braam e937e74b69 Add a maximum recusion depth to _guess_expression_type
When a recursive declaration ends up in a GDScript file the
_guess_expression_type function would start looping and eventually run
out of stack space.

We now cap recusion for this function to 100 frames.

This fixes #25598
2019-02-08 22:39:08 +01:00
Karroffel 682bc07035 Fix generating GDNative API struct for 1.1
Fixes #25425.
2019-02-08 19:28:40 +01:00
Rémi Verschelde 9dcbf961e5
Merge pull request #25500 from daniel-abbott/BT_Debug_disable
Disable BT_DEBUG, works around #25476 and #25431
2019-02-08 12:02:09 +01:00
Rémi Verschelde 7fcdadadf4
Merge pull request #25518 from bojidar-bg/25505-wrong-type-error-message
Fix wrong error messages for invalid arguments when calling functions through call
2019-02-08 11:18:30 +01:00
Daniel Abbott b3c0cb08b0 Disable BT_DEBUG, works around #25476 and #25431 2019-02-08 11:11:01 +01:00
Will Nations c4ff433b17 Fix script class icon filepath lookups at runtime. 2019-02-06 16:17:56 -06:00
Ignacio Etcheverry 4aa4916b11 Mono: Workaround to fix 'flushing' errors when building at editor startup 2019-02-05 18:51:24 +01:00
Ignacio Etcheverry 919fa75803
Merge pull request #25574 from neikeq/ss
Mono: Lifetime fixes for CSharpInstance and instance binding data
2019-02-03 07:36:33 +01:00
Ignacio Etcheverry d8593747e0 Mono: Fix default debugger agent argument never being used 2019-02-03 06:51:07 +01:00
Ignacio Etcheverry 3233083f63 Mono: Lifetime fixes for CSharpInstance and instance binding data
Avoid CSharpInstance from accessing its state after self destructing (by deleting the Reference owner).
It's now safe to replace the script instance without leaking or crashing.

Also fixed godot_icall_Object_weakref return reference being freed before returning.
2019-02-03 06:47:25 +01:00
Ignacio Etcheverry 4e4e889c75
Merge pull request #25478 from neikeq/rr
Mono: Fix MonoPosixHelper not being found
2019-02-03 06:31:52 +01:00
Ignacio Etcheverry 065828d159 Mono: Fix MonoPosixHelper not being found 2019-02-03 05:38:47 +01:00
Ignacio Etcheverry d3c51a5dfb Mono: Cleanup 2019-02-03 05:38:40 +01:00
DualMatrix ff508dfede Fixed Null appearing inside export variables with type hints and no default value
The default value of the type is now used to initialise it.

export(int) A

Will now have A be 0 istead of Null even though it still showed as 0 before in the inspector, fixes #25357
2019-02-01 21:18:14 +01:00
Marc Gilleron bd9f92cdf8 Implemented terrain raycast acceleration using Bresenham traversal and 1 level of chunks 2019-02-01 14:57:17 +01:00
Bojidar Marinov d2e43475b5
Fix wrong error messages for invalid arguments when calling functions through call
Fixes #25505
2019-01-31 17:02:18 +02:00
Andrea Catania 5a26c7e0e5 Avoid inertia calculation for empty shape - Bullet 2019-01-30 10:33:33 +01:00
Hein-Pieter van Braam d308eb091a Fix many asan and ubsan reported issues
This allows most demos to run without any ubsan or asan errors. There
are still some things in thirdpart/ and some things in AudioServer that
needs a look but this fixes a lot of issues. This should help debug less
obvious issues, hopefully.

This fixes #25217 and fixes #25218
2019-01-30 06:43:56 +01:00
Rémi Verschelde cc0842f9a6 Prevent upscaled SVG from exceeding Image bounds
Also expose Image MAX_WIDTH and MAX_HEIGHT.

Fixes #24455.
2019-01-28 16:00:15 +01:00
Rémi Verschelde 7fe66bc70f
Merge pull request #25401 from capnm/capnm-cleanup
Cleanup unused header file
2019-01-28 09:53:16 +01:00
Rémi Verschelde de1c3f3c89
Merge pull request #25379 from Faless/net/ws/mp_docs
Update docs and errors for WebSocket module
2019-01-28 09:35:05 +01:00
Andrea Catania 8d4617439c Fixed Rigidbody first frame center spawn 2019-01-28 08:30:26 +01:00
Martin Capitanio e07e154ebf Cleanup unused header 2019-01-28 06:29:39 +01:00
Fabio Alessandrelli 14e59ff112 Update docs and errors for WebSocket module 2019-01-28 02:12:50 +01:00
Juan Linietsky 0d438c7b18 Make CSG Shape work with GIProbe, fixes #20465 2019-01-27 18:29:17 -03:00
Rémi Verschelde d0f289b0d9
Merge pull request #25314 from marxin/fix-24417-class-memaccess
Fix class memaccess
2019-01-27 21:32:26 +01:00
Rémi Verschelde 57c0082533 Mono: Test Windows binaries with lowercase extension
To help users writing good cross-platform code, Godot's
`FileAccessWindows:open()` will issue a warning on case mismatch, which
happens here with capitalized extensions given by `PATHEXT` compared to
actual file extensions which are lowercase 99% of the time.

Fixes #25368.
2019-01-27 11:54:32 +01:00
Rémi Verschelde 3e78a55e14 Bullet: Enable BT_DEBUG on debug builds
Fixes #25301.
2019-01-27 11:08:01 +01:00
Rémi Verschelde 2211d73300 Workaround GCC 6 & 7 ICE on armv7hl
Fixes #16100.
2019-01-26 14:37:36 +01:00
Juan Linietsky 6504b88547 Ensure get script method list also checks base classes, fixes #23384 2019-01-25 10:09:44 -03:00
marxin 32713e60ab Use placement new in texture_loader_pvr.cpp (#24417).
Use constructor via placement new and swap colors directly.
2019-01-25 12:41:54 +01:00
George Marques 587c1c90cf GDScript: do second pass of parsing on release
Some construct (like match) actually depends on the second pass. This
adds some extra checks to not perform specific type-checks on release
since not all type information is available.
2019-01-23 18:45:33 -02:00
George Marques 8464cce857 GDScript: fix default value for autoexported typed vars 2019-01-23 18:06:58 -02:00
George Marques f439397126 GDScript: read constants from parent scripts
This is needed to create export variables from enums defined in a parent
class.
2019-01-23 17:42:06 -02:00
George Marques f4546fc0cd GDScript: don't allow calling non-static function from script 2019-01-23 17:42:06 -02:00
George Marques ba13aae9af GDScript: allow local classes to be used as types 2019-01-23 17:42:06 -02:00
Allan Daemon 465842d8ea Fix #24895 (support for optional parameters in setters) 2019-01-23 14:01:49 -02:00
Ignacio Etcheverry bc8b61bb06 Mono: Fix hot reload build errors and cleanup 2019-01-22 18:33:36 +01:00
Ignacio Etcheverry 077e489773 Mono: Add assembly reloading to running games
Add environment variable to specify a custom --debugger-agent for mono.
2019-01-21 22:44:09 +01:00
Rémi Verschelde a0730652fc
Merge pull request #25180 from AndreaCatania/arov
Fixed area overlaps if not move
2019-01-21 10:39:41 +01:00
Andrea Catania a9214bcee7 Fixed area overlaps if not move 2019-01-21 08:30:49 +01:00
Ignacio Etcheverry 0ac5be8368 Fix C# script metadata creation error due to missing directory 2019-01-21 00:57:03 +01:00
Ignacio Etcheverry ca8100f29f Workaround for bug with Mono's MSBuild and BaseIntermediateOutputPath
BaseIntermediateOutputPath seems to be empty by default. The workaround is to explicitly set it.

Also fixed passing char instead of char[] to String.Split. Why was this even working with Mono?
2019-01-21 00:38:28 +01:00
Rémi Verschelde d024979e84 GDScript: Fix return value of "lerp" builtin
Fixes #25082, fixes #24709.
2019-01-18 10:47:04 +01:00
Ignacio Etcheverry ce36351065
Merge pull request #25080 from neikeq/mm-c
C# Bindings Generator: Fix vararg methods with custom return type
2019-01-18 01:30:43 +01:00
Ignacio Etcheverry e8a1d4babd
Merge pull request #25079 from neikeq/mm-b
C#: Fix trying to build when there's no solution
2019-01-18 01:23:15 +01:00
Ignacio Etcheverry 938a2515cb
Merge pull request #25078 from neikeq/mm-a
C#: Fix crash due to missing gchandle ref null check
2019-01-18 01:19:51 +01:00
Ignacio Etcheverry 8f26c54c40 C# Bindings Generator: Fix vararg methods with custom return type 2019-01-18 01:03:44 +01:00
Ignacio Etcheverry 9cd24b4f6d C#: Fix trying to build when there's no solution
This would cause errors that shouldn't happen unless there was something to build.
2019-01-18 01:03:15 +01:00
Ignacio Etcheverry b48dd1bdaf C#: Fix crash due to missing gchandle ref null check 2019-01-17 23:15:20 +01:00
Hein-Pieter van Braam f958ba5abc
Merge pull request #25069 from vnen/gdscript-fixes
A bit more of GDScript fixes
2019-01-17 18:54:42 +01:00
George Marques 30f02dd421 GDScript compiler: check if subclass exists before comparison
Otherwise these checks might trigger the insertion of an empty value,
leading to crashes.
2019-01-17 14:38:28 -02:00
George Marques ced9fcafd4 GDScript: clarify error message about cycles
They may happen with any cyclic dependency, not only with inheritance.
2019-01-16 16:39:44 -02:00
George Marques 20e6ff263a GDScript: fix type-check of indexed values 2019-01-16 16:02:56 -02:00
Rémi Verschelde b910b22d74
Merge pull request #25001 from jlahman/gdscript-export-var-fix
Fixes export PackedScene "reset to default" throwing errors
2019-01-16 13:17:53 +01:00
Rémi Verschelde 7f4ee36469 Android: Add support for x86_64 architecture
Like arm64v8, this is only supported by API 21 and later,
so we enforce 21 as min API for x86_64.

Part of #25030.
2019-01-16 11:39:39 +01:00
Rémi Verschelde f0893235a5
Merge pull request #25032 from akien-mga/static-analysis
Fix some errors found by static analysis
2019-01-16 11:18:53 +01:00
Rémi Verschelde 053d7f3765 Fix some errors found by static analysis
Fixes items 10, 16 and 19 from PVS-Studio blog post
in #24014.
2019-01-16 10:59:45 +01:00
jlahman 6661ceadcc Fixes export PackedScene "reset to default" throwing errors
When exporting variables from a gdscript, default values of uninitialized variables would never be set. This caused the default value to be Variant::NIL, and when a user tried to reset the variable through the editor, an error would be thrown because too few arguments would be counted(end of argument list for calls are detected by NIL values).

Fixed by simply setting default value to an empty variant of the proper type in gdscript parser.
2019-01-15 22:20:36 -05:00
George Marques 31433ae8e4 GDScript: check for underscore prefix when type-checking
Some classes are represented internally with an underscore prefix, so we
need to make sure we match this representation when type-checking,
otherwise the check might fail on a valid scenario.
2019-01-15 19:50:48 -02:00
George Marques 4f72c6be8a GDScript: consider constructors as always existing
There's always a constructor, even if implicit, especially for native
types.

Also don't check for signature match on function call, since this
information is not available in release builds.
2019-01-15 19:15:19 -02:00
George Marques b0c3a3f2da GDScript: allow objects to be keys of dictionaries
The engine allows this already, so the parser should not fail in this
case.
2019-01-15 18:18:03 -02:00
George Marques 573fab7447 GDScript: don't check types on release builds
A lot of information is missing on release, and the checks might take a
performance hit. Also, having GDScript more lenient on release is
usually desirable.
2019-01-15 17:02:15 -02:00
George Marques 4d1551dbb5 GDScript autocomplete: don't carry values when guessing from is
Guessing the type from an `is` operator should no be considered an
assigment. This would cause crashes in certain scenarios.
2019-01-15 16:03:56 -02:00
Fabio Alessandrelli d7cd25ad9c Save 4 bytes in ENet multiplayer protocol.
Avoid sending encoded packet flags (reliable/unreliable/ordered) as
that's already been done by ENet itself and we can read them from the
incoming packet.
2019-01-15 08:38:40 +01:00
Anish 8c1677fc3f Fixed infinite loop at end of video.
A missing condition caused infinite looping, despite
the video playing flag being set to false.
Small change to fix.

Fixes: #20552
2019-01-12 00:51:59 +05:30
Rémi Verschelde 658296856c
Merge pull request #24877 from neikeq/issue-24280
Fix properties being lost when reloading placeholder GDScript instance
2019-01-10 18:02:57 +01:00
Rémi Verschelde 9eb9335608 doc: Sync classref with current source + AUTHORS edit 2019-01-10 14:34:29 +01:00
Rémi Verschelde 899ad484e3
Merge pull request #24883 from akien-mga/resourceformat-unregister
Consistency in resource format saver/loader de-registration
2019-01-10 14:25:09 +01:00
Rémi Verschelde 5bf8bdc971
Merge pull request #24884 from Xrayez/fix-#24881
Fix broken encrypted scripts during export
2019-01-10 13:12:33 +01:00
Andrii Doroshenko (Xrayez) c0cc032799 Fix broken encrypted scripts during export
Use temporary cache directory instead of editor settings directory
in order to resolve encrypted file access needed for encrypting scripts
on all platforms.
2019-01-10 13:53:12 +02:00
Rémi Verschelde e5f1d19352 Consistency in resource format saver/loader de-registration
Some used 'is_valid()' checks, others not. Validity is already checked in 'unref()',
and 'remove_resource_format_*()' has an ERR_FAIL condition on 'is_null()' already
(which shouldn't happen since we're only unregistering things that we previously
registered.

Also add missing GDCLASS statement in ResourceFormatLoaderVideoStreamGDNative,
missed in #20552 which was last amended before #19501 was merged.
2019-01-10 12:45:57 +01:00
Marcin Zawiejski 7860b74b0f
Remove vsgdnative loader on exit 2019-01-10 07:19:16 +01:00
Ignacio Etcheverry ea85ff0dc2 Fix properties being lost when reloading placeholder GDScript instance
During reloading in `GDScriptLanguage::reload_all_scripts` a placeholder instance that must remain so is replaced with a new placeholder instance. The state is then restored by calling `ScriptInstance::set` for each property. This does not work if the script is missing the properties due to build/parse failing.
The fix for such cases is to call `placeholder_set_fallback` instead of `set` on the script instance.

I took this chance to move the `build_failed` flag from `PlaceHolderScriptInstance` to `Script`. That improves the code a lot. I also renamed it to `placeholder_fallback_enabled` which is a much better name (`build_failed` could lead to misunderstandings).
2019-01-10 01:58:50 +01:00
Rémi Verschelde fe8cdafbf4
Merge pull request #20552 from KidRigger/gsoc-peer
Added interface for GDNative Videodecoder.
2019-01-09 17:30:09 +01:00
Hein-Pieter van Braam e5b335d367 Don't use -ffast-math or other unsafe math optimizations
Godot supports many different compilers and for production releases we
have to support 3 currently: GCC8, Clang6, and MSVC2017. These compilers
all do slightly different things with -ffast-math and it is causing
issues now. See #24841, #24540, #10758, #10070. And probably other
complaints about physics differences between release and release_debug
builds.

I've done some performance comparisons on Linux x86_64. All tests are
ran 20 times.

Bunnymark: (higher is better)
(bunnies)    min    max  stdev average
fast-math   7332   7597    71     7432
this pr     7379   7779   108     7621 (102%)

FPBench (gdscript port http://fpbench.org/) (lower is better)
(ms)
fast-math  15441  16127   192    15764
this pr    15671  16855   326    16001  (99%)

Float_add (adding floats in a tight loop) (lower is better)
(sec)
fast-math   5.49   5.78  0.07     5.65
this pr     5.65   5.90  0.06     5.76  (98%)

Float_div (dividing floats in a tight loop) (lower is better)
(sec)
fast-math  11.70  12.36  0.18    11.99
this pr    11.92  12.32  0.12    12.12  (99%)

Float_mul (multiplying floats in a tight loop) (lower is better)
(sec)
fast-math  11.72  12.17  0.12    11.93
this pr    12.01  12.62  0.17    12.26  (97%)

I have also looked at FPS numbers for tps-demo, 3d platformer, 2d
platformer, and sponza and could not find any measurable difference.

I believe that given the issues and oft-reported (physics) glitches on
release builds I believe that the couple of percent of tight-loop
floating point performance regression is well worth it.

This fixes #24540 and fixes #24841
2019-01-09 02:06:13 +01:00
Hein-Pieter van Braam ee0c4a97b3 Use 'release_debug' for mono export templates
This fixes the previously wrong PR

Because we don't actually ship 'debug' templates to users make sure
the mono exporter picks the correct 'data' directory for export
templates.

This fixes #24752
2019-01-08 01:44:54 +01:00
Hein-Pieter van Braam dd766bae78 Use 'release_debug' for mono export templates
Because we don't actually ship 'debug' templates to users make sure
the mono exporter picks the correct 'data' directory for export
templates.

This fixes #24752
2019-01-07 18:19:35 +00:00
Rémi Verschelde a15620c83e doc: Fix wrong references found by Sphinx and new makerst.py 2019-01-07 12:15:01 +01:00
Rémi Verschelde 26fddb77be doc: Fix wrong references found by new makerst.py
Thanks @PJB3005
2019-01-07 10:06:12 +01:00
Timo Schwarzer 56000929fd
Fix code completion on nodes in current scene 2019-01-05 23:17:02 +01:00
Rémi Verschelde 1ba0b2bc0b
Merge pull request #24741 from timoschwarzer/24697-fix-autocomplete-segfault-in-inner-classes
Fix segfault when trying to autocomplete in inner classes
2019-01-04 19:41:24 +01:00
Rémi Verschelde 5809be9641
Merge pull request #24582 from Xrayez/script-encrypt
Bring back script encryption in export preset
2019-01-04 16:34:38 +01:00
Rémi Verschelde 1808241d16
Merge pull request #24688 from Supatier/add-additional-vscode-name
Add code-oss, vscode-oss, and visual-studio-code-oss to vscode path
2019-01-03 21:32:41 +01:00
Timo Schwarzer d77643562b
Fix segfault when trying to autocomplete in inner classes
Fixes #24697
2019-01-03 15:51:34 +01:00
supatier ab7f102b14 Add code-oss, vscode-oss, and visual-studio-code-oss to vscode path 2019-01-02 05:40:34 +07:00
Rémi Verschelde b16c309f82 Update copyright statements to 2019
Happy new year to the wonderful Godot community!
2019-01-01 12:58:10 +01:00
Rémi Verschelde d1f3b622f0 Fix missing/malformed license headers 2019-01-01 12:46:36 +01:00
Rémi Verschelde ac46862097
Merge pull request #24506 from JFonS/expose_gizmos
Expose the new gizmo plugin system to scripting
2018-12-30 15:42:30 +01:00
Rémi Verschelde dcc7f2b54b
Merge pull request #24545 from akien-mga/osxcross-mono
SCons: Allow building Mono module with OSXCross
2018-12-30 15:07:18 +01:00
Rémi Verschelde 08f71baca5 Fix loading EXR with alpha channel
Fixes #24659.
2018-12-30 14:35:15 +01:00
Rémi Verschelde 95e96947f6 SCons: Drop ios_sim option forcing x86, simulator needs x86_64 2018-12-27 14:11:13 +01:00
Rémi Verschelde 2e39e38c10 doc: Sync classref with current source
Fix various code formatting issues and argument names.
2018-12-27 11:10:18 +01:00
Rémi Verschelde de4d7a785e Fix size in HeightMapShapeBullet::set_data 2018-12-27 10:29:25 +01:00
Ignacio Etcheverry ac118434ee
Merge pull request #24622 from Supatier/fix-vscode-w-uncommon-exec-name
Fix: Cannot find code editor: VSCode; although installed on linux
2018-12-27 10:13:04 +01:00
Rémi Verschelde 32a7c05eb4
Merge pull request #24610 from Faless/emws_buf_size_fixes
Fix HTML5 WebSocket client buffers size.
2018-12-27 09:45:25 +01:00
Supatier b173eed8aa
Fix Godot unable to find VSCode binary
VSCode's executable name is not uniform and godot only search for "code".
2018-12-27 15:16:29 +07:00
Rémi Verschelde a1fa614e78
Merge pull request #24561 from KellyThomas/fix-antiquewhite
fix capitalization for antiquewhite
2018-12-27 08:52:10 +01:00
Fabio Alessandrelli 77466285f2 Fix HTML5 WebSocket client buffers size. 2018-12-26 17:51:12 +01:00
Andrii Doroshenko (Xrayez) ba13a2bc05 Bring back script encryption in export preset
Retrieved working implementation from 2.1 branch and adapted to
existing export preset system.

Added Script tab in export preset to export script as raw text,
compiled, or encrypted (same as in 2.1). The script encryption key is
visually validated. The script export mode and the key is saved per
per preset in `export_presets.cfg`, so it makes sense to ignore this
file in version control system.

Each custom exporting procedure can retrieve an export preset set
during project exporting. Refactored project export dialog a bit to
allow easier code comprehension.
2018-12-24 17:16:14 +02:00
Shinryuuji b9578b8f46 Add support for 8bpp bmp files 2018-12-23 16:30:47 +01:00
Daniel Abbott 572367552c GodotRestInfoContactResultCallback::addSingleResult now returns normal
`PhysicsDirectSpaceState.get_rest_info()` now provides normals in result
Addresses issue 24558
2018-12-22 19:26:18 -07:00
Kelly Thomas a5e38586ce fix capitalization for antiquewhite 2018-12-23 08:00:35 +08:00
Rémi Verschelde d52100f4ff SCons: Allow building Mono module with OSXCross
Improve the test logic to only assume that we're building for macOS
if OSXCROSS_ROOT is defined *and* we requested p=osx.

Supersedes #24480.
2018-12-22 12:36:19 +01:00
JFonS 6b15b4f904 Expose the new gizmo plugin system to scripting 2018-12-21 23:56:39 +01:00
Kelly Thomas 09496d93b1 [Mono] Color - add ColorN(), Colors - add named color properties 2018-12-21 15:01:32 +08:00
Rémi Verschelde 2709113c83
Merge pull request #24499 from akien-mga/android-thirdparty
Android: Better identify thirdparty C/C++ code
2018-12-20 19:12:58 +01:00
Rémi Verschelde 6cdcde7114 doc: Add missing commas after "If true/false" 2018-12-20 13:47:12 +01:00
Rémi Verschelde 6770357e47 Android: Better identify thirdparty C/C++ code
- The `cpu-features.{c,h}` code was only used by chance by the webm
  (libvpx) code, so I moved it there. It was actually introduced before
  that and wasn't in use, and libvpx just happened to be able to
  compile thanks to it being bundled.
  It could potentially be compiled on the fly from the Android NDK, but
  since we plan to replace the webm module by a GDNative plugin in the
  near future, I went the bundling route.

- `ifaddrs_android.h` is already provided in the Android NDK as
  `ifaddrs.h`, same as on other Unixes. Yet we cannot use it until we
  up the min API level to 24, where `getifaddrs` is first defined.
  I moved the files to `thirdparty/misc` and synced them with upstream
  WebRTC (only indentation changes and removal of `static` qualifiers).

Also removes dropped thirdparty files from COPYRIGHT.txt after changes
in #24105 and #24145.
2018-12-20 13:07:54 +01:00
Mateus Felipe C. C. Pinto ca1935d6f7 Add settings for single-quotes on completion 2018-12-18 12:48:36 -02:00
Rémi Verschelde 830232f130
Merge pull request #23615 from buresu/pluginscript-new
PluginScript: Add support for the new() method
2018-12-18 09:29:04 +01:00
Rémi Verschelde 9c7bc127b9
Merge pull request #24385 from hpvb/reduce-string-coew
Reduce String CoW
2018-12-16 19:13:35 +01:00
Hein-Pieter van Braam 4e25e5066b Reduce String CoW
By introducing an intermediate proxy class for the array subscript
operator for String and CharString we can control better when CowData
will actually CoW.

This should improve performance of String usage for most cases.
2018-12-16 16:51:38 +01:00
Rémi Verschelde 9df7ed59fb
Merge pull request #19501 from Zylann/custom_loaders
Added basic support for custom resource savers and loaders
2018-12-16 14:26:56 +01:00
Marc Gilleron 065e2670af Added basic support for custom resource savers and loaders 2018-12-15 05:34:53 +00:00
Rémi Verschelde 4629152d68 doc: Sync classref with current source 2018-12-15 01:39:02 +01:00
meditator 0059930644 Add support for collision layers and masks in CSG shapes 2018-12-15 00:36:47 +01:00
corrigentia 0a4a3f7157 doc: Grammar and punctuation fixes for CSGMesh and CSGCombiner 2018-12-14 14:00:11 +01:00
Rémi Verschelde 72feccf205 Adapt GDNative VideoStream to use ResourceFormatLoader
Same logic as used for Webm and Theora support in #19937 and #21084,
fixing issues when exporting projects.
2018-12-13 15:33:28 +01:00
Rémi Verschelde 012dac9aad Fix includes and initialization for GDNative Videodecoder
Fixes warnings and a crash when running the destructor with an
uninitialized pcm pointer.
2018-12-13 15:31:13 +01:00
Anish 7199b7b5dd Added interface for GDNative Videodecoder.
Interface and callback api added for Videodecoder support.
Should be able to construct any format videodecoder using
only the given interface.

GSoC 2018 project.
2018-12-13 15:19:09 +01:00
Rémi Verschelde 17c3c64a80 i18n: Sync translation template with current source
Also French translation update and misc fixes to source strings.
2018-12-13 14:47:24 +01:00
Rémi Verschelde 55089d0b1a
Merge pull request #24224 from BastiaanOlij/flip_bitangent
Reverse bitangent on everythings
2018-12-11 15:21:43 +01:00