Commit graph

2396 commits

Author SHA1 Message Date
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
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