Commit Graph

2363 Commits

Author SHA1 Message Date
Rémi Verschelde 7e69c160a4
Merge pull request #26129 from YeldhamDev/undoredo_merge_all_fix
Fix 'UndoRedo's 'MERGE_ALL' mode repeating instructions when quickly commiting actions
2019-02-22 09:57:23 +01:00
Rémi Verschelde 726f31e992
Merge pull request #26132 from marxin/fix-Wignored-qualifiers
Fix warnings seen with -Wignored-qualifiers.
2019-02-22 09:55:27 +01:00
Rémi Verschelde 60fe9321ac
Merge pull request #26099 from marxin/fix-Wtype-limits-warnings
Fix all -Wtype-limits warnings.
2019-02-22 09:44:59 +01:00
Juan Linietsky 8b231b96e3 Implement a cleaner (and better) way to save imagedata from ImageTexture, fixes #18801 2019-02-21 20:49:42 -03:00
marxin c11e7ffd0e Fix warnings seen with -Wignored-qualifiers. 2019-02-21 20:24:29 +01:00
Michael Alexsander Silva Dias 79f1d8b4fb Fix 'UndoRedo's 'MERGE_ALL' mode repeating instructions when quickly commiting actions
It seems that the merge operation validation is only useful to the 'MERGE_ENDS' mode, causing problems when in 'MERGE_ALL'.

Fixes #26118.
2019-02-21 15:36:45 -03:00
marxin 7de7f0ef17 Fix all -Wtype-limits warnings. 2019-02-21 19:34:35 +01:00
Rémi Verschelde b970c4187d
Merge pull request #26115 from WindyDarian/fix_dictionary_erase_returing_null
Fix return value for Dictionary.erase(key) in script
2019-02-21 13:54:34 +01:00
Windy Darian 7d4a653223 Fix return value for Dictionary.erase() 2019-02-21 18:52:29 +08:00
Rémi Verschelde b39e1df704 Fix VariantWriter overflow on 64-bit int
Integers in Godot are signed 64-bit ints (int64_t), but var2str used
int behind the scenes and would thus overflow after 2^31.

Also properly documented the actual bounds of int and the behaviour
when overflowing them.
2019-02-21 11:24:00 +01:00
marxin 8d51618949 Add -Wshadow=local to warnings and fix reported issues.
Fixes #25316.
2019-02-20 19:44:12 +01:00
Rémi Verschelde 132e2f458d
Merge pull request #26015 from hedin-hiervard/master
fixed AStar improper point deletion (leads to crash)
2019-02-20 18:20:23 +01:00
Rémi Verschelde 5023cc111b
Merge pull request #26095 from lupoDharkael/right-left
Fix wrong bounds check in String::right
2019-02-20 17:48:53 +01:00
hedin c496781bf6 fixed AStar improper point deletion (leads to crash) 2019-02-20 17:24:58 +01:00
lupoDharkael 597aac382b Fix wrong bounds check in String::right 2019-02-20 16:47:25 +01:00
Rémi Verschelde 75c89aaaef
Merge pull request #26069 from hpvb/align-variant
Align the Variant data member
2019-02-20 13:27:05 +01:00
Hein-Pieter van Braam b6b113cc2b Align the Variant data member
This should avoid potential alignment issues when _mem holds real
values and speed up some floating point operations in some cases.
2019-02-20 11:14:22 +00:00
Fabio Alessandrelli 0e5655694c Fix HTTPClient keep alive with chunked encoding.
We need to consume the trailer part and final CRLF after last chunk
as per RFC 7230 section 4.1:

```
chunked-body   = *chunk
                 last-chunk
                 trailer-part
                 CRLF
```

We do not return the trailer part, just consume it allowing following
requests to work as expected when using keep alive.
2019-02-20 05:13:51 +01:00
Fabio Alessandrelli 10e4821260 HTTPClient read until EOF fixes 2019-02-20 03:06:02 +01:00
marxin 155cbe0b37 Fix warnings seen with warnings=all and recent GCC 8.2. 2019-02-18 21:54:31 +01:00
Rémi Verschelde 2e6501d879 Add hex-encoded version number to Engine singleton for easy comparisons 2019-02-17 13:38:52 +01:00
Rémi Verschelde f6fcbcfe9e
Merge pull request #25680 from Chaosus/random_fix
Fix random generation, to not always retrieve 0 after seed()
2019-02-16 23:24:02 +01:00
Rémi Verschelde 44d24e8b78
Merge pull request #25952 from pbrunet/fix/rand
Fix typo for randd and randf
2019-02-16 22:05:23 +01:00
Juan Linietsky 1f9c54bd55 Make resource loader cycle checker work on a per-thread basis.
This removes editor errors saying cycles existed when the thumbnailer was running.
2019-02-16 17:39:06 -03:00
Pierrick Brunet 3b6d05db3e Fix typo for randd and randf
* And improve documentation according to issue #25938
2019-02-16 21:05:18 +01:00
Rémi Verschelde ca5ec803fc
Merge pull request #25944 from Faless/net/http_editor_fixes
Fix keep-alive without header in HTTP client
2019-02-16 17:58:48 +01:00
Fabio Alessandrelli 673caa5f46 Fix keep-alive without header in HTTP client 2019-02-16 17:05:13 +01:00
Rémi Verschelde 7a79eee523 Expose OS::get_current_video_driver to scripting languages 2019-02-16 14:41:07 +01:00
Rémi Verschelde 29359c169b
Merge pull request #25924 from Calinou/add-gamepad-button-shortcut
Make Button shortcuts triggerable by gamepads
2019-02-16 14:17:26 +01:00
Hein-Pieter van Braam 24e7a54cd0 Fix alignment and locking issues with CommandQueueMT
The allocations of commands in CommandQueueMT weren't aligned. This
commit aligns all accesses on 64bit boundaries regardless of target
platform. This ensures that all types are aligned.

Lock-wise the semaphores were maked as usable when the command had ran
but not when the synchronous stub had finished with it. This lead to a
race condition where sometimes the semaphore got reused before it was
waited on. We now mark the semaphore as free only once we're done
waiting on it.
2019-02-16 04:00:19 +01:00
Hugo Locurcio b54910eb05
Make Button shortcuts triggerable by gamepads
This closes #25741.
2019-02-16 00:29:23 +01:00
Juan Linietsky 4a24ba6e77 -Fixes to undo redo to avoid crash, closes #24251
-Changed Animation to have a special signal when tracks are changed, to avoid unnecesary track cache rebuilds in AnimationPlayer
-Added missing emit_changed whe modifying keys to Animation
-Changed AnimationPlayer to use the new refcounted connections instead of the previous hacky way to keep references
-Changed AnimationEditor to update the current track when keys are edited
-Fixed bug where undo/redo did not work with AnimationKeyEdit (was not being updated)
-Made sure UndoRedo does not mind deleted objects in undo/redo history, this would corrupt the history or clear it without need.
2019-02-14 10:22:34 -03:00
Rémi Verschelde 5fc86026ca Fix typos with codespell
Using codespell 1.14.0.

Method:
```
$ cat > ../godot-word-whitelist.txt << EOF
ang
doubleclick
lod
nd
numer
que
te
unselect
EOF
$ codespell -w -q 3 -I ../godot-word-whitelist.txt --skip="./thirdparty,*.po"
$ git diff // undo unwanted changes
```
2019-02-13 09:23:29 +01:00
Rémi Verschelde 55ca2a7c88
Merge pull request #25821 from akien-mga/sync-class-and-filenames
Ensure classes match their header filename
2019-02-13 08:49:39 +01:00
Aaron Franke 06df7b0963 [Core] Transform2D add set_scale and fix set_rotation
Note: These are still not exposed to GDScript
2019-02-12 17:59:29 -05:00
Rémi Verschelde c4835c4345
Merge pull request #25721 from neikeq/ww
Use script instance binding for objects constructed from C#
2019-02-12 15:29:25 +01:00
Rémi Verschelde b7cc2bb1e2 Core: Ensure classes match their header filename
Also drop some unused files.

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

Dropped:
- `core/allocators.h`
- `core/os/shell.h`
- `core/variant_construct_string.cpp`
2019-02-12 13:34:25 +01:00
Rémi Verschelde 13c50e8aa5
Merge pull request #25481 from hpvb/fix-ubsan-asan-reports
Fix many asan and ubsan reported issues
2019-02-12 12:21:01 +01:00
Rémi Verschelde b6e03d927e
Merge pull request #25727 from aaronfranke/matrix3-basis
[Core] Rename Matrix3 file to Basis
2019-02-10 12:32:32 +01:00
Chaosus f946b28f75 Fix random generation, to not retrieve 0 after seed() 2019-02-10 14:16:02 +03:00
Rémi Verschelde 034cd62a77 Warn when using GPU particles with GLES2
Closes #25733.
2019-02-09 20:49:58 +01:00
Aaron Franke 3f837d5cc5 [Core] Rename Matrix3 file to Basis
The code already referred to "Basis", it's just the file name that was different for some reason.
2019-02-09 14:42:23 -05:00
Ignacio Etcheverry 9df44c2d2c Use script instance binding for objects constructed from C#
Only possible if the object class is a "native type". If the object class is a user class (that derives a "native type") then a script is needed.
Since CSharpLanguage does cleanup of script instance bindings when finished, cases like #25621 will no longer cause problems.

Fixed ~Object() trying to free script instance bindings after the language has already been removed, which would result in a NULL dereference.
2019-02-09 00:32:18 +01:00
Rémi Verschelde 1772d6fa23 Image: Fix decompressing ETC2
Thanks to @Rriik for finding the bug and its cause.

Fixes #25595.
2019-02-08 17:26:47 +01:00
Ignacio Etcheverry 3233083f63 Mono: Lifetime fixes for CSharpInstance and instance binding data
Avoid CSharpInstance from accessing its state after self destructing (by deleting the Reference owner).
It's now safe to replace the script instance without leaking or crashing.

Also fixed godot_icall_Object_weakref return reference being freed before returning.
2019-02-03 06:47:25 +01:00
Ignacio Etcheverry 4e4e889c75
Merge pull request #25478 from neikeq/rr
Mono: Fix MonoPosixHelper not being found
2019-02-03 06:31:52 +01:00
Ignacio Etcheverry 41873ffa88 Added set_environment to OS class 2019-02-03 05:38:47 +01:00
Rémi Verschelde 463123a661
Merge pull request #25494 from RandomShaper/fix-21677
Let memory stat functions return uint64_t
2019-01-31 10:33:18 +01:00
Bojidar Marinov e34a4c63a7
Fix AStar crashing with large (>1e30) estimated values
Fixes #21601
2019-01-30 20:22:08 +02:00
Pedro J. Estébanez 496d8f19fc Let memory stat functions return uint64_t 2019-01-30 19:07:46 +01:00