Commit Graph

1975 Commits

Author SHA1 Message Date
Juan Linietsky
06b076f687
Merge pull request #15305 from poke1024/checks-peer
Checks on input_buffer in PacketPeerStream
2018-05-08 10:45:39 -03:00
Juan Linietsky
06f1d1ae23
Merge pull request #15282 from poke1024/check-obj-class
Check implicit casts on object classes in bound method calls
2018-05-08 10:43:44 -03:00
Fabio Alessandrelli
e391b493d5 Internal methods in MultiplayerAPI start with _ 2018-05-08 14:46:52 +02:00
Blazej Floch
c45f44d856 Local debugger fixes and extensions
- Adds q/quit option to console debugging
- Adds options (variable_prefix)
- Breaks into debugger with Ctrl-C in local debug mode (Unix/Windows)
- Added option to list all breakpoints
- Fixes add/remove breakpoint bug (invalid path parsing)
- Minor cleanup
2018-05-07 23:17:06 -04:00
Juan Linietsky
cb1fc5734b
Merge pull request #17316 from ShyRed/significantdigits
Adjust decimal precision
2018-05-07 20:25:06 -03:00
Juan Linietsky
633bbdb231
Merge pull request #17353 from zmanuel/timer_hysteresis_multiframe_pr1
Use hysteresis for smoother physics update frequency
2018-05-07 19:27:32 -03:00
Juan Linietsky
69a96ff4a6
Merge pull request #15943 from poke1024/geometry-line-line
Add Geometry::line_intersects_line_2d()
2018-05-07 17:54:33 -03:00
Juan Linietsky
cbd849d13f
Merge pull request #16033 from poke1024/marshalls-dict
Detects crash-related marshalling errors due to NAN values
2018-05-07 17:51:06 -03:00
Juan Linietsky
ff1e7cfbf4 Add is_instance_valid() method to GDScript, ending more than a decade of pain. 2018-05-07 17:30:03 -03:00
Juan Linietsky
80b9edf0f6
Merge pull request #16893 from GodotExplorer/debugger-improvement-3
Save runtime node as scene from remote scene tree.
2018-05-07 16:41:34 -03:00
Juan Linietsky
3f3b4703e4
Merge pull request #18121 from Crazy-P/Resolves-Freeze-on-change-reflection-probe
Resolves editor freezes on change of reflection probe
2018-05-07 15:39:25 -03:00
Juan Linietsky
e6b938ef16
Merge pull request #18219 from AlexHolly/fix-image-blit-blend
blit and blend fix when dst<Vector2
2018-05-07 15:23:54 -03:00
Juan Linietsky
863781dd3c
Merge pull request #18505 from AlexHolly/image-point2-helper
add Point2 helper for Image.get_pixel and Image.set_pixel
2018-05-07 12:20:32 -03:00
RaphaelHunter
63e258cc8f add condition check in Imgae::create(...) 2018-05-05 16:46:51 +08:00
Max Hilbrunner
1d47266490
Merge pull request #18501 from touilleMan/clean-variant-_data-RefPtr
Remove unused Variant._data.RefPtr
2018-05-05 06:53:48 +02:00
Max Hilbrunner
5d529ba2e1
Merge pull request #18488 from AndreaCatania/ie0
Added method to clear input events of an action
2018-05-05 06:49:46 +02:00
Alexander Alekseev
26963473a9 Vector3::round, Vector2::round & Vector2::ceil methods were added.
Now both structs (Vector2 & Vector3) have round, floor & ceil methods.
(see #18603)
2018-05-04 12:43:50 +03:00
Juan Linietsky
f056b09f5a
Merge pull request #18589 from karroffel/oahashmap-robinhood
updated OAHashMap to use robinhood hashing
2018-05-03 14:47:07 -03:00
karroffel
bf24d570bb updated OAHashMap to use robinhood hashing 2018-05-03 17:00:21 +02:00
Rémi Verschelde
b774156729
Merge pull request #18514 from neikeq/api-hash-fixes
API hash fixes
2018-05-03 14:36:32 +02:00
AndreaCatania
c510e2586d Added method to clear input events of an action 2018-05-03 00:26:49 +02:00
Rémi Verschelde
18c28c159d
Merge pull request #17196 from RandomShaper/improve-gui-touch
Implement universal translation of touch to mouse (3.1)
2018-05-02 10:47:49 +02:00
Rémi Verschelde
f86a67c4d1
Merge pull request #18520 from paulloz/gdscript-api-string-path
fix API string path
2018-05-02 10:36:25 +02:00
Rémi Verschelde
c5fe3d9d93
Merge pull request #18530 from garyo/missing-arg-err
Handle missing arg pointer in Variant::get_call_error_text
2018-05-01 19:17:43 +02:00
Rémi Verschelde
de97339a2d
Merge pull request #18291 from akien-mga/coverity-uninitialized-scalar-var
Fix Coverity reports of uninitialized scalar variable
2018-05-01 19:14:07 +02:00
Rémi Verschelde
85c8953c9f
Merge pull request #16649 from ibrahn/visual-script-release-crash
fix for segfault when using CallBasic in visual script on release build
2018-05-01 17:48:27 +02:00
George Marques
decf178033
Enable autoload in editor
- Tool scripts will be executed and can be accessed by plugins.
- Other script languages can implement add/remove_named_global_constant
to make use of this functionality.
2018-05-01 11:44:08 -03:00
Manuel Moos
954f7cca60 Fix #17019 : overrides with unknown base setting
If at the time of the _GLOBAL_DEF call a setting itself was unknown,
the function would always return the supplied default value instead of
checking for overrides. This commit changes that, lookup now always
happens which correctly takes overrides into account.
2018-05-01 16:25:48 +02:00
Rémi Verschelde
5281415a7b
Merge pull request #18428 from groud/fix_input
Fixing input strength and the impossibility to erase action events
2018-05-01 11:15:51 +02:00
Rémi Verschelde
4602e58698
Merge pull request #18355 from ShyRed/fix18344
Keep alpha when changing h, s or v Color property in GDScript
2018-05-01 09:38:50 +02:00
Rémi Verschelde
4cce6f3417
Merge pull request #18321 from Crazy-P/Fixes-logically-dead-code
Fixes logically dead code (Coverity)
2018-05-01 08:35:10 +02:00
Gary Oberbrunner
8d5c30ce83 Handle missing arg pointer in get_call_error_text
I had a situation coming from godot-python where the caller of
Variant::get_call_error_text() passed null for `p_argptrs`. In
addition to fixing that in the caller, seems like good practice to
defend against that situation in the callee to prevent a crash.

So this patch just substitutes some semi-useful text for the source
type name and keeps going so the user's actual error gets emitted.
2018-04-30 15:30:21 -04:00
Pedro J. Estébanez
de9d40a953 Implement universal translation of touch to mouse
Now generating mouse events from touch is optional (on by default) and it's performed by `InputDefault` instead of having each OS abstraction doing it. (*)

The translation algorithm waits for a touch index to be pressed and tracks it translating its events to mouse events until it is raised, while ignoring other pointers.

Furthermore, to avoid an stuck "touch mouse", since not all platforms may report touches raised when the window is unfocused, it checks if touches are still down by the time it's focused again and if so it resets the state of the emulated mouse.

*: In the case of Windows, since it already provides touch-to-mouse translation by itself, "echo" mouse events are filtered out to have it working like the rest.

On X11 a little hack has been needed to avoid a case of a spurious mouse motion event that is generated during touch interaction.

Plus: Improve/fix tracking of current mouse position.

** Summary of changes to settings: **

- `display/window/handheld/emulate_touchscreen` becomes `input/pointing_devices/emulate_touch_from_mouse`
- New setting: `input/pointing_devices/emulate_mouse_from_touch`
2018-04-30 19:03:38 +02:00
Max Hilbrunner
1ff89b547a
Merge pull request #18284 from mhilbrunner/pck-version
Fix .pck exporting via PCKPacker
2018-04-30 17:11:10 +02:00
Paul Joannon
a35c8bbdc7 fix API string path 2018-04-30 09:38:18 +02:00
Juan Linietsky
6244b9e2e1 Add option to renormalize mipmaps when generating them for normalmaps.
Reduces some aliasing.
2018-04-29 21:52:21 -03:00
Ignacio Etcheverry
3a86dffc5e ClassDB API hash now only includes exposed classes 2018-04-29 19:50:33 +02:00
Alexander Holland
97485c8df0 add Point2 helper for Image.get_pixel and Image.set_pixel
image-point2-helper
2018-04-29 15:17:06 +02:00
Geequlim
7e499683a2 Send inherited variables and constants from remote debugger 2018-04-29 20:27:20 +08:00
Emmanuel Leblond
c55ef807c0
Remove unused Variant._data.RefPtr 2018-04-29 11:41:36 +02:00
groud
0aa8b35ee6 Fixing input strength and the impossibility to erase action events 2018-04-25 22:32:09 +02:00
Hugo Locurcio
1c419531a0 Change ".." punctuation for "..." in editor strings (#16507) 2018-04-22 19:36:01 +02:00
George Marques
ca25f1e6ea
Merge pull request #18176 from nikibobi/string-trim
Add string trim_prefix, trim_suffix, lstrip and rstrip methods
2018-04-22 12:29:44 -03:00
ShyRed
100a775260 Keep alpha when changing h, s or v on color
When modifying the h, s or v properties of a color in GDScript the alpha value needs to stay unchanged.
2018-04-22 17:00:45 +02:00
Crazy-P
e6deba8d19 Fixes logically dead code (Coverity)
Fixes reported logically dead codes by Coverity

* image.cpp: Doesn't really need any modification. But to remove the bug
report then we have to move the MAX call away from the for loop
statement.

* rasterizer_gles3.cpp: Removes unnecessary elif condition since it is
checked earlier in the function

* collada.cpp: If stamement never reached due to macro ERR_CONTINUE does
the same.

* navigation_mesh.cpp: Variables should always be null - however, also
checked for the very same condition in their function call. Leaving this
for review (whether the function call is necessary or not)

* path_editor_plugin.cpp: If cancel is true, then it should restore the
edited value to the original provided.
http://docs.godotengine.org/en/3.0/classes/class_editorspatialgizmo.html#class-editorspatialgizmo-commit-handle

* spatial_editor_gizmos.cpp: the very condition of i >= 3 is
predetermined in the if case right before it. Thus case 1 is always '1'
and case 2 is always '-1'

* grid_map_editor.cpp: Same as above in spatial_editor_gizmos.cpp

* voxel_light_baker.cpp: Same as above in spatial_editor_gizmos.cpp

* visual_server.cpp: Same as above in spatial_editor_gizmos.cpp

* visual_script_expression.cpp: char '-' is already true in the switch
case mechanism. Thus it can never reach to default case.

* particles.cpp: Case 'PARAM_MAX' is unreachable due to index checking
right before the switch execution.

* shader_language.cpp: Invalid index is handled in switch default case.
`type < TYPE_FLOAT && type > TYPE_VEC4` -> `(type < TYPE_FLOAT || type > TYPE_VEC4`)
Fixes the "always false problem" in TODO comment.
2018-04-21 22:35:23 +08:00
Rémi Verschelde
8ae042a895
Merge pull request #18280 from groud/fix_input
Fixes left/up axis not mappable as actions
2018-04-19 21:06:17 +02:00
Rémi Verschelde
bf7ca623a6 Fix Coverity reports of uninitialized scalar variable
Fixes most current reports on Coverity Scan of uninitialized scalar
variable (CWE-457): https://cwe.mitre.org/data/definitions/457.html

These happen most of the time (in our code) when instanciating structs
without a constructor (or with an incomplete one), and later returning
the instance. This is sometimes intended though, as some parameters are
only used in some situations and should not be double-initialized for
performance reasons (e.g. `constant` in ShaderLanguage::Token).
2018-04-19 15:20:45 +02:00
Max Hilbrunner
a3aa5ad0d0 PCKPacker:pck_start(): Update version 2018-04-19 00:45:22 +02:00
Rémi Verschelde
9a75975042 Fix some Coverity warnings in String API
- StringName::StringName(const StringName &p_name)
  Non-static class member _data is not initialized in this constructor nor in any functions that it calls.

- StringName::_Data()
  Non-static class member idx is not initialized in this constructor nor in any functions that it calls.

- String::num_uint64(...)
  This less-than-zero comparison of an unsigned value is never true. n % base < 0UL.

- String::hex_to_int(...) and String::hex_to_int64(...)
  Execution cannot reach this statement (deadcode)
2018-04-18 22:20:39 +02:00
Gilles Roudiere
7e89dc432c Fixes left/up axis not mappable as actions 2018-04-18 21:38:52 +02:00
Juan Linietsky
a2f26a96dc Add a macro to deprecate methods 2018-04-18 14:27:26 +02:00
Rémi Verschelde
3018132244
Merge pull request #18204 from tagcup/quat_scale
Avoid converting Quat to Euler angles when not necessary.
2018-04-18 13:55:35 +02:00
Rémi Verschelde
8e2b29b659
Merge pull request #18227 from bojidar-bg/fix-date-unix-crash
Fix crash resulting from bad month check in core_bind.cpp
2018-04-18 13:30:04 +02:00
Juan Linietsky
1a3688d0cc
Merge pull request #16902 from groud/analog_action_system
Allow actions to provide an analog value
2018-04-18 07:21:29 -03:00
Bojidar Marinov
4b9cf93338
Fix crash resulting from bad month check in core_bind.cpp
Also, make it clear that day is 0-based. This might cause very slight differcies in existing games.
Fixes #18221
2018-04-17 22:44:08 +03:00
bosak
79ecdee496
add string trim_prefix trim_suffix lstrip and rstrip methods 2018-04-17 14:15:43 +03:00
Gilles Roudiere
ebfa731012 Allow actions to provide an analog value 2018-04-16 23:20:43 +02:00
George Marques
fefee533ae
Fix names of Variant operators 2018-04-16 14:54:49 -03:00
Alexander Holland
7cfdffcdf8 blit and blend fix when dst<Vector2 2018-04-15 22:37:28 +02:00
tagcup
a5e0bb447c Avoid converting Quat to Euler angles when not necessary.
Also ensure that get_scale doesn't arbitrarlity change the signs of scales, ensuring that the combination of get_rotation and get_scale gives the correct basis.

Added various missing functions and constructors.

Should close #17968.
2018-04-14 15:53:25 -04:00
Gilles Roudiere
e7445c3d82
Merge pull request #18170 from Chaosus/improvewrapf
Small performance fix to wrapf
2018-04-14 15:00:47 +02:00
Chaosus
ac4c340a45 Small performance fix to wrapf 2018-04-13 13:50:17 +03:00
Pedro J. Estébanez
00e98458ba Revert "Unify http- and percent- encode/decode"
This reverts commit b76ee30917.
2018-04-12 21:12:34 +02:00
Crazy-P
68dda540fd Fixes incorrect adding to last in self_list
Fixes https://github.com/godotengine/godot/issues/18052
2018-04-11 19:59:41 +08:00
Ruslan Mustakov
1d9a3a9b1c iPhone X support and iOS-related fixes
Starting from April 2018 Apple no longer accepts apps that do not
support iPhone X. For games this mainly means respecting the safe area,
unobstructed by notch and virtual home button. UI controls must be
placed within the safe area so that users can interact with them.

This commit:

- Adds OS::get_window_safe_area method that returns unobscured area of
  the window, where interactive controls should be rendered.

- Reorganizes how launch screens are exported - the previous way was
  incorrect and modern iPhones did not pick up the correct screens and
  because of that used a non-native resolution to render the game.

- Adds launch screen options for iPhone X.

- Makes launch screens optional in the export template. If not
  specified, a white screen will be used.

- Adds App Store icon (1024x1024) export option as it now has to be
  bundled with the app instead of being provided in iTunes Connect.

- Fixes crash when launching games in iOS Simulator. It happened because
  controllerWasConnected callback came before the engine was
  initialized. Now in such case the controllers will be queued up and
  registered after initialization is done.

- Fixes issue with the virtual keyboard where for some reason
  autocorrection panel would intersect with the keyboard itself and not
  allow you to use the top row of the keyboard. This is fixed by
  disabling autocorrection altogether.

Closes #17358. Fixes #17428. Fixes #17331.
2018-04-11 14:53:24 +07:00
Poommetee Ketson
72aa87758a
Update classref and docs, fix missing parameters' name 2018-04-11 10:20:22 +07:00
Guilherme Felipe
4f05190fb0 Implement Input.set_default_cursor_shape to change the default shape
Closes #18043
2018-04-10 11:38:34 -03:00
Manuel Moos
d5abd4eb75 Add hysteresis to physics timestep count per frame
Add new class _TimerSync to manage timestep calculations.
The new class handles the decisions about simulation progression
previously handled by main::iteration(). It is fed the current timer
ticks and determines how many physics updates are to be run and what
the delta argument to the _process() functions should be.

The new class tries to keep the number of physics updates per frame as
constant as possible from frame to frame. Ideally, it would be N steps
every render frame, but even with perfectly regular rendering, the
general case is that N or N+1 steps are required per frame, for some
fixed N. The best guess for N is stored in typical_physics_steps.

When determining the number of steps to take, no restrictions are
imposed between the choice of typical_physics_steps and
typical_physics_steps+1 steps. Should more or less steps than that be
required, the accumulated remaining time (as before, stored in
time_accum) needs to surpass its boundaries by some minimal threshold.
Once surpassed, typical_physics_steps is updated to allow the new step
count for future updates.

Care is taken that the modified calculation of the number of physics
steps is not observable from game code that only checks the delta
parameters to the _process and _physics_process functions; in addition
to modifying the number of steps, the _process argument is modified as
well to stay in expected bounds. Extra care is taken that the accumulated
steps still sum up to roughly the real elapsed time, up to a maximum
tolerated difference.

To allow the hysteresis code to work correctly on higher refresh
monitors, the number of typical physics steps is not only recorded and
kept consistent for single render frames, but for groups of them.
Currently, up to 12 frames are grouped that way.

The engine parameter physics_jitter_fix controls both the maximum
tolerated difference between wall clock time and summed up _process
arguments and the threshold for changing typical_physics_steps. It is
given in units of the real physics frame slice 1/physics_fps. Set
physics_jitter_fix to 0 to disable the effects of the new code here.
It starts to be effective against the random physics jitter at around
0.02 to 0.05. at values greater than 1 it starts having ill effects on
the engine's ability to react sensibly to dropped frames and framerate
changes.
2018-04-09 22:27:29 +02:00
Crazy-P
ae7a9df292 Resolves Inccorect Quaternion Conversion
Fixes https://github.com/godotengine/godot/issues/18025
2018-04-09 14:48:03 +08:00
Juan Linietsky
cef01f1f49
Merge pull request #16495 from Chaosus/is_point_in_triangle_fix
Fix is_point_in_triangle function
2018-04-08 18:18:19 -03:00
Juan Linietsky
59cdc5eb9d
Merge pull request #16898 from Lerc/master
add Image::bumpmap_to_normalmap conversion function
2018-04-08 15:52:05 -03:00
Juan Linietsky
e9e5aa617e
Merge pull request #17227 from Faless/multiplayer_api
[RFC] MultiplayerAPI refactor
2018-04-08 11:04:16 -03:00
Juan Linietsky
1faea81e15
Merge pull request #17232 from playster000/master
enhance mipmaps, non power of 2 textures
2018-04-08 10:49:13 -03:00
Juan Linietsky
4ee3f3251d
Merge pull request #17382 from bojidar-bg/13971-path-array-unsaved
Duplicate Arrays and Dictionaries when instancing scene in editor
2018-04-08 09:39:03 -03:00
Juan Linietsky
47ffe107e6
Merge pull request #17967 from Nibodhika/all-device-mode
Allows to map an action to all devices.
2018-04-08 09:04:14 -03:00
Nibodhika
1e28f63bcf Allows to map an action to all devices.
This is accomplished by setting a special value (-1) to the device variable
in the InputEvent that's being used to compare with the one received from the OS.

This special value is invalid for a regular input, so it should be safe.
Implements #17942
2018-04-07 20:08:09 +00:00
Juan Linietsky
cd7e9d9642
Merge pull request #17583 from RandomShaper/enhance-uri-utils
Enhance uri utils
2018-04-07 17:07:29 -03:00
Juan Linietsky
5a1a90c3db
Merge pull request #17636 from rainerdeyke/fix_issue_17585
Fixes moving files causes scene corruption
2018-04-07 16:56:02 -03:00
bruvzg
ddae098dee
Experimental support for windows with per-pixel transparency (macOS, X11 and Windows). 2018-04-07 17:11:45 +03:00
Andrea Catania
2f9354016f
Fixed signal input variable name 2018-04-06 09:09:40 +02:00
Pedro J. Estébanez
1fc85b87bd Fix buggy percent-encoding
Fixes #17875.
2018-04-05 21:49:44 +02:00
Rémi Verschelde
866254343b
Merge pull request #17827 from bruvzg/macos_shortcut_key_remapping_fix
[macOS] Fix keyboard shortcuts on non QWERTY keyboard layouts.
2018-04-05 13:22:52 +02:00
Rémi Verschelde
1710582473
Merge pull request #17847 from Faless/lws_update
LWS v2.4.2, mbedTLS v2.8.0, Websocket  SSL support
2018-04-03 23:14:01 +02:00
Felix Yang
7d5a40c3e6 Ctrl+Clicking a enum now scrolls down to it in the docs. 2018-04-03 21:56:54 +02:00
Fabio Alessandrelli
490dd9f946 Generalize SSL cert reading from file 2018-04-03 20:13:57 +02:00
bruvzg
5ba984fc8c
[macOS] Fix keyboard shortcuts on non QWERTY keyboard layouts. 2018-03-28 20:22:59 +03:00
Pedro J. Estébanez
8d8e9d54c8 Enhance HTTPClient.query_string_from_dict() 2018-03-27 19:18:32 +02:00
Pedro J. Estébanez
b76ee30917 Unify http- and percent- encode/decode
There was a percent-prefixed version, which was exposed, and a http-prefixed version which was not (only to GDNative).
This commit keeps the percent-prefixed versions, but with the http-prefixed implementations.
2018-03-27 19:18:30 +02:00
Rainer Deyke
31c6d6649f Fixes scene corruption when updating dependencies.
This commit fixes issue #17585: renaming/moving resources can corrupt
scene files.  The corruption was caused by
'ResourceFormatLoaderBinary::rename_dependencies' updating the file
format version field of the affected scene file to the latest version
without actually updating the content of the file to that version,
resulting in a file whose content does not match its file format version
field.  The fix preserves the file format version field and the engine
version fields when renaming dependencies.
2018-03-24 15:08:55 +01:00
Marcelo Fernandez
bbd21c2203 Fix for clang warning at distance_to 2018-03-22 13:26:04 -03:00
Marcelo Fernandez
35d21c0881 Fix several in-class initialization clang warning 2018-03-22 00:17:18 -03:00
Rémi Verschelde
baa092e99d
Merge pull request #17653 from eska014/rwlock-dummy
Add RWLockDummy for NO_THREADS builds
2018-03-21 17:40:01 +01:00
Leon Krause
25800ffb0e Add RWLockDummy for NO_THREADS builds 2018-03-20 05:37:42 +01:00
Pedro J. Estébanez
536611704a Fix listing files inside directory in pack file
When adding a directory path to the inventory of the pack, an empty file name was being added to the file list. That made `Directory.get_ntext()` signal end-of-list too early so that files in a subdirectory were missed.

Fixes #15801.
Helps with #16798.
2018-03-18 14:04:50 +01:00
Fabio Alessandrelli
c531262190
Merge pull request #16947 from Faless/ui_actions
GUI elements ui_action usage, improvements
2018-03-16 20:55:11 +01:00
Fabio Alessandrelli
b0186b41bb
Merge pull request #17237 from RandomShaper/fix-ssl-handshake
Fix HTTPClient SNI support when verify is off
2018-03-15 22:43:34 +01:00
Neil Graham
4bea98de40 change bumpmap_to_normalmap range from [1...255] to [0...255] 2018-03-16 10:22:48 +13:00
Hein-Pieter van Braam
9bc0503c91
Merge pull request #17376 from marcelofg55/file_get_path
Added File.get_path and File.get_path_absolute functions
2018-03-15 22:21:21 +01:00
Hein-Pieter van Braam
f8706cbdf2
Merge pull request #17407 from poke1024/fix-hsv-mismatch
Fix mismatch between Color.h and Color.from_hsv()
2018-03-15 22:16:57 +01:00
Rémi Verschelde
99c1323a08
Merge pull request #17388 from Hinsbart/mono_class_name
Mono: Avoid invalid class names.
2018-03-15 19:47:39 +01:00
Andreas Haas
700d07cf7c
Mono: Avoid invalid class names.
Disallow reserved keywords as class names and prefix base class with the Godot
namespace if it's the same as the class name.

Fixes #12483
2018-03-15 19:25:06 +01:00
Bernhard Liebl
1d3b5d5a2f Fix mismatch between Color.h and Color.from_hsv() 2018-03-14 21:04:02 +01:00
Rémi Verschelde
b64d4e3a83
Merge pull request #17486 from bojidar-bg/x-fix-clang-negation-warn
Fix a potential bug hinted by clang
2018-03-13 20:02:42 +01:00
Bojidar Marinov
9f6c0c6eae
Duplicate Arrays and Dictionaries when instancing scene in editor
Also, add deep (=false) parameter to Array.duplicate and Dictionary.duplicate

Fixes #13971
2018-03-13 17:18:08 +02:00
Bojidar Marinov
4d81e8afe6 Fix a potential bug hinted by clang 2018-03-13 17:10:28 +02:00
Marcelo Fernandez
a4e64c5454 Added File.get_path and File.get_path_absolute functions 2018-03-13 12:07:37 -03:00
Rémi Verschelde
b4da44981a
Merge pull request #17254 from Chaosus/updatewrap
Update wrap functions
2018-03-13 12:33:57 +01:00
Rémi Verschelde
ced5b57a60
Merge pull request #17257 from and3rson/master
Fix garbage in string padding.
2018-03-13 12:30:42 +01:00
Rémi Verschelde
18d543d7ab
Merge pull request #17311 from marcelofg55/export_err_checks
Improved error checking at EditorExportPlatformPC::export_project
2018-03-13 12:17:53 +01:00
Rémi Verschelde
4287c7822b
Merge pull request #17440 from viktor-ferenczi/issue-5042
Properly closing all files in Python build code
2018-03-13 11:49:58 +01:00
Rémi Verschelde
08415d0f53
Merge pull request #17319 from eska014/polyclipper-toolsonly
Build polygon clipper only in tools builds
2018-03-13 11:01:28 +01:00
robfram
ea94a82596 Fix non working action names containing whitespaces
Now the action name is quoted if it contains spaces. Also, quotation
mark (") is added to the forbidden character list for action names, as
it was also a bug.

Fix #17322
2018-03-12 21:28:41 +01:00
Viktor Ferenczi
272ecddb28 Properly closing all files in Python code 2018-03-11 14:55:50 +01:00
Rémi Verschelde
8ded15b035
Merge pull request #16485 from poke1024/vector2-cross
Bring back Vector2.cross()
2018-03-08 08:50:20 +01:00
Bernhard Liebl
9d7856620c Bring back Vector2.cross() 2018-03-07 21:10:31 +01:00
Leon Krause
802b6d3669 Reinstate WebGL 1.0 driver in HTML5 platform 2018-03-07 20:38:14 +01:00
Leon Krause
fa760082f5 Build polygon clipper only in tools builds 2018-03-06 21:53:37 +01:00
ShyRed
051b4d6f19 Adjust decimal precision
Increase the number of significant digits when converting from double to string.
2018-03-06 20:40:29 +01:00
Marcelo Fernandez
0876502f72 Improved error checking at EditorExportPlatformPC::export_project 2018-03-06 14:23:17 -03:00
Chaosus
70bb31a7b2 Update wrap functions 2018-03-06 10:34:37 +03:00
Andrew Dunai
0269e366f1 Fix garbage in string padding. 2018-03-04 19:45:33 +02:00
Marcelo Fernandez
d780d774aa Clean and expose get_audio/video_driver_* funcs on OS class 2018-03-04 14:18:05 -03:00
Pedro J. Estébanez
602da6fa4f Fix wrong SSL handshake
The name of the remote host is passed to mbed TLS in all cases so the client hello message is correctly formed.
2018-03-04 01:22:59 +01:00
Mavropoulos Ioannis
60b2ee1624 enhance mipmaps 2018-03-03 23:19:31 +02:00
Fabio Alessandrelli
df391cc5be Add new MultiplayerAPI class
Handles all the high level networking stuff
2018-03-03 18:28:49 +01:00
Nicolas Silva
e73266a51c Allow degenerate triangles in polygon triangulation when necessary. 2018-02-28 22:46:56 -05:00
Hein-Pieter van Braam
d702d7b335 Fix various valgrind reported uninitialized variable uses 2018-02-28 21:55:13 +01:00
Ignacio Etcheverry
f37090ccf4 Mono: Better versioning and gracefully unloading of Godot API assemblies 2018-02-25 20:56:27 +01:00
Poommetee Ketson
67e20dc2b6 (Magnify|Pan)Gesture: implement as_text 2018-02-24 10:35:25 +07:00
Neil Graham
617d3cde1a change to clang format 2018-02-24 13:59:02 +13:00
Rémi Verschelde
23ebae01dc Refactor version macros and fix related bugs
The previous logic with VERSION_MKSTRING was a bit unwieldy, so there were
several places hardcoding their own variant of the version string, potentially
with bugs (e.g. forgetting the patch number when defined).

The new logic defines:

- VERSION_BRANCH, the main 'major.minor' version (e.g. 3.1)
- VERSION_NUMBER, which can be 'major.minor' or 'major.minor.patch',
  depending on whether the latter is defined (e.g. 3.1.4)
- VERSION_FULL_CONFIG, which contains the version status (e.g. stable)
  and the module-specific suffix (e.g. mono)
- VERSION_FULL_BUILD, same as above but with build/reference name
  (e.g. official, custom_build, mageia, etc.)
  Note: Slight change here, as the previous format had the build name
  *before* the module-specific suffix; now it's after
- VERSION_FULL_NAME, same as before, so VERSION_FULL_BUILD prefixed
  with "Godot v" for readability

Bugs fixed thanks to that:

- Export templates version matching now properly takes VERSION_PATCH
  into account by relying on VERSION_FULL_CONFIG.
- ClassDB hash no longer takes the build name into account, but limits
  itself to VERSION_FULL_CONFIG (build name is cosmetic, not relevant
  for the API hash).
- Docs XML no longer hardcode the VERSION_STATUS, this was annoying.
- Small cleanup in Windows .rc file thanks to new macros.
2018-02-23 20:15:29 +01:00
Fabio Alessandrelli
920d2bfdfa Add two new default actions ui_end, ui_home
Used by Slider and Scrollbar
2018-02-23 13:01:28 +01:00
Poommetee Ketson
f4f92b55e1 Color:fix setting V switch S to old V value 2018-02-22 16:43:00 +07:00
geequlim
24e6361cba Save runtime node as scene from the remote scene tree. 2018-02-22 10:00:13 +08:00
luz.paz
612ab4bbc6 Fix typos with codespell
Found via `codespell -q 3 --skip="./thirdparty,./editor/translations" -I ../godot-word-whitelist.txt`
Whitelist consists of:
```
ang
doubleclick
lod
nd
que
te
unselect
```
2018-02-21 19:46:06 +01:00
Juan Linietsky
9e3a1e5401 Add base support for 2D meshes in Godot, including Sprite -> Mesh2D conversion. 2018-02-21 09:39:09 -03:00
Rémi Verschelde
57d562b394 Fix loading project.binary from PCK file
Regression introduced in #16825.
My logic was correct, but not the error code I was expecting.
The error reporting in FileAccess likely needs a review too.
2018-02-21 09:07:59 +01:00
Neil Graham
bc7db7a08d add Image::bumpmap_to_normalmap conversion function 2018-02-21 11:43:58 +13:00
Rémi Verschelde
37a6ce5a42
Merge pull request #15563 from poke1024/gdscript-shuffle
Add shuffle() method to Array
2018-02-19 21:53:08 +01:00
Rémi Verschelde
7455244866
Merge pull request #15852 from poke1024/color_hsv
Add Color.from_hsv()
2018-02-19 21:51:04 +01:00
Rémi Verschelde
7839076f95 Improve error reporting of ProjectSettings::setup()
And use it to better report errors in the console and project manager
when a project.godot file is corrupted.

Fixes #14963.
2018-02-19 16:41:43 +01:00
Artem Varaksa
d35e486228 Clean up some bad words from code comments 2018-02-17 16:00:39 +03:00
Rémi Verschelde
0c7bed45c4 Add locale renames for Hebrew and Indonesian on Windows
Windows does not fully respect ISO 639-1 like other systems,
so we have to override its locale values for those languages.

Also added comments to document the locale provenance.
2018-02-14 18:49:27 +01:00
Rémi Verschelde
e0f43e0678
Merge pull request #15564 from RandomShaper/adpod-topmost
Add new window setting: always on top
2018-02-14 16:43:40 +01:00
Rémi Verschelde
574133e4e0
Merge pull request #15892 from Zylann/add_missing_vs_bindings
Added all missing VisualServer bindings
2018-02-14 16:05:49 +01:00
Rémi Verschelde
b48cc669e2
Merge pull request #16169 from hungrymonkey/issue_16160
Change function signature from float to double to match type get_doub…
2018-02-14 15:50:47 +01:00
Fabio Alessandrelli
67b600d957 Add mbedtls module 2018-02-14 01:26:23 +01:00
Marcelo Fernandez
ea1d726a46 Added OS::center_window to center the window precisely on desktop platforms 2018-02-12 15:45:41 -03:00
Ibrahn Sahir
95dfa5b96d fix for segfault when using CallBasic in visual script on release build 2018-02-12 17:09:00 +00:00
Chaosus
f2c22791ce Fix is_point_in_triangle 2018-02-08 19:59:52 +03:00