Rémi Verschelde
386968ea97
Remove obsolete GLES3 backend
...
Due to the port to Vulkan and complete redesign of the rendering backend,
the `drivers/gles3` code is no longer usable in this state and is not
planned to be ported to the new architecture.
The GLES2 backend is kept (while still disabled and non-working) as it
will eventually be ported to serve as the low-end renderer for Godot 4.0.
Some GLES3 features might be selectively ported to the updated GLES2
backend if there's a need for them, and extensions we can use for that.
So long, OpenGL driver bugs!
2020-02-13 10:36:44 +01:00
Rémi Verschelde
8d00a3a536
Remove deprecated PacketPeer allow_object_decoding
...
It was added for 3.2 in #27485 to preserve backwards compatibility,
but we can now remove it.
It is still needed in MultiplayerAPI as it's the only way to control
it for the internal put_var calls.
2020-02-13 09:02:41 +01:00
Rémi Verschelde
1f39a2d3e6
Remove deprecated sync and slave networking keywords
...
Those keywords were deprecated for 3.1 in #22087 .
Also fix token name for `TK_REMOTE`, should be "remote" like the keyword.
2020-02-13 08:59:36 +01:00
Haoyu Qiu
a23a52db3f
Fixes some memory leaks
2020-02-13 09:46:13 +08:00
Rémi Verschelde
506df14595
Merge pull request #36142 from akien-mga/remove-deprecated-decimals
...
Remove deprecated decimals builtin
2020-02-12 21:48:33 +01:00
Juan Linietsky
cf8c679a23
ObjectID converted to a structure, fixes many bugs where used incorrectly as 32 bits.
2020-02-12 14:24:54 -03:00
Rémi Verschelde
bd78b9f445
Remove deprecated decimals builtin
...
Replaced by 'step_decimals' in 3.2 via #21425 .
2020-02-12 13:39:39 +01:00
Andrea Catania
eb07e87981
Optmized data sent during RPC and RSet calls.
...
- Now is sent the method ID rather the full function name.
- The passed IDs (Node and Method) are compressed so to use less possible space.
- The variant (INT and BOOL) is now encoded and compressed so to use much less data.
- Optimized RPCMode retrieval for GDScript functions.
- Added checksum to assert the methods are the same across peers.
This work has been kindly sponsored by IMVU.
2020-02-12 13:36:47 +01:00
Hanif Bin Ariffin
7bc1dc828f
Remove deprecated Color::gray
...
It was marked to be removed in Godot 3.1.
Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2020-02-12 11:22:33 +01:00
Rémi Verschelde
948d95897c
Merge pull request #36095 from timothyqiu/corrupted-resource
...
Fixes crash when resource file is corrupted
2020-02-11 21:35:03 +01:00
Rémi Verschelde
db81928e08
Vulkan: Move thirdparty code out of drivers, style fixes
...
- `vk_enum_string_helper.h` is a generated file taken from the SDK
(Vulkan-ValidationLayers).
- `vk_mem_alloc.h` is a library from GPUOpen:
https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator
2020-02-11 14:08:44 +01:00
Juan Linietsky
2049dec79e
Added normalmap guided roughness mipmap generator, and a global roughness limiter.
2020-02-11 12:16:01 +01:00
Juan Linietsky
ee1e89f8c0
Modified rendering to use cluster instead of foward
2020-02-11 12:15:27 +01:00
Rémi Verschelde
fff4240bb4
Fix code formatting issues and VS compilation
...
Also temporarily disable multicheck build so that we get a full build
even when there are style issues on Vulkan.
Fixes #33356 .
2020-02-11 12:05:19 +01:00
Juan Linietsky
da0457fa29
Several fixes to GIProbes
2020-02-11 12:04:56 +01:00
Pedro J. Estébanez
e38ae8d7e4
Fix bugs in RID_Alloc
...
- Replace unintended `%` with `&`
- `get_owned_list()`: make thread-safe and fix logic
- Apply same logic fix to the destructor
Previously, the determination of owned RIDs was wrong. For instance, it could skip owned items or include duplicates in the list.
Avoids the engine crashing at exit.
2020-02-11 12:04:41 +01:00
Juan Linietsky
6ee2f5e6b6
More GIProbe work and fixes
2020-02-11 12:03:49 +01:00
bruvzg
26318f3bd1
Fix Vector3 ambiguities and out of bounds init.
2020-02-11 12:03:39 +01:00
Juan Linietsky
acf0f6c8a7
GIProbes working.
2020-02-11 12:03:20 +01:00
Juan Linietsky
4aea9f74e6
Rewritten StreamTexture for better code reuse, added basis universal support
2020-02-11 12:02:36 +01:00
Juan Linietsky
123ee5995c
Visual GPU profiler and related profiling support in Vulkan.
2020-02-11 12:01:26 +01:00
Juan Linietsky
6deffa62fb
Several fixes to 3D rendering, and multimesh implementation.
2020-02-11 12:01:22 +01:00
Juan Linietsky
9d7b7f931b
Reflection probes working
2020-02-11 12:01:21 +01:00
Juan Linietsky
920db604d2
Rewrote large part of rendering, omni and spot shadows now work.
2020-02-11 12:01:18 +01:00
Juan Linietsky
8cee7703a6
Yay very basic 3D (only white) finally shows.
2020-02-11 11:59:27 +01:00
Rémi Verschelde
61cf68fb48
RID_Alloc: Fix locking in getornull and free early returns
...
Those missing unlocks were preventing the editor from starting.
2020-02-11 11:59:16 +01:00
Juan Linietsky
dc3b47f3ab
Vulkan/RD rasterizer now does clean exit.
2020-02-11 11:58:16 +01:00
Rémi Verschelde
6289e7d147
Merge pull request #29993 from bruvzg/vulkan
...
Initial Vulkan support for macOS (MoltenVK) and Windows
2020-02-11 11:57:40 +01:00
bruvzg
b456bfad5c
Add runtime GLES2 / Vulkan context selection.
2020-02-11 11:57:34 +01:00
bruvzg
eb48be51db
Add static Vulkan loader.
...
Initial Vulkan support for Windows.
Initial Vulkan support for macOS.
2020-02-11 11:57:11 +01:00
Juan Linietsky
c613ead5fa
Added a spinlock template as well as a thread work pool class.
...
Also, optimized shader compilation to happen on threads.
2020-02-11 11:53:29 +01:00
Juan Linietsky
0586e18449
Custom material support seems complete.
2020-02-11 11:53:29 +01:00
Juan Linietsky
a7b2ac7bb1
Normalmapping and Specularmapping working in 2D engine
...
Added support for Sprite, AnimatedSprite and Polygon2D (should add for tileset eventually).
2020-02-11 11:53:28 +01:00
Juan Linietsky
1b4281b895
basic 2D engine is more or less working with Vulkan, including editor.
...
Still a lot to do
2020-02-11 11:53:27 +01:00
Juan Linietsky
42b44f43ee
Basic 2D engine is more or less working, needs more work for editor to be usable.
2020-02-11 11:53:27 +01:00
Juan Linietsky
9b0dd4f571
A lot of progress with canvas rendering, still far from working.
2020-02-11 11:53:27 +01:00
Juan Linietsky
9ffe57a10e
Modify RenderingDevice to use RIDs, now that they are O(1)
2020-02-11 11:53:26 +01:00
Juan Linietsky
4f163972bb
Refactored RID/RID_Owner to always use O(1) allocation.
...
* Implements a growing chunked allocator
* Removed redudant methods get and getptr, only getornull is supported now.
2020-02-11 11:53:26 +01:00
Juan Linietsky
fd188ddd51
Initial work on Vulkan:
...
-Added VulkanContext
-Added an X11 implementation
-Added a rendering device abstraction
-added a Vulkan rendering device abstraction
-Engine does not work, only shows Godot logo (run it from bin/)
2020-02-11 11:53:26 +01:00
Rémi Verschelde
3e3f8a4761
Merge pull request #36097 from madmiraal/fix-c4715-warning
...
Prevent Visual Studio compiler throwing C4715: not all control paths return a value.
2020-02-11 11:43:58 +01:00
Haoyu Qiu
832a5c860b
Fixes crash when resource file is corrupted
2020-02-11 17:29:25 +08:00
Marcel Admiraal
07d21b84a3
Refactor List operator[] to prevent compiler warnings.
...
Prevents GCC compiler throwing: control reaches end of non-void function.
Prevents Visual Studio throwing C4715: not all control paths return a value.
2020-02-11 10:29:01 +01:00
Rémi Verschelde
0b4b24883d
Merge pull request #33731 from madmiraal/fix-c4996-warning
...
Fix Visual Studio throwing C4996 warning in ustring.cpp.
2020-02-11 10:22:36 +01:00
Rémi Verschelde
6fb6405408
Merge pull request #36072 from RandomShaper/imvu/configfile_parse
...
Add ConfigFile::parse()
2020-02-11 09:21:45 +01:00
Rémi Verschelde
b390ad5a64
Merge pull request #36073 from RandomShaper/imvu/fix_variantparser_eof
...
Fix VariantParser::StreamString EOF determination
2020-02-10 12:44:51 +01:00
Rémi Verschelde
0ead0eeabb
Merge pull request #35301 from Calinou/improve-console-error-logging
...
Improve the console error logging appearance
2020-02-10 11:16:01 +01:00
Pedro J. Estébanez
e5bd3b707f
Add ConfigFile::parse()
2020-02-10 11:12:33 +01:00
Pedro J. Estébanez
521da75380
Fix VariantParser::StreamString EOF determination
2020-02-10 10:57:01 +01:00
sumit0190
c4dbd8a744
Read and write exported infs/nans correctly ( #35388 )
2020-02-09 00:46:13 -05:00
Rémi Verschelde
b2a7c08cc4
Merge pull request #36011 from madmiraal/fix-33391
...
Remove do{ } while(0) wrapper around error macros.
2020-02-08 23:27:06 +01:00
Rémi Verschelde
3a5f45a6d1
Merge pull request #35682 from nathanwfranke/canvas-cull-control-fix
...
Fix bug where canvas culls things at origin with size 0
2020-02-08 14:14:10 +01:00
Marcel Admiraal
d2b02a3d7b
Remove do{ } while(0) wrapper around error macros.
...
As pointed out by Faless, a do{ } while(0) wrapper around a continue or
break just ends the do{ } while(0) loop. The do{ } while(0) loop exists
to enable the macro to be used as a function which requires a semicolon.
The alternative approach is to use an if(1) { } else ((void)0) wrapper.
Since the macro already has an if(unlikely(m_cond)) { } this patch simply
adds the else ((void)0) to this if statement instead.
For consistency all the macros have been updated in the same way, and
trailing else warnings corrected. However, the wrappers around ERR_PRINT
and WARN_PRINT were removed, because they generated too many ambiguous
trailing else warnings. They are also single line macros so a wrapper is
not needed.
2020-02-08 11:21:46 +01:00
nathanwfranke
e5cb557b73
Fix bug where Control at origin with 0 size not rendered
...
Make a new method instead to make the code more elegant
Move Function down a bit
2020-02-07 14:43:27 -06:00
Rémi Verschelde
b7297fb39c
SCons: Generate header with info on which modules are enabled
...
We already had `MODULE_*_ENABLED` defines but only in the modules
environment, and a few custom `*_ENABLED` defines in the main env
when we needed the information in core.
Now this is defined in a single header which can be included in the
files that need this information.
2020-02-07 11:31:37 +01:00
Rémi Verschelde
f120acceb8
Merge pull request #35887 from dankan1890/quick_fix
...
Fixed String::humanize_size crash.
2020-02-06 10:29:00 +01:00
Marcel Admiraal
677604685d
Apply macro documentation from #35521 .
2020-02-05 14:53:06 +01:00
Marcel Admiraal
110f4f2dc5
Remove trailing semicolons from do..while wrappers.
...
- Remove trailing semicolons from ERR_FAIL_INDEX macros.
- Remove trailing semicolons from ERR_FAIL_UNSIGNED_INDEX macros.
- Remove trailing semicolons from CRASH_BAD_INDEX macros.
- Remove trailing semicolons from CRASH_BAD_UNSIGNED_INDEX macros.
2020-02-05 11:19:40 +01:00
Marcel Admiraal
6d69cd40bd
Add do..while(0) wrappers to macros without one.
...
- Add do..while(0) wrapper to ERR_FAIL_NULL macros.
- Add do..while(0) wrapper to ERR_FAIL_COND macros.
- Add do..while(0) wrapper to ERR_CONTINUE macros.
- Add do..while(0) wrapper to ERR_BREAK macros.
- Add do..while(0) wrapper to CRASH_COND macros.
- Add do..while(0) wrapper to ERR_FAIL macros.
- Add do..while(0) wrapper to ERR_PRINT macros.
- Add do..while(0) wrapper to WARN_PRINT macros.
- Add do..while(0) wrapper to WARN_DEPRECATED macros.
- Add do..while(0) wrapper to CRASH_NOW macros.
2020-02-05 11:19:12 +01:00
Marcel Admiraal
f0db13502a
Remove duplicate WARN_PRINT macro.
2020-02-05 11:13:24 +01:00
Marcel Admiraal
5af3b4ca27
Remove duplicate ERR_PRINT macro.
2020-02-05 11:13:24 +01:00
Marcel Admiraal
2b1084fab3
Clean up error_macros.h
2020-02-05 11:13:02 +01:00
dankan1890
ca0ee767cb
Fixed String::humanize_size crash.
...
Close #35872
2020-02-03 17:59:24 +01:00
Rémi Verschelde
505fee0b6d
Color: Fix deprecation warning mentioning 'get_v()' instead of 'v'
...
Fixes #35657 .
2020-01-28 12:41:04 +01:00
Rémi Verschelde
cab55bbb9d
MessageQueue: Fix setting name in OOM error message
...
Cf. #35653 .
2020-01-28 09:03:46 +01:00
Haoyu Qiu
f7d4e6ef6b
Fixes invalid writes in Image operations
2020-01-28 13:47:28 +08:00
Rémi Verschelde
c8d64de766
Merge pull request #35521 from Calinou/improve-error-macros
...
Improve and document error macros
2020-01-26 16:39:11 +01:00
Rémi Verschelde
cbdbfb00ca
doc: Document named color constants
...
Busywork but it's good for our completion rate :)
2020-01-26 12:08:16 +01:00
Hugo Locurcio
37d55ff153
Improve and document error macros
...
Documentation can be visible in many IDEs by hovering the macro
anywhere it's used.
Error message styling was also tweaked for consistency.
2020-01-24 17:19:57 +01:00
Hugo Locurcio
a002b93d86
Add explanations for errors related to Vector/Quat normalization
2020-01-24 14:19:23 +01:00
Rémi Verschelde
c2e07db071
Merge pull request #35438 from MadEqua/virtual-keyboard-line-edit
...
Android virtual keyboard respecting LineEdit max length.
2020-01-23 08:20:24 +01:00
Bruno Lourenço
a3bcdbeb78
Android virtual keyboard respecting LineEdit max length.
2020-01-23 01:52:49 +00:00
Hugo Locurcio
90a1f8d8a7
Make OS.execute()
blocking by default if not specified
...
This makes `OS.execute()` calls quicker to set up when calling programs
in a blocking fashion.
2020-01-23 01:26:32 +01:00
Rémi Verschelde
a8460bffd2
Merge pull request #35414 from Ovnuniarchos/AlsaMidiBadPitchBend
...
ALSA MIDI: Pitch bend and System Common messages
2020-01-22 22:12:57 +01:00
Rémi Verschelde
37897dba80
Merge pull request #35406 from lawnjelly/ortho-shadow
...
Replace CameraMatrix::get_viewport_size with get_viewport_half_extents, shadow culling with ortho camera and other affected issues
2020-01-22 22:02:09 +01:00
Ovnuniarchos
9c48eb1c59
ALSA MIDI driver:
...
Pith bend message now has correct size (was 2 bytes instead of 3).
Recognized (but not implemented) 0xF? messages. SysEx messages will be reocognized as such, but their contents will be ignored.
2020-01-22 21:41:48 +01:00
lawnjelly
eaf8e5ce52
Change CameraMatrix::get_viewport_size to get_viewport_half_extents
...
Fixes #26637 .
Fixes #19900 .
The viewport_size returned by get_viewport_size was previously incorrect, being half the correct value. The function is renamed to get_viewport_half_extents, and now returns a Vector2.
Code which called this function has also been modified accordingly.
This PR also fixes shadow culling when using ortho cameras, because the correct input for CameraMatrix::set_orthogonal should be the full HEIGHT from get_viewport_half_extents, and not half the width.
It also fixes state.ubo_data.viewport_size in rasterizer_scene_gles3.cpp to be the width and the height of the viewport in pixels as stated in the documentation, rather than the current value which is half the viewport extents in worldspace, presumed to be a bug.
2020-01-22 18:22:00 +00:00
Rémi Verschelde
409de53e72
Merge pull request #35423 from Faless/fix/object_emit_free
...
Make sure we know when deleting an emitting object
2020-01-22 14:52:54 +01:00
Fabio Alessandrelli
41f59ecfca
Make sure we know when deleting an emitting object
...
We used a lock signals in the signal_map while emitting, because it was
not allowed to disconnect them while being emitted.
We used that lock to check if we where deleting an object during signal
emission.
Now that we allow to disconnect signals while they are being emitted, if
an object first disconnects, then gets deleted we can't know that a
signal was being emitted during the destructor.
This commit adds a new `_emitting` boolean member to Object to be set
while emitting and checked in the destructor, while removing the old
signal lock which is now unused.
2020-01-22 14:08:16 +01:00
Rémi Verschelde
ff7e7bd260
Thread: Fix typo in destructor error message
2020-01-22 11:17:20 +01:00
Haoyu Qiu
a7368a519e
Fixes leak when importing zip in AssetLib
2020-01-22 09:34:18 +08:00
Rémi Verschelde
79aaafc686
Merge pull request #35408 from Faless/ws/fix_packet_count
...
Fix MultiplayerAPI crash when peer implementation misbehave.
2020-01-21 21:06:11 +01:00
Fabio Alessandrelli
50f1b035b8
Fix MultiplayerAPI crash when peer impl misbehave.
...
Also fix WebSocketMultiplayer::get_available_packet_count() return value
when peer is not configured to use the multiplayer API.
2020-01-21 20:46:32 +01:00
Eric Rybicki
439e0027ec
Fix AtlasPacker ignoring semi-transparent pixels
...
Fixes #33106
2020-01-20 22:43:38 +01:00
Rémi Verschelde
11260fb87f
Merge pull request #35345 from timothyqiu/pck-packer-leak
...
Fixes leak when calling PCKPacker::pck_start multiple times
2020-01-20 07:00:11 +01:00
Haoyu Qiu
07941178f0
Fixes leak when pck_start multiple times
2020-01-20 12:16:37 +08:00
Haoyu Qiu
aca0b2a459
Fixes XMLParser leak when open multiple times
2020-01-20 11:29:14 +08:00
Fabio Alessandrelli
534bf89976
PacketPeer use heap buffer for var encoding.
...
Used to allocate in stack (via alloca) which causes crashes when trying
to encode big variables.
The buffer grows as needed up to `encode_buffer_max_size` (which is
8MiB by default) and always in power of 2.
2020-01-19 11:49:10 +01:00
Hugo Locurcio
580b8cc012
Improve the console error logging appearance
...
This makes secondary information less visually prominent
to improve overall readability.
Various loggers were also tweaked for consistency.
2020-01-19 00:24:17 +01:00
Rémi Verschelde
870ec61417
Merge pull request #35092 from AndreaCatania/frames_exp
...
Exposed physics frame count and idle frame count
2020-01-14 08:25:46 +01:00
Rémi Verschelde
0aeb5bbf62
Object: Avoid error on emit_signal with freed target
...
As advised by @reduz.
2020-01-13 22:20:18 +01:00
Andrea Catania
9c60502357
Exposed physics frame count and idle frame count
2020-01-13 17:53:10 +01:00
Rémi Verschelde
f38bfccf42
Object: Remove error on disconnect of locked signals
...
According to 22637beb2e (commitcomment-36651823)
and as confirmed by @reduz, this seems not to be necessary now that we
copy-on-write.
This triggered freeze scenarios in cases where a node would be deleted
while being used as a target in a signal emission.
Fixes #34650 .
Fixes #34769 .
Now those two errors go back to reporting:
```
ERROR: emit_signal: Condition ' !target ' is true. Continuing..:
At: core/object.cpp:1191.
```
2020-01-13 17:03:02 +01:00
Rémi Verschelde
ab97f78fa5
Revert "Enable Vsync via Compositor by default"
...
This reverts commit 9600fd5dde
.
Add comment warning about possible implications of using this option.
Fixes #35038 .
2020-01-13 09:33:27 +01:00
bruvzg
d07cdc594f
[macOS] Load PCK from the .app bundle resources, instead of changing working directory.
2020-01-10 18:02:29 +02:00
Rémi Verschelde
83d950b58e
Merge pull request #34968 from Calinou/enable-vsync-via-compositor
...
Enable Vsync via Compositor by default
2020-01-10 10:04:55 +01:00
Hugo Locurcio
9600fd5dde
Enable Vsync via Compositor by default
...
This feature was added in #33414 but it was disabled by default.
Now that it got some testing, it's probably safe to enable it
by default.
2020-01-09 22:22:11 +01:00
George Marques
3718f8f592
GDScript: Validate object instance on is
operation
...
Avoids crashes on debug mode. Instead it now breaks the execution and
show the error in-editor. Will still crash on release.
Also add a similar check to Marshalls to ensure the debugger doesn't
crash when trying to serialize the invalid instance.
2020-01-09 13:59:33 -03:00
Tomasz Chabora
97273ce378
Check if resource exists before loading
2020-01-08 15:24:43 +01:00
Rémi Verschelde
14b24b6a71
Merge pull request #34875 from neikeq/api-hash-no-underscore-methodbinds
...
ClassDB: Exclude method binds starting with '_' from API hash
2020-01-08 08:32:25 +01:00
Ignacio Etcheverry
4be87c6016
ClassDB: Exclude method binds starting with '_' from API hash
...
These methods are not meant to be part of the scripting API.
These are not the same as virtual methods starting with '_', e.g.: '_process'.
2020-01-07 00:08:49 +01:00
Rémi Verschelde
8aea5decc6
Merge pull request #34020 from gytsen/unify-pack-version
...
PCK: Set VERSION_PATCH in header, factor out header magic
2020-01-06 14:04:55 +01:00
Rémi Verschelde
e62941fb53
Merge pull request #34296 from timothyqiu/lock-33072
...
Fixes crash when using Resource::_take_over_path
2020-01-06 14:04:23 +01:00
Joost Heitbrink
dc61323b2c
PCK: Set VERSION_PATCH in header, factor out header magic
...
Unify pack file version and magic to avoid hardcoded literals.
`version.py` now always includes `patch` even for the first release in
a new stable branch (e.g. 3.2). The public name stays without the patch
number, but `Engine.get_version_info()` already included `patch == 0`,
and we can remove some extra handling of undefined `VERSION_PATCH` this
way.
Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2020-01-06 13:13:17 +01:00
Rémi Verschelde
8454804972
Merge pull request #33967 from Calinou/add-os-is-window-focused
...
Add an `OS.is_window_focused()` getter
2020-01-06 11:39:18 +01:00
Rémi Verschelde
0783874ff2
Merge pull request #34782 from akien-mga/multiplayerapi-set_network_peer-invalid
...
MultiplayerAPI: Fix disconnect errors when passing invalid peer
2020-01-03 14:33:25 +01:00
Rémi Verschelde
136846a6ec
Merge pull request #34772 from clayjohn/ETC-support-alpha
...
Fallback to RGBA4444 for textures with alpha set to ETC compression
2020-01-03 14:29:19 +01:00
Rémi Verschelde
fa82664419
Merge pull request #34726 from nekomatata/polygon2d-antialiasing-fix
...
Fixed antialiasing option for Polygon2D with concave/hollow shapes
2020-01-03 14:17:05 +01:00
Rémi Verschelde
3cbfb11460
MultiplayerAPI: Fix disconnect errors when passing invalid peer
...
Fixes #34634 .
2020-01-03 13:34:54 +01:00
Rémi Verschelde
9d3424f61d
Merge pull request #34688 from sheepandshepherd/gdnative_class_ptr
...
Expose is_class_ptr to GDNative for dynamic casts
2020-01-03 11:32:01 +01:00
clayjohn
7a9fc69a16
Fallback to RGBA4444 for textures with alpha set to ETC compression
2020-01-02 21:37:48 -08:00
sheepandshepherd
3056c4bd5a
Expose cast_to to GDNative for dynamic casts
2020-01-03 04:27:13 +01:00
Rémi Verschelde
eadf04e1dd
Merge pull request #34476 from volzhs/no-slash-localize_path
...
Make sure no additional slash being added with localize_path
2020-01-02 19:11:18 +01:00
Rémi Verschelde
bde52cc688
Merge pull request #34618 from qarmin/vector_please_dont_crash
...
Don't use constant reference in Vector push_back, insert and append_array
2020-01-02 15:44:41 +01:00
Rémi Verschelde
a97b08e7d2
Merge pull request #34745 from timothyqiu/vararg-return-nil-34743
...
Allows to doc vararg method return type as void
2020-01-02 15:20:58 +01:00
Rémi Verschelde
e772a1241a
Object::disconnect: Better errors when no signal or locked
...
It will now give information about the originating object instance
and when locked, the target callback.
This should help debugging editor and game issues that are now being
reported due to adding signal locking in
22637beb2e
.
2020-01-02 14:51:50 +01:00
Haoyu Qiu
4d727f1ee6
Allows to doc vararg method return type as void
2020-01-02 21:37:26 +08:00
PouleyKetchoupp
1591677eb8
Fixed antialiasing option for Polygon2D
...
Some cases were not handled properly for Polygon2D after making changes in common code to fix Line2D antialiasing. Added an option for drawing polygons to differentiate the two use cases.
Fixes #34568
2020-01-01 11:40:14 +01:00
Rémi Verschelde
a7f49ac9a1
Update copyright statements to 2020
...
Happy new year to the wonderful Godot community!
We're starting a new decade with a well-established, non-profit, free
and open source game engine, and tons of further improvements in the
pipeline from hundreds of contributors.
Godot will keep getting better, and we're looking forward to all the
games that the community will keep developing and releasing with it.
2020-01-01 11:16:22 +01:00
Rémi Verschelde
ccedda9c71
Merge pull request #34682 from Calinou/os-exit-code-nonportable-warning
...
Print a warning message if `OS.exit_code` is set to a non-portable value
2019-12-30 18:09:32 +01:00
Hugo Locurcio
d441a6aefa
Print a warning message if OS.exit_code
is set to a non-portable value
...
This also improves the related documentation.
2019-12-29 16:56:22 +01:00
Danil Alexeev
134755ebcf
Add ord() function to Expression class
...
The ord() function was recently added in GDScript and VisualScript,
but was missed in the Expression class.
2019-12-29 09:20:10 +03:00
Rafał Mikrut
1ac701cc37
Don't use constant reference in Vector push_back, insert and append_array
2019-12-26 17:38:08 +01:00
Fabio Alessandrelli
cbc772d696
Fix buffers size calculation in PacketPeerStream.
...
The calculation used to be wrong when exactly at a power of 2.
`nearest_shift` always return the "next" power of 2
`nearest_shift(4) == 3 # 2^3 = 8`.
On the other hand `next_power_of_2` returns the exact value if that
value is a power of 2 (i.e. `next_power_of_2(4) == 4`).
I.e. :
```
WARN_PRINT(itos(next_power_of_2(4)) + " " + itos(1 << nearest_shift(4)));
// WARNING: ... : 4 8
```
Is this by design?
2019-12-22 15:35:44 +01:00
volzhs
02d5591d9d
Make sure no additional slash being added with localize_path
2019-12-20 14:49:01 +09:00
Haoyu Qiu
e7e095da3f
Encodes property names properly in project.godot
2019-12-20 10:42:08 +08:00
Rémi Verschelde
791c84bbbb
Merge pull request #34421 from Chaosus/fix_strcpy_warning
...
Fix build warning in ustring.cpp on Windows/MSVC platform
2019-12-19 12:19:45 +01:00
Juan Linietsky
28599e6c20
Suggest use of deferred or oneshot on disconnect if the signal is locked. Closes #34443 .
2019-12-18 19:32:00 -03:00
Yuri Roubinsky
8674655a45
Fix build warning in ustring.cpp on Windows/MSVC platform
2019-12-18 17:40:51 +03:00
Rémi Verschelde
7d34d1a85f
Merge pull request #34348 from Catchawink/master
...
Fixed issues with using a relative path in the export window.
2019-12-17 22:24:34 +01:00
Juan Linietsky
0dd6079e4e
Improve error message and do not spam forever.
2019-12-17 11:18:47 -03:00
Juan Linietsky
22637beb2e
Restore signal locking, for some reason missing.
2019-12-17 10:43:51 -03:00
Catchawink
b2a14042d5
Fixed issues with using a relative path in the export window.
...
Before this fix, opening relative export paths inside of an EditorFileDialog was not possible. This was fixed by modifying String::path_to_file() to save relative paths in EditorExportPreset::set_export_path() more appropriately and changing EditorFileDialog::set_current_dir() to open relative paths.
2019-12-16 09:50:42 -05:00
Aaron Franke
1b8b380993
Document that translated does not behave like rotated or scaled
2019-12-15 12:31:08 -05:00
Rémi Verschelde
d3a07d3550
Merge pull request #33910 from Faless/net/android_mlock
...
Acquire MulticastLock on Android when using broadcast/multicast
2019-12-14 21:53:08 +01:00
Fabio Alessandrelli
9269d6be32
UDP sockets broadcast is now disabled by default.
...
Add method `set_broadcast_enabled` to allow enabling broadcast via
GDScript.
2019-12-14 17:48:16 +01:00
Rémi Verschelde
f111d1aaed
Drop b2d_convexdecomp. no longer necessary.
...
We now use `thirdparty/misc/triangulator.h` for all physics-related
(collision, navigation) triangulation needs.
Follow-up to #34293 .
2019-12-13 23:29:52 +01:00
Rémi Verschelde
d31ff039ed
Merge pull request #34310 from qarmin/shift_operators
...
Don't allow to use too big or too small shift count
2019-12-13 09:47:43 +01:00
Rafał Mikrut
162a64efcd
Don't allow to use too big or too small shift operators
2019-12-12 20:00:26 +01:00
Haoyu Qiu
50c37ed986
Fixes crash when using Resource::_take_over_path
2019-12-12 14:39:03 +08:00
Rémi Verschelde
9abc0ad8a5
Merge pull request #27792 from Giacom/fix_quat
...
Fixes being unable to use the Quat(Vector3) constructor
2019-12-11 22:04:09 +01:00
Fabio Alessandrelli
ab1bfb9007
NetSocket set_broadcast_enabled returns Error enum
2019-12-10 12:11:52 +01:00
Rémi Verschelde
2845e6a21a
Merge pull request #34040 from qarmin/unused_variable_more_precise_numbers
...
Removed unused variables, add some constants numbers
2019-12-10 08:25:31 +01:00
Rafał Mikrut
ed1c4bc77d
Removed unused variables, add some constants numbers
2019-12-10 05:13:02 +01:00
Hugo Locurcio
fe06966181
Make some arguments in PCKPacker methods optional
...
Those arguments aren't required for most common use cases,
so making them optional should help with code readability.
2019-12-07 01:06:42 +01:00
Rémi Verschelde
95242b7faf
ResourceLoader: Add language code matching for localized resources
...
Near matching was not implemented like in TranslationServer, so a
resource remapped for 'ru' (but not 'ru_RU') would not be used as
fallback if the system locale was 'ru_RU'.
Fixes #34058 .
2019-12-04 16:53:40 +01:00
Rémi Verschelde
0fcb68ffa1
Translation: Refactor locale matching to use proper language code
...
The previous code only parsed the first two characters (potentially reading
out of bounds if input was invalid), but some locales use a 3-letter language
code (e.g. 'nah_MX').
So I refactored the logic a bit to properly parse the locale and extract the
part left of the regional code, if provided (supports both 'en_US' and 'en-US'
style).
I made TranslationServer::get_language_code() public as I'll use it in a
follow up commit.
2019-12-04 16:53:08 +01:00
TerminalJack
e1dda5195c
Added support for vertical syncing via the Windows OS compositor (DWM.)
2019-12-04 11:14:21 +01:00
Andrii Doroshenko (Xrayez)
749d917424
Fix severe performance drop while deflating polylines
...
Underscaled arc tolerance produced very small values so that changes
to this parameter were negligible when scaled internally, hence significant
performance drop (lots of intermediate points inserted in an arc). Now the
performance is mostly the same compared to other types of offsetting
(SQUARE, MITER).
2019-12-03 15:43:59 +02:00
Rémi Verschelde
c3609eb211
Merge pull request #34072 from arlez80/master
...
fixed pitch bend value and MIDI running status on the InputEventMIDI.
2019-12-03 09:45:19 +01:00
あるる / きのもと 結衣
e8410c03f5
fixed set pitch bend value and implemented midi running status
2019-12-03 16:22:02 +09:00
Rémi Verschelde
10bae7c05b
Merge pull request #33857 from nekomatata/polygon-2d-antialiasing
...
Fixed antialiased option for Polygon2D
2019-12-03 07:51:16 +01:00
Fabio Alessandrelli
6f38aeef52
Merge pull request #33640 from mewin/http_head_request
...
Fix HTTP HEAD requests
2019-12-01 05:50:33 +01:00
PouleyKetchoupp
e6ebc43d72
Fixed antialiased option for Polygon2D / Line2D
...
Polygon2D:
The property wasn't used anymore after switching from canvas_item_add_polygon() to canvas_item_add_triangle_array() for drawing.
Line2D:
Added the same property as for Polygon2D & fixed smooth line drawing to use indices correctly.
Fixes #26823
2019-11-28 22:57:27 +01:00
Hugo Locurcio
21a3923410
Add an OS.is_window_focused()
getter
...
This makes it possible to know whether the window is focused
at a given time, without having to track the focus state manually
using `NOTIFICATION_WM_FOCUS_IN` and `NOTIFICATION_WM_FOCUS_OUT`.
This partially addresses #33928 .
2019-11-28 16:42:51 +01:00
Patrick Wuttke
2cd68a2566
do not wait for response body when making a HEAD request
2019-11-26 14:17:34 +01:00
Emmanuel Leblond
a1f1a1d798
Revert "Fix localise_path method so that uncached scripts don't sometimes get loaded with two backslashes"
...
This reverts commit 1342551664
.
2019-11-26 13:42:18 +01:00
Rémi Verschelde
967cc2c014
Merge pull request #33862 from Faless/net/http_request_chunk_size
...
Add download_chunk_size property to HTTPRequest.
2019-11-25 14:29:59 +01:00
Fabio Alessandrelli
ed19b4076e
Add download_chunk_size property to HTTPRequest.
...
This allows setting the `read_chunk_size` of the internal HTTPClient.
This is important to reduce the allocation overhead and number of file
writes when downloading large files, allowing for better download speed.
2019-11-24 19:32:20 +01:00
Fabio Alessandrelli
9b2073aa97
Merge pull request #33652 from Black-Cat/http-client-fix
...
Fix HTTPClient::poll crash when connection set to null
2019-11-23 10:15:45 +01:00
Artem Burjachenko
b73073ae36
Fix HTTPClient::poll crash when connection set to null
2019-11-23 11:06:14 +04:00
Rémi Verschelde
083d088de3
Merge pull request #33583 from qarmin/fix_overflows_unitialized
...
Fix some overflows and unitialized variables
2019-11-20 21:31:12 +01:00
Rafał Mikrut
99d8626f4a
Fix some overflows and unitialized variables
2019-11-20 16:22:16 +01:00
stoofin
8abd64dcbb
Fixed bug caused by a copy/paste error in Face3::get_closest_point_to
...
s * edge0 = -d / a * edge0 = -edge0⋅v0 / (edge0⋅edge0) * edge0 = vector projection of -v0 onto edge0
By incorrectly using -e/c instead of -d/a, Face3::get_closest_point_to was returning the wrong point in certain cases. Specifically, I noticed it returning vertex[0] when it should have been returning vertex[1].
2019-11-19 22:30:28 -08:00
Marcel Admiraal
70b0fad25a
Fix Visual Studio throwing C4996 warning in ustring.cpp.
2019-11-19 14:47:12 +00:00
Fabio Alessandrelli
0d7409adfb
Fix explain message not being stripped in release.
...
Messages coming from ERR_EXPLAIN / ERR_*_MSG macros used to strip the
error explanation in release builds and was changed in a recent
refactoring.
This commit restores the old behaviour (fixing release builds).
2019-11-13 14:21:32 +01:00
Rémi Verschelde
6b1628f9fc
Merge pull request #33517 from madmiraal/fix-_MSG-macros
...
Send *_MSG macros' explanations directly to the _err_print_error().
2019-11-11 13:27:51 +01:00
Marcel Admiraal
83069a3c0f
Remove ERR_EXPLAIN macros and the scaffolding they needed.
2019-11-11 10:57:00 +01:00
Marcel Admiraal
d18b2e599d
Remove all uses of ERR_EXPLAIN macros.
2019-11-11 10:24:04 +01:00
Marcel Admiraal
b7fdac60f1
Send m_msg directly to _err_print_error().
2019-11-10 08:03:54 +01:00
Hugo Locurcio
e6d53ba75f
Expose the OS.low_processor_usage_mode_sleep_usec
property
...
This makes it possible to change it at runtime in projects.
2019-11-08 18:53:25 +01:00
Rémi Verschelde
9d4e596c69
doc: Sync classref with current source
...
Fix incomplete binding.
2019-11-08 16:00:01 +01:00
Rémi Verschelde
0e54b2d43c
Merge pull request #33445 from kawa-yoiko/astar-soft-error
...
Emit an error rather than crash in A*
2019-11-08 14:18:26 +01:00
bruvzg
5d6ff7f2a2
Fix MinGW/clang/LLD/UCRT build.
2019-11-08 15:04:35 +02:00
Shiqing
aac7ddf89f
Emit an error rather than crash in A*
2019-11-08 20:32:50 +08:00
Rémi Verschelde
621dc7022f
Merge pull request #27742 from rxlecky/camera-replication
...
Game camera override
2019-11-08 10:02:18 +01:00
Rémi Verschelde
31f327a4a9
Merge pull request #33052 from KoBeWi/naughty_sliders
...
Fix analog input in sliders
2019-11-08 09:55:11 +01:00
Rémi Verschelde
665ee70edb
Merge pull request #33376 from jamie-pate/master
...
Fix #24137 Different number of leading zeros on MINGW printf("%lg")
2019-11-08 09:42:17 +01:00
Jamie Pate
bdb7adecfb
Fix #24137 Different number of leading zeros on MINGW printf("%lg")
...
Use _set_output_format() on MINGW platform to force _snprintf_s() to
conform to the C99 standard and match the other platforms.
Fixes #24137
2019-11-07 16:23:35 -08:00
Tomasz Chabora
a7b202ef18
Fix analog input in sliders
2019-11-07 16:39:14 +01:00
Rémi Verschelde
77816fea8b
Merge pull request #32477 from aaronfranke/equal-approx-separate
...
Make is_equal_approx separate and make == exact again
2019-11-07 14:54:15 +01:00
Rémi Verschelde
ed373a60b1
Merge pull request #30556 from kawa-yoiko/astar-directed
...
Improve support for directed graphs in A*; docs update included
2019-11-07 12:33:27 +01:00
Rémi Verschelde
99beb9afe6
Merge pull request #33380 from SaracenOne/localise_path_fix
...
Fix localise_path method
2019-11-06 22:33:13 +01:00
Marcel Admiraal
24469d9ce4
Remove implicit dependency on String from error_macros.h.
2019-11-06 10:29:53 +01:00
Saracen
1342551664
Fix localise_path method so that uncached scripts don't sometimes get loaded with two backslashes
2019-11-06 03:32:02 +00:00
Rémi Verschelde
68dc6c6c62
Merge pull request #33254 from SneakyFish5/update-zstd
...
Update zstd to 1.4.3
2019-11-03 18:07:34 +01:00
unknown
61ad365fc9
Update zstd to 1.4.3
2019-11-03 10:37:48 -06:00
Rémi Verschelde
af4fd9de9c
Merge pull request #33238 from qarmin/other_fixes
...
Fix some crashes, overflows and using variables without values
2019-11-01 22:12:47 +01:00
Rafał Mikrut
9ddb3265e1
Fix some crashes, overflows and using variables without values
2019-11-01 16:16:31 +01:00
George Marques
5d5df05ee1
Merge pull request #32643 from mewin/add_global_class
...
Check for cyclic inheritance when adding a global script class
2019-11-01 11:45:53 -03:00
Rémi Verschelde
962fc725c0
Merge pull request #33210 from nekomatata/pool-array-empty
...
Added empty() function to pool array types
2019-11-01 14:04:16 +01:00
PouleyKetchoupp
475115c0c3
Added empty() function to pool array types
2019-10-31 16:27:32 +01:00
Aaron Franke
8754e21f48
Fix "seperate" typos
2019-10-31 08:52:26 -04:00
Andrii Doroshenko (Xrayez)
56925b9c28
Provide and print error messages for JSON parsing
...
Core is not touched, only for binding and scripting.
2019-10-31 13:15:44 +02:00
Rémi Verschelde
7b708421b3
Merge pull request #33174 from hbina/fix_srgb_to_linear
...
Fixed uinitialized variable in srgb_to_linear table
2019-10-31 09:50:59 +01:00
bruvzg
f675621725
[macOS, Windows, X11] Add graphic tablet pen pressure and tilt support to InputEventMouseMotion event.
2019-10-30 14:42:21 +02:00
Hanif Bin Ariffin
f8c2b64c99
Fixed uinitialized variable in srgb_to_linear table
...
Old array's size was actually 255.
Fixes #33133
2019-10-30 08:34:30 -04:00
PouleyKetchoupp
3a26a0eaa7
Fixed remote inspector for tool scripts
...
Fixes #29506
2019-10-28 18:32:00 +01:00
Rémi Verschelde
7d710a745e
Merge pull request #32416 from bojidar-bg/32415-shared-metadata
...
Ensure object metadata is unique
2019-10-28 14:49:35 +01:00
Rémi Verschelde
63c5cd7eb8
Merge pull request #33104 from qarmin/fix_some_crashes
...
Fix some crashes and using null pointers
2019-10-28 08:37:59 +01:00
Rafał Mikrut
e53e1c566a
Fix some crashes and using null pointers
2019-10-28 08:07:29 +01:00
Rémi Verschelde
c994eaa852
Merge pull request #32719 from nekomatata/dictionary-optimization
...
Optimized Dictionary hash() and duplicate() methods
2019-10-26 23:08:27 +02:00
Fabio Alessandrelli
198af06ff6
MultiplayerAPI cleanup cache when peer disconnects
...
We used to only cleanup path_get_cache and not path_send_cache causing
issues when a peer disconnects and then reconnects with the same ID.
2019-10-25 18:03:58 +02:00
bruvzg
1a0306abb1
Fix missing z_verbose
and z_error
symbols in debug iOS build.
2019-10-25 15:51:17 +03:00
Rémi Verschelde
091c37d921
Merge pull request #33030 from Xrayez/vformat-err-msg
...
Display error messages in console when vformat is called
2019-10-24 16:15:57 +02:00
Andrii Doroshenko (Xrayez)
113765b135
Display error messages in console when vformat is called
2019-10-24 15:14:55 +03:00
Marcel Admiraal
ce352ce5b4
Initialise VMap and HashMap values to the default when they are created.
...
Assigns a default value in VMap and HashMap when new keys are created using
the array operator so they are the same as the other Map classes.
The non const version of the array operator can be used for both assigning a
value and retrieving a writeable version. In the Map template classes the
assign version is being used to create new keys, but sometimes not assigning
a value when retrieving a writeable version.
This does not address the problem that the default value may not be the
correct one, and it does not address the problem that new keys probably
should not be created when the array operator is used. These problems will
be addressed in a separate commit.
2019-10-24 08:18:34 +02:00
Rémi Verschelde
e96319c7f3
Merge pull request #32670 from aaronfranke/mono-plane
...
[Mono] Change Plane intersect methods to return nullable Vector3
2019-10-23 21:44:05 +02:00
Erik
8b0546d93b
Implement game camera override
...
Implemented uniform API in Viewport class to override 2D and/or
3D camera.
Added buttons in 2D and 3D editor viewport toolbars that override
the running game camera transform with the editor viewport camera
transform. Implemented via remote debugger protocol and camera
override API.
Removed LiveEditFuncs function pointers from ScriptDebugger class.
Since the debugger got access to the SceneTree instance (if one
exists), there is no need to store the function pointers. The live
edit functions in SceneTree are used directly instead. Also removed
the static version of live edit functions in SceneTree for the same
reason. This reduced the SceneTree -> Debugger coupling too since
the function pointers don't need to be set from SceneTree anymore.
Moved script_debugger_remote.h/cpp from 'core/' to 'scene/debugger/'.
This is because the remote debugger is now using SceneTree directly
and 'core/' classes should not depend on 'scene/' classes.
2019-10-23 02:51:32 +01:00
Cagdas
0088385556
Add request permission automatically at android
2019-10-22 22:52:13 +03:00
Rémi Verschelde
28eca3649d
Merge pull request #30622 from creikey/fix-path-caching
...
PackedScene resources are freed before they are saved
2019-10-21 13:53:45 +02:00
Aaron Franke
218f38c7ec
Expose is_equal_approx and restore == to be exact again
...
This commit changes behavior for GDScript and C#.
Also did some organizing of the order to logically group related methods, mostly for Rect2 and AABB.
2019-10-14 16:48:59 -04:00
Aaron Franke
aeb7075628
Replace vector == and is_zero_approx(distance) with is_equal_approx
...
Internal changes only
2019-10-14 16:47:42 -04:00
Aaron Franke
86922ff70b
Make is_equal_approx separate for structures
...
This commit adds exposed behavior for C#
2019-10-14 16:46:54 -04:00
qarmin
616ab4fac2
Small fixes to redundand code, copy paste bugs
2019-10-14 11:40:55 +02:00
qarmin
04c6579fd7
Don't use in some functions empty PoolByteArrays
2019-10-11 11:39:40 +02:00
Rémi Verschelde
7f075e519a
Merge pull request #32741 from qarmin/fix_string_utf_ascii
...
Don't use to_utf8() and to_ascii() on empty String
2019-10-11 11:24:40 +02:00
qarmin
c62da553cb
Don't use to_utf8() and to_ascii() on empty String
2019-10-11 09:13:30 +02:00
PouleyKetchoupp
7dc0e68a53
Optimized Dictionary hash() and duplicate() methods
2019-10-10 18:12:20 +02:00
qarmin
684156f711
Fix decompress PoolByteArray crash
2019-10-10 17:15:10 +02:00
Hugo Locurcio
0528ce0a2a
Fix crash when using Node.get_as_property_path()
...
This closes #32679 .
2019-10-09 15:44:00 +02:00
Aaron Franke
643874f8ca
[Mono] Change Plane intersect methods to return nullable Vector3
2019-10-08 22:47:22 -04:00
Rémi Verschelde
106e21fd5f
Merge pull request #32478 from AlexHolly/fix-rect2-encloses
...
Make Rect2.encloses return true on same size
2019-10-08 16:21:45 +02:00
Rémi Verschelde
c2edaa97f3
Merge pull request #32426 from gianllucah/master
...
Option to erase a section key in ConfigFile
2019-10-08 15:46:13 +02:00
Patrick Wuttke
d8b36a452c
check for cyclic inheritance when adding a global class
2019-10-08 11:54:29 +02:00
Marcel Admiraal
c2aa3e2351
Remove circular include between core/typedefs.h and core/error_macros.h
2019-10-08 11:03:57 +02:00
Gianlluca
54cba54a45
Added a method to erase section key in ConfigFile
2019-10-07 18:11:19 -03:00
Marcel Admiraal
40197685bb
Remove circular dependency between Vector3 and Basis.
2019-10-07 16:26:27 +02:00
Hugo Locurcio
3b8004865d
Remove redundant condition in String::_humanize_digits()
2019-10-04 18:07:06 +02:00
Andrii Doroshenko (Xrayez)
a0d00c0e99
Bind the String::humanize_size
method
...
The method signature is also changed to use `uint64_t` instead of `size_t`
for it to be Variant-compatible.
2019-10-04 15:51:13 +03:00
Rémi Verschelde
00417675fa
Merge pull request #32524 from qarmin/fix_string_builder_null_memcpy
...
Don't add to StringBuilder empty String
2019-10-03 21:24:04 +02:00
qarmin
2bc7f9e545
Fix small memory leak in PackedSourcePCK::try_open_pack
2019-10-03 19:45:41 +02:00
qarmin
df03d9c2c5
Don't add to StringBuilder empty String
2019-10-03 19:14:29 +02:00
Alexander Holland
a681c90009
Make Rect2.encloses return true on same size
2019-10-02 03:27:48 +02:00
Bojidar Marinov
0b251997bb
Ensure object metadata is unique
...
Closes #32415
2019-09-28 18:15:23 +03:00
Shiqing
c2b824687d
Reduce memory usage for edges in A* and add tests
2019-09-28 16:17:52 +08:00
Rémi Verschelde
7a67ae01a4
Merge pull request #32249 from hbina/a_star_ignore_disabled
...
Add option to consider disable points
2019-09-27 22:41:49 +02:00
Hanif Bin Ariffin
7b3790d2cc
Add option to consider disable points
...
Previously, disabled points will not be considered when performing
get_closest_point. This commit changes that by introducing an additional
flag for this behavior. Related issue: #31814
2019-09-27 11:24:59 -04:00
Rémi Verschelde
202440acce
Merge pull request #31932 from huisedenanhai/master
...
make core/Reference thread safe
2019-09-26 11:26:05 +02:00
Ruslan Mullayanov
b4c927b514
Added an exit code to the blocking mode of OS::execute
...
Updated documentation accordingly.
Fixes #31881 .
2019-09-26 08:12:07 +02:00
Rémi Verschelde
084481b79d
Merge pull request #32230 from kawa-yoiko/oa-backward-shift
...
Implement backward shift deletion for OAHashMap
2019-09-26 08:03:46 +02:00
Fabio Alessandrelli
dcf0a60a52
Merge pull request #32228 from damianday/patch-1
...
TCP is_connected_to_host comparison error
2019-09-26 03:02:14 +02:00
Damian Day
5631850152
Update stream_peer_tcp.cpp
2019-09-25 23:45:32 +01:00
Rémi Verschelde
28fcc5e25a
Merge pull request #32291 from Dragoncraft89/add_load_resource_flag
...
Add flag to control the replacement of files by ProjectSettings.load_resource_pack
2019-09-25 16:30:01 +02:00
Florian Kothmeier
aae25abf30
Add flag to control the replacement of files by ProjectSettings.load_resource_pack
2019-09-25 15:29:59 +02:00
Rémi Verschelde
dec10dd776
Merge pull request #32051 from qarmin/some_error_explanation
...
Added some obvious errors explanations
2019-09-25 11:51:54 +02:00
qarmin
17732fe698
Added some obvious errors explanations
2019-09-25 10:28:50 +02:00
Tomasz Chabora
46e1c0670e
Don't try to slice empty arrays
2019-09-24 21:33:09 +02:00
Rémi Verschelde
823c3def72
Fix copyright headers and style issues
2019-09-24 11:52:06 +02:00
Rémi Verschelde
4f294b958f
doc: Sync classref with current source
...
Fix a few missing bindings or unspecified argument names and default values.
2019-09-24 11:52:06 +02:00
Rémi Verschelde
ef2a7834c9
Merge pull request #31883 from aole/create-string-function-repeat
...
Create a GDScript String function repeat
2019-09-24 11:50:58 +02:00
Rémi Verschelde
ed18e3f195
Merge pull request #32273 from Calinou/humanize-size-fix-i18n
...
Fix i18n in `String::humanize_size()`
2019-09-23 15:57:18 +02:00
Rémi Verschelde
2114898cb5
Merge pull request #31172 from creikey/add-array-slicing
...
Add array slice method
2019-09-23 15:26:27 +02:00
Rémi Verschelde
159470df08
Merge pull request #32275 from godotengine/skin_support
...
Added skin support and simplified APIs to override bone position + glTF 2.0 import fixes
2019-09-23 15:02:15 +02:00
Hugo Locurcio
a51e8b1ff0
Fix i18n in String::humanize_size()
...
Calls to `RTR()` must be added to each string so the PO file generator
can pick them up.
2019-09-23 13:54:10 +02:00
Rémi Verschelde
46f909f8af
Merge pull request #32054 from puthre/variant_ref_optim
...
Optimized variant reference function.
2019-09-23 11:36:40 +02:00
Rémi Verschelde
393a0152ea
Merge pull request #32055 from qarmin/some_code_fixes
...
Changed some code found by Clang Tidy and Coverity
2019-09-23 10:00:31 +02:00
Rémi Verschelde
b94460b328
Merge pull request #32032 from nekomatata/encrypted-file-get-path
...
Implemented get_path() & get_path_absolute() for FileAccessEncrypted
2019-09-23 09:32:58 +02:00
qarmin
50be65bf43
Changed some code found by Clang Tidy and Coverity
2019-09-22 18:45:08 +02:00
Shiqing
78bee16e05
Implement backward shift deletion for OAHashMap
2019-09-21 14:32:40 +08:00
Marios Staikopoulos
11e09e59d1
GLTF2 Import Fixes - Skin(s) to Skeleton - Skin Support
2019-09-20 23:08:58 -07:00
Damian Day
748c9bc205
TCP is_connected_to_host comparison error
...
We was returning true when the state was not connected, so we would never return true when the state was connected.
2019-09-21 02:18:46 +01:00
fhuya
a7712cc9e4
Add new events and accompanying logic to notify when the app is paused and resumed on Android devices.
2019-09-19 13:29:49 -07:00
Cameron Reikes
757c509437
Add array slice method
2019-09-14 13:08:28 -07:00
Shiqing
98136418ac
Improve support for directed graphs in AStar
2019-09-11 15:41:14 +08:00
Valentin Zagura
6a36779e89
Optimized variant reference function.
...
Optimized critical execution path in Variant::reference by removing expensive and unnecessary call to clear for atomic types.
2019-09-09 10:39:40 +01:00
PouleyKetchoupp
afe34344a6
Implemented get_path() & get_path_absolute() for FileAccessEncrypted
2019-09-07 19:22:33 +02:00
Hugo Locurcio
9a94fe7d26
Improve the String::humanize_size()
method
...
- Use "B" insted of "Bytes" to be more compact
- Use suffixes that denote a binary prefix
- Make suffixes localizable
This removes the need for the custom
`EditorNetworkProfiler:_format_bandwidth()` method.
2019-09-05 19:48:46 +02:00
Fabio Alessandrelli
768d637a1b
Merge pull request #31870 from JFonS/add_network_profiler
...
Add network profiler
2019-09-05 16:34:36 +02:00
jfons
8244f535cd
Add network profiler
2019-09-05 09:48:36 +02:00
huisedenanhai
124e51fdde
make core/Reference thread safe
2019-09-04 12:17:07 +08:00
iwek7
617797c47c
Adds skip-breakpoints feature
2019-09-03 20:49:09 +02:00
Bhupendra Aole
073f625a91
Create a GDScript String function repeat
...
Fixes #30610
2019-09-03 13:06:13 -04:00
Rémi Verschelde
a00a9e868e
Merge pull request #31021 from willnationsdev/script-reflection
...
Expose Script reflection methods to scripting API.
2019-09-03 18:33:55 +02:00
Rémi Verschelde
726711d8c5
Merge pull request #31756 from raphael10241024/fast_aabb_transform
...
a faster function to transform aabb
2019-09-03 12:26:43 +02:00
Rémi Verschelde
00258684d3
Merge pull request #31915 from KoBeWi/xformers
...
Don't transform global position of mouse input
2019-09-03 12:05:27 +02:00
Tomasz Chabora
e21cc3cc8d
Don't transform global position of mouse input
2019-09-03 00:58:10 +02:00
Aaron Franke
f8b4cf0fc4
Check for exact equality before approximate equality
2019-09-01 14:02:14 -04:00
Andrii Doroshenko (Xrayez)
08272585e9
Remove redundant transform method in Geometry singleton
...
Transform2D's xform method can be used instead which handles
`PoolVector2Array` now (as well as 3D version).
2019-09-01 14:34:51 +03:00
Rémi Verschelde
c693b5a5bd
Merge pull request #31761 from Xrayez/trans2d-vector2array
...
Add transform methods for PoolVector*Array
2019-09-01 13:07:25 +02:00
Rémi Verschelde
69de1eca01
Merge pull request #31667 from YeldhamDev/geometry_point_circle_cleanup
...
Add 'is_point_in_circle()' to Geometry class, and general file cleanup
2019-09-01 12:59:49 +02:00
Rémi Verschelde
c8ae8f2fb1
Revert "Add __atomic_* operators support for atomic operations"
2019-09-01 12:19:44 +02:00
qarmin
b244ab4acc
Fix memory leak in ResourceFormatSaverBinary::save
2019-08-30 13:46:05 +02:00
Andrii Doroshenko (Xrayez)
07cff56f48
Add transform methods for PoolVector*Array
...
Similarly to `Vector2` and `Rect2` transforms in 2D and Vector3, Plane,
and AABB in 3D. PoolVector2Array and PoolVector3Array were the only
missing Variant types in both Transform2D and Transform respectively.
2019-08-29 14:47:33 +03:00
RaphaelHunter
e7febd72d6
a faster funtion to transform aabb
2019-08-29 14:17:08 +08:00
Hugo Locurcio
5bd01bf637
Add a project description setting
...
The description is displayed as a tooltip when hovering the project
in the Project Manager. It can span multiple lines.
This partially addresses #8167 .
2019-08-28 22:34:29 +02:00
Aaron Franke
34ab6549b1
[Mono] Various Color improvements
...
I also slid in a fix to C++ Vector3 > and >=
2019-08-27 22:05:18 -04:00
Michael Alexsander Silva Dias
6cc54a5864
Add 'is_point_in_circle()' to Geometry class, and general file cleanup
2019-08-27 18:01:05 -03:00
Rémi Verschelde
6b7117ce3f
Merge pull request #31662 from profan/perf/astar-reserve
...
Allow to reserve space for nodes in A* and elements in OAHashMap explicitly.
2019-08-27 10:09:08 +02:00
Robin Hübner
1031833fb0
allow to reserve space in OAHashMap explicitly and also in AStar.
...
* also handle overflow occurring in _get_probe_length
2019-08-27 00:38:35 +02:00
Rémi Verschelde
2f63811c9a
Merge pull request #25656 from bruvzg/macos_multi_instances
...
[macOS] Add ability to open multiple editor instances and global/dock menu access
2019-08-26 22:04:37 +02:00
Andrii Doroshenko (Xrayez)
c362527cb5
Modify outdated comments and error messages regarding indexed images
...
Godot doesn't support indexed images anymore (FORMAT_INDEXED),
so those are removed to avoid any confusion.
2019-08-26 18:21:19 +03:00
bruvzg
db6d4352ea
[macOS] Add methods to modify global and dock menus. Add ability to open multiple editor/project manager instances, recent/favourite project list to project manager dock menu and opened scene list to editor dock menu.
2019-08-26 16:45:49 +03:00
qarmin
33c62db7af
Add forgotten pointer checking
2019-08-24 13:34:14 +02:00
Rémi Verschelde
51d50e167d
Merge pull request #31094 from aaronfranke/vector-sign-mod-etc
...
Add Vector2/3 sign and posmod functions, axis, docs, misc additions
2019-08-23 09:07:47 +02:00
Rémi Verschelde
3a53e792ef
Merge pull request #31513 from qarmin/int_overflow
...
Prevent int overflow and underflow
2019-08-23 09:05:25 +02:00
Andrii Doroshenko (Xrayez)
f013596760
Allow to define and load script templates per project
...
Previously it was only possible to create custom script templates per
editor instance which could lead to certain name collisions, but now one
can create such templates per project tailored for specific use cases.
The default path to search for custom script templates is defined in
project settings via `editor/script_templates_search_path` setting as
`res://script_templates` path, yet this can be configured per project.
Templates have at most two origins now:
1. Project-specific, defined in `ProjectSettings`, for instance:
- res://script_templates/
2. Editor script templates, for instance:
- %APPDATA%/Godot/script_templates/
As script templates can have the same name over different paths,
the override mechanism was also added, enabling project-specific
templates over the editor ones.
2019-08-22 20:51:30 +03:00
qarmin
538405f9c7
Prevent int overflow and underflow
2019-08-22 17:22:35 +02:00
Rémi Verschelde
7402fd2c56
Revert "Feature: Add SHA256 for PoolByteArray"
...
This reverts commit e2c3bbabb0
.
This was superseded by #29871 which adds more crypto features with a
dedicated interface.
Since this commit was never in a stable release (merged during 3.2 dev),
we revert it to avoid having to deprecate it in favor of the Crypto API.
See https://github.com/godotengine/godot/pull/31187#issuecomment-523377965
2019-08-22 13:44:57 +02:00
Rémi Verschelde
1a4dbd9ee2
Merge pull request #31437 from volzhs/vibrate-mobile
...
Support vibration for Android and iOS
2019-08-21 21:10:22 +02:00
Rémi Verschelde
99980d856b
Merge pull request #29871 from Faless/crypto/initial_pr
...
More Crypto, SSL server, crt/key as Resource, HashingContext
2019-08-21 18:03:03 +02:00
Fabio Alessandrelli
ce5a3f56a6
Rewrite StreamPeerSSL with SSLContext helper class
...
connect_to_stream now accepts optional parameter to specify which
certificates to trust.
Implement accept_stream (SSL server) with key/cert parameters to specify
the RSA key and X509 certificate resources.
2019-08-21 16:59:38 +02:00
Fabio Alessandrelli
cb31b8797e
Add hashing context class
2019-08-21 16:59:38 +02:00
Fabio Alessandrelli
3495d1bfa0
Add hex_encode function to PoolByteArray
2019-08-21 16:59:38 +02:00
Fabio Alessandrelli
1b36aa662c
Add Crypto custom class
2019-08-21 16:59:35 +02:00
volzhs
4061e5bb75
Support vibration for Android and iOS
2019-08-21 23:38:53 +09:00
Rémi Verschelde
05a4310899
Merge pull request #31402 from profan/perf/astar-improvements
...
A* performance improvements, use OAHashMap.
2019-08-21 11:27:12 +02:00
Rémi Verschelde
7b37321ae3
Merge pull request #31499 from nekomatata/fix-new-project-metadata
...
Setting project metadata doesn't fail when project_metadata.cfg doesn't exist
2019-08-21 08:54:32 +02:00
Robin Hübner
4bac393549
astar performance improvements, use oahashmap
2019-08-21 08:47:55 +02:00
PouleyKetchoupp
b49226e085
Support for file not found in ConfigFile::Load and handle a few specific cases
...
EditorSettings::set_project_metadata: creates project_metadata.cfg if it doesn't exist
EditorPlugin::get_config: removed (not used)
Fixes #31444
2019-08-21 08:32:55 +02:00
Rémi Verschelde
a8db4c848d
Merge pull request #31395 from ptrojahn/floatsarenasty
...
Replace is_zero_approx(A.distance_to(B)) with A==B
2019-08-20 12:54:40 +02:00
Paul Trojahn
7c9c6df7e4
Replace is_zero_approx(A.distance_to(B)) with A==B
...
Related to #22988 (Fixes the holes in the shape of
the first comment)
2019-08-19 18:16:58 +02:00
Fabio Alessandrelli
c19871af6d
Move CryptoCore to it's own folder.
...
Crypto classes will be placed in core/crypto.
2019-08-19 16:31:05 +02:00
Fabio Alessandrelli
5cb41faece
Fix CryptoCore signatures, add SHA1 context.
...
Fix hash size in SHA256 signature
Fix source parameter in hash context update function to be const.
Add SHA1 hash context.
2019-08-19 16:29:37 +02:00
Rémi Verschelde
5c853a45e6
Merge pull request #31423 from Calinou/improve-node-signal-group-tooltip
...
Improve the scene tree signals/groups tooltip
2019-08-18 10:55:16 +02:00
Aaron Franke
092346d82b
Add Vector2/3 sign and posmod functions, misc additions
...
Also make the docs more consistent, add Axis enum to Vector2, add > and >=. and C# also gets % and an override for vector-vector mod.
2019-08-17 18:31:55 -04:00
Rémi Verschelde
ad8746e0de
DirAccessPack: Fix dir_exists and file_exists for res:// paths
...
Both methods check against containers using relative paths as index,
so the `res://` part needs to be stripped.
Fixes #26009 .
2019-08-17 19:03:28 +02:00
Hugo Locurcio
c62302a432
Improve the scene tree signals/groups tooltip
...
The tooltip now displays the number of connections and groups
that are assigned to the hovered node.
2019-08-17 14:20:16 +02:00
Rémi Verschelde
d3153c28f0
Replace last occurrences of 'ERR_EXPLAIN' with 'ERR_FAIL_*_MSG'
...
The last remaining ERR_EXPLAIN call is in FreeType code and makes sense as is
(conditionally defines the error message).
There are a few ERR_EXPLAINC calls for C-strings where String is not included
which can stay as is to avoid adding additional _MSGC macros just for that.
Part of #31244 .
2019-08-17 13:31:22 +02:00
Braden Bodily
71d71d55b5
Replace 'ERR_EXPLAIN' with 'ERR_FAIL_*_MSG' in 'core/' and 'editor/'
...
Condensed some if and ERR statements. Added dots to end of error messages
Couldn't figure out EXPLAINC. These files gave me trouble: core/error_macros.h, core/io/file_access_buffered_fa.h (where is it?),
core/os/memory.cpp,
drivers/png/png_driver_common.cpp,
drivers/xaudio2/audio_driver_xaudio2.cpp (where is it?)
2019-08-17 12:33:15 +02:00
Davide Busterna
5ba632a73b
Fix image offset when upscaling with Lanczos
2019-08-15 10:54:38 +02:00
Rémi Verschelde
b030834b63
Merge pull request #31321 from julianaito/master
...
Add __atomic_* operators support for atomic operations
2019-08-15 02:55:39 +02:00
Charlène
3185a1b274
Replace legacy __sync atomic operations with newer __atomic ones
2019-08-14 15:56:02 +02:00
Rémi Verschelde
6c607c3564
Merge pull request #31266 from IAmActuallyCthulhu/pr/remove-redundant-author-comments
...
Remove redundant author doc comments
2019-08-14 13:45:54 +02:00
Robin Hübner
7092dd9d58
remove unused self list include from astar
2019-08-13 18:28:56 +02:00
Rémi Verschelde
e7d484982e
Merge pull request #31292 from iwek7/fixDebuggerInspectionForNodes
...
Fixes issue with debug inspecing of nodes that are not in the scene tree
2019-08-13 08:24:01 +02:00
miwanczuk
98a3b2e5f4
Fixes issue when inspecting nodes that are not in the tree
2019-08-12 17:06:44 +02:00
Rémi Verschelde
37a16fee05
Export: Remove temp files from cache after export
...
So far we left most temporary files lying around, so this attempts to
fix that.
I added a helper method to DirAccess to factor out the boilerplate of
creating a DirAccess, checking if the file exists, remove it or print
an error on failure.
2019-08-12 13:31:59 +02:00
Rémi Verschelde
5441aaf768
Merge pull request #31228 from aaronfranke/identity-constants
...
Add Basis constants and format Transform constants
2019-08-12 12:42:30 +02:00
IAmActuallyCthulhu
82b9557803
Remove redundant author doc comments
2019-08-12 04:26:38 -05:00
IAmActuallyCthulhu
a940ed781c
Remove old doc comments in image_loader header
2019-08-10 08:13:44 -05:00
Aaron Franke
85f13a0d24
Add Basis constants and format Transform constants
2019-08-09 11:34:54 -07:00
Rémi Verschelde
22b42c3315
Merge pull request #30893 from profan/fix/err-explain
...
Implement error macros that come with an error message, replacing ERR_EXPLAIN.
2019-08-08 16:28:06 +02:00
Robin Hübner
8affda0916
implement accompanying error macros that come with an error message, to replace ERR_EXPLAIN usage.
2019-08-08 15:05:59 +02:00
Rémi Verschelde
274bac2783
Merge pull request #30934 from santouits/debugg
...
Hopefully fix the random crashes with threads
2019-08-08 14:50:47 +02:00
Rémi Verschelde
e578c1fef8
Merge pull request #31195 from bojidar-bg/31143-funcref-call_funcv
...
Add FuncRef.call_funcv
2019-08-08 11:24:27 +02:00
Bojidar Marinov
7123fab771
Add FuncRef.call_funcv
...
Closes #31143
2019-08-08 11:58:57 +03:00
Rémi Verschelde
b33042507b
Translation: Fix logic bug finding match for regional locales
...
The match test was inverted. The rest of the changes
are documentation and cleanup.
Fixes #26346 and fixes #31192 .
2019-08-08 10:15:55 +02:00
Rémi Verschelde
1d5ae6da5b
Merge pull request #31047 from Zylann/save_exr
...
Add Image.save_exr()
2019-08-08 08:53:02 +02:00
Marc Gilleron
cd2de77b04
Add Image.save_exr()
2019-08-07 21:17:47 +01:00
Rémi Verschelde
ba541bceca
Merge pull request #31077 from qarmin/coverity_bugs
...
Change some code proposed by Coverity and Cppcheck
2019-08-07 13:49:33 +02:00
qarmin
e0b5b21863
Add some code changes/fixes proposed by Coverity and Clang Tidy
2019-08-07 12:54:30 +02:00
Rémi Verschelde
365994a630
Merge pull request #30998 from Calinou/cap-warnings-errors-per-second
...
Cap the number of warnings/errors per second rather than per frame
2019-08-06 15:21:20 +02:00
TGRCDev
c6f7015bca
Fixed EOF flag not resetting on seek back
2019-08-05 18:20:18 -07:00
Aaron Franke
a9c10450bd
[Core] [Mono] Optimize Wrap functions
...
Use is_zero_approx(), avoid a negative, and also rename "rng" to "range".
2019-08-04 20:38:38 -07:00
willnationsdev
88f79802f6
Expose Script reflection methods to scripting API.
2019-08-01 14:13:40 -05:00
Hugo Locurcio
47c615caf3
Cap the number of warnings/errors per second rather than per frame
...
This reproduces the behavior used for printing when using the remote
debugger. The default limit is 100 errors and 100 warnings per second,
which makes it possible to display much more GDScript warnings
before overflowing.
This also adds a "Too many warnings" message, so that warnings
don't look like errors when overflowing anymore.
This closes #21896 .
2019-07-31 17:29:26 +02:00
santouits
13efc1bb06
Hopefully fix the random crashes with threads
2019-07-30 19:08:33 +03:00
Aaron Franke
7dbbb5eac7
[Mono] Deprecate Set methods
...
These silently fail, so they should be removed. I accidentally added most of these last year, trying to make everything else consistent with Quat, sorry!
Also, a few tiny nitpicking changes are included, like whitespace and misspellings.
2019-07-28 17:49:22 -04:00
Cameron Reikes
b3cb58e7b3
Some resources are freed before they are saved
...
- PackedScenes freed before saved, so their path cache is lost
- Solution is to move data to persistent static map
- This patch will fix #30538
2019-07-25 17:21:47 -07:00
Rémi Verschelde
43238bb59a
DirAccess: Drop compat get_next(bool *is_dir) which was hidden
...
Fixes this warning:
```
./core/os/dir_access.h:74:17: warning: 'virtual String DirAccess::get_next(bool*)' was hidden [-Woverloaded-virtual]
```
Part of #30790 .
2019-07-25 11:09:57 +02:00
Rémi Verschelde
1481d299ea
Merge pull request #30776 from akien-mga/editor-configurable-float-step
...
Inspector: Make default float step configurable
2019-07-25 10:33:45 +02:00
Rémi Verschelde
336846e547
Inspector: Fix PROPERTY_HINT_SPRITE_FRAME not behaving as RANGE
...
This was a regression in 3.1 and later from the new inspector, where
PROPERTY_HINT_SPRITE_FRAME was not fully re-implemented. It's meant to
be a normal PROPERTY_HINT_RANGE which also automatically increments its
value when keyed in the animation player.
To avoid code duplication, I made the frames properties use the actual
PROPERTY_HINT_RANGE and introduced a PROPERTY_USAGE_KEYING_INCREMENTS
usage flag instead.
2019-07-25 09:29:51 +02:00
Rémi Verschelde
aa062c54fc
Merge pull request #25090 from Chaosus/string_count
...
Added String.count method
2019-07-24 08:32:42 +02:00
Michael Alexsander Silva Dias
12ae7a4c02
Update some dead links in the codebase
2019-07-23 21:06:12 -03:00
Chaosus
080c0bb7fe
Added count method to String
2019-07-23 18:55:54 +03:00
Rémi Verschelde
d844e30614
Inspector: Make default float step configurable
...
Also allow lifting the decimal step formatting with a hint range step
of 0. A new `range_step_decimals()` is added for this to avoid breaking
compatibility on the general purpose `step_decimals()` (which still
returns 0 for an input step of 0).
Supersedes #25470 .
Partial fix for #18251 .
2019-07-23 17:31:38 +02:00
Rémi Verschelde
4c943cca2c
Merge pull request #30716 from qarmin/fixed_static_analiser_code
...
Fix some code found by Coverity Scan and PVS Studio
2019-07-23 15:08:44 +02:00
qarmin
aab8da25ad
Fix some code found by Coverity Scan and PVS Studio
2019-07-23 09:14:31 +02:00
Rémi Verschelde
9f5b77acc9
Revert "Expose "meta" to the Inspector"
2019-07-22 12:03:57 +02:00
Ignacio Etcheverry
2c85439da0
Make it a build error if a GetTypeInfo specialization cannot be resolved
...
Previously it was a runtime error message.
2019-07-22 00:08:35 +02:00
Rémi Verschelde
60efd67034
Merge pull request #30693 from Chaosus/lerp_angle
...
Added lerp_angle built-in function
2019-07-20 13:37:13 +02:00
Rémi Verschelde
d15cf7b672
Merge pull request #30576 from qarmin/lgtm_coverage
...
Changed some code reported by LGTM and Coverity
2019-07-20 12:00:13 +02:00
Chaosus
6694c119d0
Added lerp_angles built-in function
...
Co-authored-by: Xrayez <https://github.com/Xrayez >
Co-authored-by: DleanJeans <https://github.com/DleanJeans >
2019-07-20 12:59:41 +03:00
qarmin
6cbaf7662f
Changed some code showed in LGTM and Coverage
2019-07-20 08:09:57 +02:00
Rémi Verschelde
c317a3ce16
Merge pull request #30354 from LikeLakers2/multinodeedit-same-type-properties
...
MultiNodeEdit now only shows properties with the exact same PropertyInfo data
2019-07-19 17:58:17 +02:00
Rémi Verschelde
f796779f7c
Merge pull request #23310 from aaronfranke/posmod-int
...
Add integer posmod and rename default arg names
2019-07-19 15:07:49 +02:00
Rémi Verschelde
2ca3e47d66
Merge pull request #22642 from YeldhamDev/inspector_metadata
...
Expose "meta" to the Inspector
2019-07-19 14:39:23 +02:00
Aaron Franke
a60f242982
Add integer posmod and rename default arg names
...
"posmod" is the integer version of "fposmod". We do not need a "mod" because of the % operator.
I changed the default arg names from "x" and "y" to "a" and "b" because they are not coordinates. I also changed pow's arg names to "base" and "exp". Also, I reorganized the code in the VS built-in funcs switch statement.
2019-07-18 16:33:43 -04:00
Rémi Verschelde
20a3bb9c48
Merge pull request #30226 from lawnjelly/interpolate
...
Add access to interpolation fraction for fixed timestep interpolation
2019-07-18 15:44:14 +02:00
Rémi Verschelde
dfe228a865
Merge pull request #30341 from Toshiwoz/master
...
when doing Vector3 slerp it is not necessary to have it normalized.
2019-07-12 10:27:38 +02:00
lawnjelly
bf6c301b9c
Add access to interpolation fraction for fixed timestep interpolation
...
Addresses #30068
This is a prerequisite for allowing proper support for fixed timestep interpolation, exposing the interpolation fraction to the engine, modules and gdscript.
The interpolation fraction is the fraction through the current physics tick at the time of the current frame.
2019-07-11 08:25:26 +01:00
Rémi Verschelde
34d7484039
Merge pull request #30455 from qarmin/const_reference
...
Pass by reference to const
2019-07-10 15:43:15 +02:00
qarmin
01cc7a996b
Use reference to constant in functions
2019-07-10 11:54:12 +02:00
Rémi Verschelde
68081b3f6e
Merge pull request #30188 from Andrettin/Method-Binding-Free-Function-Support
...
Method Binding Free Function Support
2019-07-09 22:33:43 +02:00
Andrettin
e2a3ed3cd8
Added support for passing functions pointers (with a class instance as the first parameter) to method bindings
2019-07-09 21:18:39 +02:00
Rémi Verschelde
2d77390170
Merge pull request #30433 from akien-mga/cryptocore-string-escape
...
SCons: Fix MBEDTLS_CONFIG_FILE string escape
2019-07-09 08:27:40 +02:00
Rémi Verschelde
f1a37be69c
SCons: Fix MBEDTLS_CONFIG_FILE string escape
...
Fixes #30431 , regression from #30277 .
2019-07-08 18:05:48 +02:00
Fabio Alessandrelli
2f91e250f6
Add NULL-terminator the string passed to strtol.
...
This is actually expected by the function although it was apparently
working in GCC without the terminator, it breaks (at least some) clang
versions.
2019-07-08 17:15:10 +02:00
Rémi Verschelde
36424a6763
Merge pull request #30422 from Faless/net/tcp_connect_timeout
...
Add TCP connect timeout.
2019-07-08 13:39:00 +02:00
Fabio Alessandrelli
32da4d7819
Add TCP connect timeout.
...
Default timeout is 30 seconds (i.e. after 30 seconds of calling
connect_to_host if the TCP peer is not connected the connection will
error out).
This value can be configured in project settings:
`network/limits/tcp/connect_timeout_seconds`
2019-07-08 09:18:46 +02:00
Rémi Verschelde
74b00d1bea
Merge pull request #30392 from hbina/redundant_check_pool_vector
...
Removed a redundant check in PoolVector
2019-07-08 08:31:14 +02:00
Rémi Verschelde
af80182016
Merge pull request #30407 from qarmin/small_fixess
...
Fixes minor issues found by static analyzer
2019-07-08 08:16:50 +02:00
hbina085
ff348e48f9
Removed a redundant check in PoolVector
...
The set method of PoolVector<T> performs an indexing check twice.
2019-07-07 19:04:56 -04:00
qarmin
9a77d748c0
Fixes minor issues found by static analyzer
2019-07-07 23:08:51 +02:00
Rémi Verschelde
44db85d6f6
Merge pull request #30382 from simonpuchert/geo-opt
...
Some small optimizations in core/math/geometry.h.
2019-07-06 21:07:52 +02:00
Simon Puchert
4b78e17b15
Optimize get_closest_point_to_segment*.
...
By combining all scalar factors we can get rid of a scalar * vector
multiplication and a square root operation, since the resulting formula
only uses the squared length.
2019-07-06 17:41:13 +02:00
Ibrahn Sahir
4e4697b1c4
Added release function to PoolVector::Access.
...
For clarity, assign-to-release idiom for PoolVector::Read/Write
replaced with a function call.
Existing uses replaced (or removed if already handled by scope)
2019-07-06 12:04:27 +01:00
LikeLakers2
e86f6faf64
MultiNodeEdit now only shows properties with the exact same PropertyInfo data
2019-07-05 17:40:06 -04:00
Toshiwo
3aff645114
when doing Vector3 slerp it is not necessary to have it normalized.
2019-07-05 11:17:52 -05:00
Rémi Verschelde
6e9cb44004
Merge pull request #30282 from neikeq/editor_in_cs_equals_win
...
Re-write mono module editor code in C#
2019-07-05 10:29:19 +02:00
Rémi Verschelde
a149e412f7
Merge pull request #24086 from RandomShaper/bundle-pck-to-executable
...
Enhance game export
2019-07-05 10:28:29 +02:00
Ignacio Etcheverry
0639946c72
Fix localize_path not always working
...
We make sure the resource dir path ends with a trailing '/' for safety reasons, so we must make sure the path we compare it to does so as well.
2019-07-05 09:38:28 +02:00
Ignacio Etcheverry
270af6fa08
Re-write mono module editor code in C#
...
Make the build system automatically build the C# Api assemblies to be shipped with the editor.
Make the editor, editor player and debug export templates use Api assemblies built with debug symbols.
Always run MSBuild to build the editor tools and Api assemblies when building Godot.
Several bugs fixed related to assembly hot reloading and restoring state.
Fix StringExtensions internal calls not being registered correctly, resulting in MissingMethodException.
2019-07-05 09:38:23 +02:00
Rémi Verschelde
42a0148f17
Merge pull request #30296 from neikeq/issue-30127
...
Expose ResourceImporter to the scripting API
2019-07-05 09:20:05 +02:00
Rémi Verschelde
259a3fb1e9
Merge pull request #29744 from GodotExplorer/gdscript-completion-icons
...
Show icons for code completion options
2019-07-05 08:00:40 +02:00
Geequlim
10cfd87414
Show icons for code completion options
2019-07-05 09:25:50 +08:00
Ignacio Etcheverry
307eb34be0
Expose ResourceImporter to the scripting API
...
Fixes #30127
2019-07-04 16:11:57 +02:00
Rémi Verschelde
550f436f8f
Merge pull request #30263 from Faless/ws/wslay_pr
...
Use wslay as a WebSocket library
2019-07-04 15:55:33 +02:00
Fabio Alessandrelli
9e303ef71c
WebSocket module now uses wslay library.
...
Both client and server are supported on native builds (as usual).
SSL server is still not supported, but will soon be possible with this
new library.
The API stays the same, we just need to work out potential issues due to
this big library switch.
2019-07-04 15:03:04 +02:00
Geequlim
ed7ed52151
Parse more informations for code completion
2019-07-04 14:00:14 +08:00
Pedro J. Estébanez
40f4d3cf0f
Add embedded PCK option to PC platforms
...
The basic point is as in 2.1 (appending the PCK into the executable), but this implementation also patches a dedicated section in the ELF/PE executable so that it matches the appended data perfectly.
The usage of integer types is simplified in existing code; namely, using plain `int` for small quantities.
2019-07-03 21:58:12 +02:00
Fabio Alessandrelli
c13be79594
Add TCP Server is_listening method
2019-07-03 18:42:46 +02:00
Fabio Alessandrelli
24c52f1c2e
Add b64 to string helper in CryptoCore
2019-07-03 18:42:46 +02:00
Fabio Alessandrelli
6c512e21a9
Add sha1 functions to string (using new CryptoCore)
2019-07-03 18:42:46 +02:00
Rémi Verschelde
b0d41847ed
SCons: Use CPPDEFINES instead of CPPFLAGS for pre-processor defines
...
It's the recommended way to set those, and is more portable
(automatically prepends -D for GCC/Clang and /D for MSVC).
We still use CPPFLAGS for some pre-processor flags which are not
defines.
2019-07-03 09:59:04 +02:00
Fabio Alessandrelli
c798173332
Fix editor crash when StreamPeerSSL is unavilable.
...
The fix for EditorNode is a bit hacky, but the handling of the buttons
and features there is hacky too (based on enums that might not reflect
the actual state).
2019-07-02 15:34:34 +02:00
Rémi Verschelde
e9d624d7ce
Merge pull request #30239 from Faless/crypto/crypto_core
...
CryptoCore class to access to base crypto utils.
2019-07-02 14:52:43 +02:00
Fabio Alessandrelli
564d93ff10
CryptoCore class to access to base crypto utils.
...
Godot core needs MD5/SHA256/AES/Base64 which used to be provided by
separate libraries.
Since we bundle mbedtls in most cases, and we can easily only include
the needed sources if we so desire, let's use it.
To simplify library changes in the future, and better isolate header
dependencies all functions have been wrapped around inside a class in
`core/math/crypto_base.h`.
If the mbedtls module is disabled, we only bundle the needed source
files independently of the `builtin_mbedtls` option.
If the module is enabled, the `builtin_mbedtls` option works as usual.
Also remove some unused headers from StreamPeerMbedTLS which were
causing build issues.
2019-07-02 12:36:27 +02:00
Rémi Verschelde
98879be276
Merge pull request #27510 from fire/screenshot_editor
...
Add editor screenshot on control - f12.
2019-07-02 11:30:16 +02:00
Rémi Verschelde
c486b8dac0
Merge pull request #30223 from qarmin/properly_delete_thread
...
Remove thread to prevent memory leak
2019-07-02 11:26:29 +02:00
K. S. Ernest (iFire) Lee
05de0eafab
Add editor screenshot on control - f12.
2019-07-01 13:39:21 -07:00
qarmin
6edd06e566
Remove thread to prevent memory leak
2019-07-01 15:07:06 +02:00
Rémi Verschelde
6b30f284a0
Merge pull request #29980 from Dentrax/directed-by-qarmin
...
Fix some editor crashes
2019-07-01 14:59:29 +02:00
Rémi Verschelde
b0ce9401ff
Merge pull request #30126 from qarmin/remove_unnecessary_code
...
Remove unnecessary code and add some error explanations
2019-07-01 14:32:04 +02:00
Furkan Türkal
7d8d337b2c
fix some crashes
2019-07-01 14:28:29 +03:00
qarmin
3c154eb93b
Remove unnecessary code and add some error explanations
2019-07-01 12:59:42 +02:00
Rémi Verschelde
d17eac735c
Merge pull request #29815 from NilsIrl/plus_file_1
...
Replace ` + "/" + ` with `String::file_add()`
2019-07-01 12:06:35 +02:00
Rémi Verschelde
0db138a621
doc: Enforce default values for OS properties
...
Otherwise we end up fetching values from the current OS instance
when running doctool, so they would change based on the system or
even simply due to changes to the system clipboard.
2019-06-30 13:58:07 +02:00
Rémi Verschelde
850a54a2a5
Fix uninitialized variables in Line2D, JSONParseResult and TileMap
2019-06-30 13:58:07 +02:00
Rémi Verschelde
b4aba3ae7c
Merge pull request #30177 from hbina/use_FALLTHROUGH_macro
...
Applied some of FALLTHROUGH macro usage from #30122
2019-06-29 23:40:08 +02:00
hbina085
9f0c6a6009
Many fallthrough switch cases now have the FALLTHROUGH macro to tell the compiler that this is intended.
2019-06-29 16:08:48 -04:00
Bojidar Marinov
55234d62b0
Remove bogus nulls from generated default values
...
Also, fix crash in PluginScript destructor.
2019-06-29 15:51:33 +03:00
Rémi Verschelde
1df38f2372
Merge pull request #30112 from AgentEnder/master
...
AStar get_current_point enabled consideration
2019-06-29 13:45:17 +02:00
Rémi Verschelde
52355c638b
Merge pull request #29380 from bojidar-bg/16086-docs-default-value
...
Add default values to the editor help, docs, and generated RST
2019-06-29 12:28:30 +02:00
Craigory V Coppola
dc9659a9bf
AStar get_closest_point/get_closest_position_in_segment enabled consideration
2019-06-29 02:04:13 -05:00
Rémi Verschelde
a5bd40aa48
Merge pull request #30121 from DrMoriarty/encrypted_configfile
...
Add encrypted files support to ConfigFile
2019-06-28 12:06:44 +02:00
Rémi Verschelde
3942c939e3
Merge pull request #30135 from qarmin/fix_memory_leak_os
...
Fix small memory leak in OS.cpp
2019-06-27 22:06:52 +02:00
qarmin
d408c254a2
Fix small memory leak in OS.cpp
2019-06-27 21:35:27 +02:00
Bojidar Marinov
0c4c36d823
Add default values to the editor help, docs, and generated RST
...
Also, make spacing of "=" in the editor help a bit more consistent.
Closes #16086
2019-06-27 18:29:35 +03:00
Vasiliy Makarov
fcd8faf2f4
Add encrypted files support to ConfigFile
...
Fix #26477
Add in ConfigFile this methods:
load_encrypted(path, key)
load_encrypted_pass(path, password)
save_encrypted(path, key)
save_encrypted_pass(path, password)
2019-06-27 16:43:44 +03:00
Rémi Verschelde
1bf448dd87
Properly expose all Error constants to scripting languages
2019-06-27 12:48:26 +02:00
Rémi Verschelde
755b589384
Merge pull request #30096 from akien-mga/doc-misc-updates
...
doc: Proofread and complete various nodes
2019-06-27 08:12:34 +02:00
Rémi Verschelde
eaaff9da31
Merge pull request #29941 from qarmin/redundant_code_and_others
...
Remove redundant code, possible NULL pointers and others
2019-06-27 01:05:18 +02:00
Andrii Doroshenko (Xrayez)
6f2233d13a
Bind is_point_in_polygon in Geometry singleton
2019-06-27 00:20:22 +03:00
Rémi Verschelde
867dda1124
doc: Proofread and complete various nodes
...
All 100% completed: MainLoop, Node, Object, Path, Performance,
Reference, Resource, SceneState, SceneTree, UndoRedo.
Also fixed some en_GB occurrences as the reference spelling is en_US.
2019-06-26 23:05:51 +02:00
Alexander Holland
8f23f4b44e
UndoRedo add version changed signal
...
added some functions to manage undo buttons
2019-06-26 16:32:34 +02:00
qarmin
4e5310cc60
Some code changed with Clang-Tidy
2019-06-26 15:08:25 +02:00
Rémi Verschelde
a9cff880d6
doc: Document EncodedObjectAsID, expose its property
2019-06-26 10:50:45 +02:00
Fabio Alessandrelli
679bb882fc
Fix PoolVector resize and subarray.
...
The first used to accept negative values, the second would crash if out
of bound.
2019-06-24 09:24:09 +02:00
Nils ANDRÉ-CHANG
d2833d4f4d
Replace + "/" +
with String::file_add()
2019-06-23 13:33:50 +01:00
Rémi Verschelde
05a0a68c72
Merge pull request #24448 from lukad/toggle-system-console
...
Add option to toggle console window
2019-06-21 23:43:16 +02:00
Rémi Verschelde
1e833cadbc
Merge pull request #29935 from Faless/net/get_if_multicast_pr
...
Multicast, more network interfaces info
2019-06-21 10:21:01 +02:00
Fabio Alessandrelli
e5e3f86648
Multicast support in NetSocket/PacketPeerUDP
2019-06-21 00:14:42 +02:00
Fabio Alessandrelli
b574e476ec
Implement IP.get_local_interfaces.
...
Allow getting interfaces names and assigned names.
On UWP this is not supported, and the function will return one interface
for each local address (with interface name the local address itself).
2019-06-21 00:14:42 +02:00
Rémi Verschelde
5c66771e3e
Merge pull request #29283 from qarmin/fix_some_always_same_values
...
Remove always true/false values
2019-06-20 21:10:10 +02:00
qarmin
072e40368e
Fix always true/false values
2019-06-20 16:59:48 +02:00
Luka Dornhecker
ad504b926f
Add option to toggle console window on Windows
...
This is an editor setting and its value can also be toggled
using an entry in the Editor toolbar. The console will still
appear briefly when starting the project manager or editor,
as it's still compiled as console application.
Does not impact exported games, which will still run without
console in release and with console in debug mode.
A project setting or export option could be added to disable
it in debug mode if there's demand for it, but that would
greatly reduce the usefulness of debug builds if Windows users
can no longer report error and crash messages.
Fixes #17889 .
Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2019-06-20 16:55:52 +02:00
JohnJLight
38d3bfe971
Made use of semicolons more consitent, fixed formatting
2019-06-19 15:24:31 +02:00
Rémi Verschelde
43a9b8c76c
Merge pull request #27237 from Chaosus/astar_2d
...
Added 2D functions to AStar
2019-06-19 15:07:59 +02:00
Rémi Verschelde
2b52cd3e5c
Merge pull request #28648 from KoBeWi/substr-1
...
Make second parameter of substr optional
2019-06-19 12:43:46 +02:00