Commit graph

1034 commits

Author SHA1 Message Date
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
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
Marcel Admiraal
750f343e4a Ensure move_and_slide() is consistent between the 2D and 3D versions.
In the 3D version:
- Partially revert #20908 that was reverted in the 2D version as part
  of #21653. This ensures that the Vector returned is always perpendicular
  to the surface collided with; and not the floor_normal Vector passed to
  the function when on a floor.
- Include an update of the floor velocity before multiplying by the time
  delta, which was added to the 2D version as part of commit 13a8014.

In the 2D version:
- Use the Vector2.slide() function instead of Vector2.tangent() to adjust
  the amount of motion the stop_on_slope undoes to ensure that it is in the
  right direction. This is a implementation of the 3D approach from #30588.
- Combine the !found_collision and motion == Vector2() checks for break.
- Other minor formating changes to make the functions look identical.

Also renamed some variables to align with their use.
2019-12-02 08:35:50 +01:00
Tomasz Chabora
7e6fa6c7a8 Remove unnecessary bounded_offset from PathFollow2D 2019-11-30 03:16: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
Rémi Verschelde
5ef5e6a7e4
Merge pull request #32274 from raphael10241024/fix_sync_physics_jitter
fix kinematicBody2D jitters when sync_to_physics is turned on
2019-11-21 08:53:24 +01:00
Rafał Mikrut
99d8626f4a Fix some overflows and unitialized variables 2019-11-20 16:22:16 +01:00
Rémi Verschelde
3c0c8f26f9 Revert "Fixed TouchScreenButton::shape_centered having no effect"
This reverts commit 127c2d75ad.

This was a misunderstanding as #32725 is not a bug but expected
behavior.

Reverts #32927.
Supersedes and closes #33436.
2019-11-08 10:54:36 +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
9e1be8f8aa
Merge pull request #32934 from ajweeks/fix-scale-origin
Fix 2D scale gizmo placement
2019-10-30 12:04:10 +01:00
Mikolaj Kaczmarek
a245bab78d Fixed disconnecting not connected signal 2019-10-29 00:53:48 +01:00
Rémi Verschelde
2416fbb4e2
Merge pull request #31943 from codecustard/Fixes_invalid_frames_on_reverse_anim
Fixes Reverse Animation Starting on First Frame
2019-10-27 09:55:44 +01:00
Rémi Verschelde
3eb8bd08ec
Merge pull request #32657 from ptrojahn/lines
Fix draw_rect
2019-10-26 23:09:24 +02:00
PouleyKetchoupp
1e0f37a70f Fixed emitting not initialized correctly in cpu particles 2d/3d
Fixes uninitialized variable caused by PR #32921
2019-10-24 21:38:01 +02:00
Rémi Verschelde
19fa163d9a
Merge pull request #32992 from KoBeWi/AUTOVECTORZ
Auto-increment frame_coords when keying
2019-10-23 07:42:52 +02:00
Rémi Verschelde
72dfa67dd3
Merge pull request #32924 from ajweeks/add-ruler-arcs
Draw arcs to indicate angles being measured by ruler
2019-10-22 22:44:50 +02:00
Tomasz Chabora
6c0ef9f729 Auto-increment frame_coords when keying 2019-10-22 20:12:55 +02:00
AJ Weeks
fb7a4ce63e Fix canvas scale gizmo placement 2019-10-22 18:17:54 +01:00
Rémi Verschelde
4ecc30cc5e
Merge pull request #32927 from Muller-Castro/ShapeCenteredFix
Fixed TouchScreenButton::shape_centered having no effect
2019-10-22 15:53:29 +02:00
Rémi Verschelde
17a7da3b85
Merge pull request #32921 from nekomatata/fix-cpu-particle-delay
Fixed delay when CPUParticles & CPUParticles2D start being emitted
2019-10-22 14:28:04 +02:00
Rémi Verschelde
bd23cce055
Merge pull request #32896 from nekomatata/joint-reset-collision
Properly reset collision exception when releasing Joint2D
2019-10-22 12:52:12 +02:00
PouleyKetchoupp
5bf516a062 Fixed delay when CPUParticles & CPUParticles2D start being emitted
Particles were processed only on the next frame after the emission started, causing a one frame delay in rendering. Now the first process cycle is started during the same frame, which makes them consistent with Particles & Particles2D.

Fixes #32890
2019-10-20 09:50:00 +02:00
Muller-Castro
127c2d75ad Fixed TouchScreenButton::shape_centered having no effect
The problem was that the shape_centered depended on TouchScreenButton::texture having a Texture
2019-10-19 18:16:47 -03:00
AJ Weeks
59d2c71227 Add arcs to indicate angle being measured by ruler 2019-10-19 19:45:56 +01:00
PouleyKetchoupp
0de76cc647 Properly reset collision exception when releasing Joint2D
Now using joint_disable_collisions_between_bodies() to reset the exception, because body_remove_collision_exception() was doing only a part of the work.

Fixes #32733
2019-10-17 19:22:59 +02:00
Emmanuel Barroga
94a00cd9c7 Fixes Reverse Animation Starting on First Frame
When playing an animation in reverse, the animation initially starts on frame 0. If it loops, it'll play normally by going to the last frame of the animation, but if it does not... it prematurely stops, since it is already on the last frame (for reversed animation) by starting on frame 0.
2019-10-16 04:26:26 -07:00
Marcel Admiraal
f34deabd10 Correct change made to joints_2d.cpp by 072e403. 2019-10-15 17:55:35 +02: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
Gilles Roudiere
b27ec4aea7 Fixes Sprite frame_coords 2019-10-13 08:44:44 +02:00
Paul Trojahn
bdaedb601c Fix draw_rect
OpenGL uses the diamond exit rule to rasterize lines. If we don't shift
the points down and to the right by 0.5, the line can sometimes miss a
pixel when it shouldn't. The final fragment of a line isn't drawn. By
drawing the lines clockwise, we can avoid a missing pixel in the rectangle.
See section 3.4.1 in the OpenGL 1.5 specification.
Fixes #32279
2019-10-11 10:26:53 +02:00
qarmin
bb685147f9 Fix crash in TileMap::update_cell_bitmask 2019-10-08 15:46:38 +02:00
Rémi Verschelde
f84bf7e8a8
Merge pull request #32351 from nekomatata/texture-rect-size-update
Update TextureRect when its Texture is modified directly
2019-10-07 08:57:17 +02:00
PouleyKetchoupp
c7834ee566 Update TextureRect and Sprite when their Texture is modified directly.
Modified Sprite to use "changed" signal instead of _changed_callback to make it work when tool is disabled (change receptors are editor only).

Fixes #32349
2019-10-05 17:32:46 +02:00
qarmin
f435a6f0b6 Fix crash in TileMap::fix_invalid_tiles 2019-10-05 11:37:38 +02:00
Rémi Verschelde
9327eb226a
Revert "Fixes CPUParticles2D not making use of AtlasTextures" 2019-10-02 09:44:06 +02:00
Rémi Verschelde
09bf1b35c0
Merge pull request #32459 from bitstopper/master
Fixes CPUParticles2D not making use of AtlasTextures
2019-10-02 08:48:19 +02:00
bitstopper
9f21fcf879 Fixes CPUParticles2D not making use of AtlasTextures
Fixes CPUParticles2D not making use of AtlasTextures #2
2019-10-01 14:04:37 +02:00
Soumya Lahiri
a1b2364dba Altered rotation_degrees range 2019-09-30 20:43:57 +05:30
bob
943471dd02 Fix TileMap world_to_map rounding issue for negative integers
The previous code would fail for negative integer values like -3.0
(would return -4 instead of -3).

Fixes #31468.
2019-09-26 08:47:24 +02:00
Rémi Verschelde
076dc9803a
Merge pull request #32119 from Calinou/unify-axis-colors
Use the same axis colors consistently in the 2D and 3D editors
2019-09-25 13:03:47 +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
Rémi Verschelde
0c3335d1f3
Merge pull request #32309 from clayjohn/particles_tex_scale
Fix particles scale randomization
2019-09-24 18:05:44 +02:00
clayjohn
bc94203add fix particles scale randomization 2019-09-24 08:03:53 -07:00
RaphaelHunter
101f1b802b fix kinematicBody2D jitters when sync_to_physics is turned on, closes #28181 2019-09-23 20:01:01 +08:00
qarmin
50be65bf43 Changed some code found by Clang Tidy and Coverity 2019-09-22 18:45:08 +02:00
luz.paz
91ecd7b6a6 Fix misc. source comment typos
Found using `codespell -q 3 -S ./thirdparty,*.po -L ang,ba,cas,dof,doubleclick,fave,hist,leapyear,lod,nd,numer,ois,paket,seeked,sinc,switchs,te,uint -D ~/Projects/codespell/codespell_lib/data/dictionary.txt `
2019-09-19 14:36:52 -04:00
Hugo Locurcio
c2bcc3f700
Use the same axis colors consistently in the 2D and 3D editors 2019-09-13 14:08:41 +02:00
Rémi Verschelde
720065c721
Merge pull request #31476 from SoulForMachine/fix-move-and-slide-error
Prevent move_and_slide() to generate an error.
2019-09-03 12:51:42 +02:00