Hein-Pieter van Braam
8230bf0a2f
Remove assignment and declarations in if statements
...
After discussing with @reduz and @akien-mga it was decided that we do
not allow assignments or declarations in if statements. This PR removes
the instances of this I could find by automated means.
2017-09-08 14:59:15 +02:00
Hein-Pieter van Braam
67a706fc1b
Fix various assorted warnings
...
Fix various warnings that don't have enough instances to merit
individual commits. Also fixes a potential bug in audio_server.cpp.
2017-09-08 14:57:48 +02:00
Hein-Pieter van Braam
5e18967d77
Fix serveral recent new clang-format errors
2017-09-08 00:20:16 +02:00
Juan Linietsky
98af411a37
Renamed playing property of audiostreams to play, to make it clearer. Fixes #10730
...
Also disabled the auto shut down of the property when stream ends, to make it easier to animate
2017-09-06 22:03:04 -03:00
Juan Linietsky
2802dced84
Automatically redraw when shaders using TIME are visible, fixes #10554
2017-09-05 00:30:39 -03:00
Rémi Verschelde
8e75e7311b
Merge pull request #10858 from letheed/add-shadow_filter-variant
...
add shadow_filter variant PCF7
2017-09-02 12:13:01 +02:00
Hein-Pieter van Braam
9c63ab99f0
Fix use of unitialized variables
...
The second in my quest to make Godot 3.x compile with -Werror on GCC7
2017-09-02 01:59:26 +02:00
Juan Linietsky
42659b0d9f
Fix freeze on exit on audiostreamplayers when setting invalid stream, closes #10093
2017-09-01 16:43:46 -03:00
letheed
3a188015be
add shadow_filter variant PCF7
2017-09-01 15:01:24 +02:00
Rémi Verschelde
6611dfbd6c
Merge pull request #10378 from RandomShaper/nav-keep-start-end
...
Guarantee start & end points are returned by Navigation2D
2017-08-30 16:12:12 +02:00
Rémi Verschelde
348eb4e4c5
Merge pull request #10361 from RandomShaper/tilemap-global-mtl
...
Let TileMap apply its material
2017-08-30 16:02:12 +02:00
Juan Linietsky
9c3bddfac2
Merge pull request #10745 from neikeq/fix-docdata-and-stuff
...
DocData and virtual method type hints fixes
2017-08-29 20:11:07 -03:00
Pedro J. Estébanez
d8584682f0
Fix joints collision exceptions
...
Fix 3D joint handling of collision exceptions, so that they lose effect when the joint is not valid in every case; also some redundant code removed.
Also avoid trying to create the joint when not neither body A nor body B are set.
Make 2D joints be handled like their 3D counterparts, which adds the fixes to them while also removing duplicated code.
(adapted from commit 4a98a59aa6
)
2017-08-29 23:46:44 +02:00
Ignacio Etcheverry
c16d00591b
DocData and type hints fixes
...
- Makes vararg methods automatically use PROPERTY_USAGE_NIL_IS_VARIANT on return types
- Completely removes the ":type" suffix for method names. Virtual methods must use the MethodInfo constructors that takes Variant::Type or PropertyHint as the first parameter for the return type (with CLASS_INFO as a helper to get the PropertyInfo). Parameters must use PROPERTY_HINT_RESOURCE_TYPE and hint string.
- PROPERTY_USAGE_NIL_IS_VARIANT is no longer needed for parameters, because parameters cannot be void.
- Adds missing PROPERTY_USAGE_NIL_IS_VARIANT to virtual and built-in methods that return Variant.
2017-08-29 19:40:21 +02:00
Rémi Verschelde
2353c65a1f
Merge pull request #10622 from letheed/patch-1
...
Allow to disable shadow gradients in Light2D
2017-08-28 23:46:42 +02:00
Rémi Verschelde
7ad14e7a3e
Dead code tells no tales
2017-08-27 22:13:45 +02:00
Rémi Verschelde
bd282ff43f
Use HTTPS URL for Godot's website in the headers
2017-08-27 14:16:55 +02:00
Juan Linietsky
a1c03a69d2
added finished signals to audio stream players, fixes #9928
2017-08-25 11:58:21 -03:00
Juan Linietsky
3061eca190
Removed old fp_adjust code that conflicts with clipped rects, fixes #9925
2017-08-25 10:40:29 -03:00
Letheed
61d3fb36e8
Allow to disable shadow gradients in Light2D
...
Currently the shadow gradient can't be disabled and always has a minimum value of 1.
I'm not sure why though, the default value seems to be 0 and the rasterizer checks for 0 [here](8fc6bb8f77/drivers/gles3/rasterizer_canvas_gles3.cpp (L1284)
) before enabling it.
Feels like a bug to me, but if there's a reason for that let me know.
As a side effect, this edit effectively changes the default value from 1 to 0 for new projects.
2017-08-24 23:35:19 +02:00
Hein-Pieter van Braam
cacced7e50
Convert Object::cast_to() to the static version
...
Currently we rely on some undefined behavior when Object->cast_to() gets
called with a Null pointer. This used to work fine with GCC < 6 but
newer versions of GCC remove all codepaths in which the this pointer is
Null. However, the non-static cast_to() was supposed to be null safe.
This patch makes cast_to() Null safe and removes the now redundant Null
checks where they existed.
It is explained in this article: https://www.viva64.com/en/b/0226/
2017-08-24 23:08:24 +02:00
Hein-Pieter van Braam
0a14e78a60
Change order of Null check for ParallaxLayer
...
The change in #10524 subtly changes the behavior of set_motion_scale()
and set_motion_offset() if the ParallaxLayer does not have a parent
node. Previously it would still set the corresponding property, but
after this change the property change would be discarded.
I'm not entirely sure if this actually matters as there doesn't appear
to be any code that picks up this change if the ParallaxLayer gets
re-parented later, but it's better to not change behavior regardless.
2017-08-22 15:13:31 +02:00
Hein-Pieter van Braam
99617ae8dc
Add null check to ParallaxLayer get_parent() calls
...
This fixes #10515
2017-08-22 01:48:24 +02:00
Rémi Verschelde
df590fc2d3
Merge pull request #10340 from Rubonnek/remove-unnecessary-assignments
...
Removed unnecessary assignments
2017-08-22 00:58:12 +02:00
Juan Linietsky
2cc8309249
Merge pull request #10351 from neikeq/enums-are-for-the-weak
...
ClassDB: Provide the enum name of integer constants
2017-08-21 19:56:08 -03:00
Wilson E. Alvarez
738d2ab969
Removed unnecessary assignments
2017-08-21 15:15:55 -04:00
Ignacio Etcheverry
32dd9a9f66
ClassDB: Provide the enum name of integer constants
2017-08-20 22:07:43 +02:00
Juan Linietsky
541fdffc0a
Merge pull request #10319 from neikeq/pr-engine-editor-hint
...
Adds Engine::is_editor_hint() method
2017-08-20 12:55:46 -03:00
Juan Linietsky
8fc6bb8f77
Added polygon antialiasing, but it does not work on nvidia. Will have to try something else..
2017-08-19 13:14:38 -03:00
Ignacio Etcheverry
90b8a5b71e
Removes editor_hint from SceneTree
2017-08-19 01:29:45 +02:00
Pedro J. Estébanez
ef6e1252ae
Guarantee start & end points are returned by Navigation2D
...
So start and end points are unconditionally added to the returned point list, but first and last middle points are checked against them to avoid duplicates.
`CMP_EPSILON` was already providing a guarantee, but knowing you will get exactly the endpoints you provided is even better.
2017-08-17 01:27:30 +02:00
TwistedTwigleg
00f6c85928
Synchronize parameter names in definition and declaration
...
Fixes #10244 .
2017-08-16 17:22:23 +02:00
Pedro J. Estébanez
71a496803c
Fix double point in Navigation2D
...
Fixes #10324 .
2017-08-16 13:46:10 +02:00
Pedro J. Estébanez
3bb5abbc35
Let TileMap apply its material
...
So when a material is set, every tile will be rendered with that. Quadrants will not be recreated, so a `CanvasItem` will exist per material per quadrant regardless a global material is set.
This makes also __Use parent material__ work for `TileMap`s.
Closes #9996 .
2017-08-15 23:41:23 +02:00
Ignacio Etcheverry
7fc3c51169
Merge pull request #10339 from bojidar-bg/x-fix-scale-conflict
...
Rename Light2D::scale to texture_scale, so it doesn't conflict
2017-08-14 22:16:39 +02:00
Bojidar Marinov
4b0990bf8d
Rename Light2D::scale to texture_scale, so it doesn't conflict
2017-08-14 18:53:42 +03:00
Rémi Verschelde
9575dbdf78
Merge pull request #10298 from nhold/kinematic-body-2d-_move-fixes-#10107
...
Fix missing and incorrect values in return value of _move method
2017-08-13 17:26:59 +02:00
Zher Huei Lee
a625d7edfc
Disabling Particles::one_shot restarts emission
...
Fixes #10181
2017-08-12 18:37:01 +08:00
Nathan Hold
fb40846dca
Fix missing and incorrect values in return value of _move method
2017-08-12 19:59:39 +10:00
Rémi Verschelde
306c0471f7
Merge pull request #9987 from Rubonnek/move-members-to-initilization-list
...
Moved member variables from constructor to initialization list
2017-08-11 10:31:04 +02:00
Ignacio Etcheverry
78619a5866
Fixes method definitions with extra number of arguments
2017-08-10 07:17:51 +02:00
Ignacio Etcheverry
2f290038d6
Removes type information from method binds
2017-08-10 07:17:50 +02:00
Wilson E. Alvarez
6d112a68b6
Moved member variables from constructor to initialization list
2017-08-08 21:43:19 -04:00
Juan Linietsky
bb47bca1f6
Ability to pause particles, closes #3675
2017-08-07 19:02:25 -03:00
Rémi Verschelde
3121b3a4f4
Merge pull request #10141 from ISylvox/lower_case_godot_api
...
Makes all Godot API's Methods lower_case
2017-08-07 14:59:39 +02:00
Rémi Verschelde
9244ea6d54
Merge pull request #10109 from eska014/init-particles2d-draw-order
...
Initialize Particles2D draw order property
2017-08-07 14:50:59 +02:00
Indah Sylvia
5ae78fdf6a
Makes all Godot API's methods Lower Case
2017-08-07 18:24:35 +07:00
Juan Linietsky
37adf936ab
few bugs fixed thanks to explicit bool constructor and clang.
...
explicit bool constructor has thus now been removed, as it served it's mission!
2017-08-05 21:43:10 -03:00
Juan Linietsky
435bedd9ef
Merge pull request #10116 from neikeq/prop_method_ambiguities
...
Renames properties and methods to avoid ambiguities
2017-08-05 17:55:43 -03:00
Ignacio Etcheverry
e82270e8d0
Renames properties and methods to avoid ambiguities
...
- Method Node2D.scale(Vector2) renamed to Node2D.apply_scale(Vector2)
- Property BaseButton.is_pressed renamed to BaseButton.pressed
2017-08-05 22:52:58 +02:00
Juan Linietsky
52649f1038
emit signal properly when frame has changed in autoplay, fixes #7730
2017-08-05 16:32:34 -03:00
Juan Linietsky
e47ecc63ef
Properly update frame range after modifying the vframe/hframes, closes #7624
2017-08-05 16:19:36 -03:00
Juan Linietsky
de9fb90dbf
Warn about resizing a rigidbody (2D or 3D), covers the most common cases, closes #7615
2017-08-05 16:06:15 -03:00
L. Krause
4d26b14576
Initialize Particles2D draw order property
2017-08-05 12:46:49 +02:00
Rémi Verschelde
0257ced05b
Merge pull request #10040 from Hassan-A/getCells3.0
...
Added get_used_cells_by_id method 3.0
2017-08-03 10:33:49 +02:00
Hassan A
74587a4927
Added get_used_cells_by_id method 3.0
2017-08-02 18:02:00 -04:00
Rémi Verschelde
85088275c5
Merge pull request #8209 from robertdhernandez/Texture-Region-Editor-Sync
...
Texture region now updates when changing an Atlas region rect
2017-08-01 00:15:37 +02:00
Rémi Verschelde
0a74fb625e
Merge pull request #9791 from bojidar-bg/6087-add-global-local-conv
...
Add .to_local/.to_global methods on Node2D and Spatial
2017-07-24 22:24:34 +02:00
Jakub Grzesik
567cbfcceb
expose missing CollisionShape API for CollisionObject
2017-07-24 20:29:49 +02:00
Rémi Verschelde
374cffaa11
Merge pull request #9764 from Noshyaar/pr-fix2
...
Add object type hint for docs
2017-07-24 08:07:32 +02:00
Poommetee Ketson
2777f81d29
Add object type hint for docs
2017-07-23 18:57:03 +07:00
Bojidar Marinov
140f189a65
Add .to_local/.to_global methods on Node2D and Spatial
...
Those are just helpers around get_global_transform().affine_inverse().xform() and get_global_transform().xform().
Closes #6087
2017-07-23 14:37:26 +03:00
Poommetee Ketson
49331fbd63
Sprite: fix disconnect nonexistent signal
2017-07-23 01:02:33 +07:00
Poommetee Ketson
49c7620326
Add object type hint for docs
2017-07-19 02:03:34 +07:00
Rémi Verschelde
738d6c0afc
Merge pull request #9355 from TwistedTwigleg/Remote_node_enhancement
...
RemoteTransform and RemoteTransform2D enhancements
2017-07-11 11:11:29 +02:00
Thomas Herzog
f9c99486b0
Merge pull request #9592 from RandomShaper/remove-warns
...
Remove warnings about benign situations
2017-07-10 22:23:11 +02:00
Pedro J. Estébanez
7d308797ad
Remove warnings about benign situations
2017-07-10 16:20:56 +02:00
TwistedTwigleg
3400c42c4d
Added the following features to RemoteTransform and RemoteTransform2D:
...
- Added the ability to toggle changes in position, rotation, and scale
- Added the ability to toggle changes in either local or global coordinates
2017-07-05 16:29:48 -04:00
Johan Manuel
00afca31c6
Use the gravity constant to calculate weights
2017-07-05 15:14:12 +02:00
TwistedTwigleg
a6feb0943a
Fixed set_global_scale in Node2D.
2017-07-03 13:28:26 -04:00
Bojidar Marinov
4d2642b666
Readd tilemap's shape_transform and bugfixes
...
This reverts commit a808f53020
.
2017-07-01 20:56:51 +03:00
Juan Linietsky
a808f53020
Revert "Fix Tileset/tilemap issues related to my adding of one-way collisions to them"
2017-07-01 13:02:04 -03:00
Juan Linietsky
2a3e00c8c7
-Many fixes to VisualScript, fixed property names, etc.
...
-Added ability to set/get a field in GetSet, as well as assignment ops
-Added a Select node
-Fixed update bugs related to variable list and exported properties, closes #9458
2017-06-30 21:35:05 -03:00
Bojidar Marinov
80356f925c
Fix #9409 , fixup #9370 ; tileset now has shape transform instead of offset
...
Fix bad return type in CollisionObject2D, Shape -> Shape2D. Was causing unintended null when casting. (9409)
Fix a misplaced ++ operator. (9370)
Fix merging with exiting tileset duplicating shapes. (9370)
2017-06-30 19:01:20 +03:00
Robert Hernandez
f0f407e76e
Texture region now updates when changing an Atlas
...
- Removed atlas_changed signal for AtlasTexture
- Changes are now handled by _notify_change
- Removed unneccesary signal connections
- Texture preview now updates in real-time
Fixed TextureRegionEditor constantly regenerating
2017-06-29 10:49:24 -04:00
Juan Linietsky
3ce046ee0c
-Fixed SCREEN_TEXTURE and other related 2D shader parameters.
...
-Fixded BackBuffercopy object
2017-06-26 22:58:46 -03:00
Rémi Verschelde
b0516e0412
Merge pull request #9296 from TwistedTwigleg/Camera2D_enhancements_V2
...
Camera2D enhancements (V2)
2017-06-26 23:37:25 +02:00
Rémi Verschelde
f2bc0cc966
Merge pull request #9370 from bojidar-bg/c-9318-oneway-tilemaps
...
Add one-way collisions and individual shape offsets for tilesets
2017-06-26 22:47:26 +02:00
Rémi Verschelde
f7b77e5b76
Merge pull request #9318 from bojidar-bg/readd-normal-tilemap
...
Add normal map to tilemaps and tilesets
2017-06-26 22:47:11 +02:00
Juan Linietsky
d41978eb63
Usability improvements for folding. Unfortunately SpatialMaterial broke compatibility.
2017-06-25 18:57:28 -03:00
TwistedTwigleg
7d77406980
Added some editor enhancements to Camera2D. Added the option to draw Camera2Ds bounds and drag margins. Added options to toggle the drawing of Camera2Ds lines in the editor. When a Camera2D is marked as current, its lines become a little less transparent.
2017-06-25 16:05:44 -04:00
Bojidar Marinov
207feb2f87
Add one-way collisions and individual shape offsets for tilesets
...
As requested in #9318
Accidentially fixes #2231 as well
2017-06-25 21:47:30 +03:00
Juan Linietsky
83ae9a5e28
Ability to restart particle system with a function call
2017-06-25 08:01:50 -03:00
Poommetee Ketson
e3998528e0
BuildSystem: generated files have .gen.extension
2017-06-25 07:55:01 +07:00
Juan Linietsky
bc509ac7bd
Simplified 2D Kinematicbody.. 3D will wait a bit.
2017-06-24 12:34:29 -03:00
Juan Linietsky
6ba1e4677b
-Trigger shapes removed in 2D, they became obsolete long ago when areas could detect their own overlap
...
-Added ability to disable individual collisionshape/polygon
-Moved One Way Collision to shape, allowing more flexibility
-Changed internals of CollisionObject, shapes are generated from child nodes on the fly, not stored inside any longer.
-Modifying a CollisionPolygon2D on the fly now works, it can even be animated.
Will port this to 3D once well tested. Have fun!
2017-06-23 23:39:52 -03:00
Juan Linietsky
8ef1c41a4e
Small fixes required to get platformer to work.
...
Added back CanvasItemMaterial
2017-06-23 14:31:59 -03:00
Juan Linietsky
265d4e2d6c
Fixed bug regarding to two spatial 2d players not mixing properly
2017-06-22 17:50:03 -03:00
Bojidar Marinov
2edb082c7e
Add normal map to tilemaps and tilesets
...
Fixes #9310
2017-06-22 18:15:50 +03:00
Juan Linietsky
fb72edf45e
Properly exposed material types everywhere.
2017-06-22 09:33:20 -03:00
Rémi Verschelde
e3b34810e3
Fix tools=no build
...
This house is falling apart when I'm not around...
2017-06-22 12:12:30 +02:00
Juan Linietsky
95560e02c5
2D GPU Particles working..
2017-06-21 16:26:26 -03:00
Thomas Herzog
ceded65c01
Merge pull request #9257 from Shockblast/patch-1
...
Remove Duplicate Include
2017-06-20 10:58:00 +02:00
Shockblast
3e733d0f92
Remove Duplicate Include
...
Also solves a problem with AnimatedSprites, when you add sprites for the animation the engine crash
2017-06-19 20:52:10 -04:00
Benjamin Dahse
b95f57d050
Add null-check to get_normal_frame
2017-06-20 00:37:34 +02:00
Juan Linietsky
0288be1e76
Texture rect_region drawing now clamps UV to avoid bleeding. This avoids scenarios like single-texture tilemap tiles leaking pixels to the next tile when filter is enabled on it.
2017-06-18 22:55:02 -03:00
Juan Linietsky
969fa3cc73
-Added AudioStreamPlayer2D, for 2D positional sound
...
-Added ability for Area2D to redirect positional sound to a specific audio bus
2017-06-18 21:07:32 -03:00
Juan Linietsky
33bf180067
Added normalmap support to stylebox and animated sprite.
2017-06-18 00:03:28 -03:00
Juan Linietsky
5c6cac4e53
Add normalmap support for drawing in all low level primitives. Only added support in Sprite so far.
2017-06-17 23:27:42 -03:00
Rémi Verschelde
b7a2a40b8e
Merge pull request #9176 from RandomShaper/fix-touchbutton
...
Fix/improve TouchScreenButton
2017-06-15 12:38:59 +02:00