Commit graph

786 commits

Author SHA1 Message Date
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 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
Hugo Locurcio 1c419531a0 Change ".." punctuation for "..." in editor strings (#16507) 2018-04-22 19:36:01 +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 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
Rémi Verschelde 9a4110a451
Merge pull request #17391 from PJB3005/18-03-09-fix-canvas-light-shaders
Fixes canvas light shaders.
2018-04-18 13:31:28 +02:00
Poommetee Ketson 59b816679e
Fix typos in shader_language.cpp 2018-04-17 19:21:00 +07:00
Pieter-Jan Briers 25ba49fd88 Fixes canvas light shaders.
Fixes #16904

Restore more out functionality, fix built-ins.

Requested changes, I think?
2018-04-13 15:18:28 +02:00
Poommetee Ketson 72aa87758a
Update classref and docs, fix missing parameters' name 2018-04-11 10:20:22 +07:00
Juan Linietsky 20e68fef85
Merge pull request #17151 from ShyRed/disabled_shapes_2d
Remove disabled shapes from physics 2D calculations
2018-04-08 11:16:55 -03:00
Juan Linietsky 8a5fb669ae
Merge pull request #17421 from Chaosus/fixshaderbugs
Fix few bugs in shader definitions
2018-04-08 09:33:12 -03:00
Juan Linietsky 10448063c4
Merge pull request #17594 from ivodopiviz/float-overflow
Changed debug max distance to avoid overflow
2018-04-08 09:14:29 -03:00
Juan Linietsky 1570a72eee
Merge pull request #17742 from marcelofg55/audio_device_list
Added new audio device functions to set/get the audio device
2018-04-07 16:40:47 -03:00
Chaosus d974fa1780 Removed redundant abs shader builtin 2018-03-28 12:50:55 +03:00
Marcelo Fernandez ecc1b34cbc Added new audio device functions to set/get the audio device 2018-03-26 17:41:05 -03:00
Rémi Verschelde c537107af9
Merge pull request #17680 from beniwtv/master
Fix compressor audio effect sidechain selection
2018-03-23 10:47:11 +01:00
Rémi Verschelde aebe55210a
Merge pull request #17532 from BastiaanOlij/arvr_enhancements
A few enhancements on the ARVR Server
2018-03-23 10:15:15 +01:00
Marcelo Fernandez 9042ef3836 Fix missing const in CapsuleShapeSW::get_area 2018-03-21 23:58:40 -03:00
Benedikt Bär 7792dfe554 Fix compressor audio effect sidechain selection 2018-03-21 22:45:30 +01:00
Rémi Verschelde a238e53da9
Merge pull request #17637 from robfram/fix-draw_polyline_colors-crash
Fix crash in `canvas_item_add_polyline` when passing more points than colors
2018-03-20 11:23:15 +01:00
robfram 8eedb2afe2 Fix crash in canvas_item_add_polyline when passing more points than colors
When `p_points.size() > p_colors.size()`, it crashed with invalid
array access to `p_colors`. Also, when `p_colors` was an empty
`Vector` it crashed due a missing `else` checking the `size`
condition, as the code handling that special case exists.

This PR fixes the missing `else` for `p_colors.size == 0` and,
following the `canvas_item_add_multiline` spirit, it only uses the
first color for the whole polyline if points and colors differ in
size.

Fix #17621.
2018-03-19 19:22:38 +01:00
Marcelo Fernandez 87ebdd6041 Fix possible crash when audio channels change 2018-03-19 09:00:11 -03:00
Ivan Vodopiviz 55f79f2e80 Changed debug max distance to avoid overflow
Changed it to roughly sqrt(FLT_MAX), it's a little less to account for float inaccuracies.
Fixes #1835
2018-03-17 23:32:07 +01:00
Hein-Pieter van Braam 395ecc2235
Merge pull request #16964 from mrcdk/audio_server_bus_changed_fix
AudioServer emit bus_layout_changed signal when adding, moving or del…
2018-03-16 00:10:52 +01:00
Hein-Pieter van Braam 009b0bab49
Merge pull request #17248 from Cygon/implement-extra-culling-margin
Apply culling margin (fixes issue #16115)
2018-03-15 23:45:59 +01:00
JFonS 479f531635 Hinted shader uniforms can have a default value 2018-03-15 15:23:40 +01:00
Bastiaan Olij 5356423377 A few fixes on the ARVR Server 2018-03-15 23:31:02 +11:00
Rémi Verschelde b1ae5ea407
Merge pull request #17040 from AndreaCatania/patch-2
Deprecated Godot 3D physics engine
2018-03-13 13:46:08 +01:00
Rémi Verschelde 27a3447790
Merge pull request #17402 from Chaosus/fixmix
Fix invalid mix function overload
2018-03-13 08:43:07 +01:00
Wilson E. Alvarez e9ac87390c Fixed several leaks in VisualServerScene, RasterizerSceneGLES3 and RasterizerGLES3 2018-03-13 00:22:08 -04:00
Chaosus 2d428a350e Fix few bugs in shader definitions 2018-03-10 21:00:18 +03:00
Chaosus 97bef8d908 Fix invalid mix function overload 2018-03-10 12:56:43 +03:00
Rémi Verschelde 47addcf9d0
Merge pull request #17354 from SaracenOne/shader_token_name_fix
Make the shader token names consistent.
2018-03-09 10:39:22 +01:00
Saracen b095e21d91 Make the shader token names consistent. 2018-03-07 23:56:47 +00:00
Bernhard Liebl 9d7856620c Bring back Vector2.cross() 2018-03-07 21:10:31 +01:00
ShyRed 4d6bb43931 Remove disabled shapes from physics
Disabling a shape removes it from physics calculations. Enabling a shape adds it back to the physics calculations.
2018-03-07 18:03:44 +01:00
Markus Ewald fc166f3ee1 Implement VisualServerScene::instance_set_extra_visibility_margin() method to actually apply extra culling margin and mark instance AABB dirty 2018-03-04 14:20:59 +01:00
Chaosus c6b6af7bb5 Fix floatBitsToUint function 2018-03-03 16:22:36 +03:00
Andrea Catania 134cca0cf2 Fixed physics server typo 2018-02-27 08:42:09 +01:00
Andrea Catania 5de5a4140b
Deprecated Godot 3D physics engine 2018-02-26 12:51:30 +01:00
Poommetee Ketson eb63f7b071 [DOCS] Sync classref with current source 2018-02-25 15:14:25 +07:00
MrCdK 56dcf4b983 AudioServer emit bus_layout_changed signal when adding, moving or deleting a bus 2018-02-23 23:42:57 +01:00
Juan Linietsky 7cd867c3fe 2D Skeletons WORK IN PROGRESS 2018-02-21 17:24:00 -03: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 497a4e9e25
Merge pull request #16757 from AndreaCatania/kinpush
Improved kinematic body, Now can move rigid body
2018-02-20 15:41:10 +01:00
Andrea Catania 6ed392f47a Improved kinematic body 2D and 3D, Now can move rigid body 2018-02-20 12:43:47 +01:00
Juan Linietsky 4c56edfb83
Revert "Handle single-argument constructors in uniform default values" 2018-02-20 07:28:22 -03:00
Rémi Verschelde 05a8675f82
Merge pull request #15985 from Nallebeorn/uniforms-single-argument-constructors
Handle single-argument constructors in uniform default values
2018-02-20 11:26:26 +01:00
Rémi Verschelde b2aeb02e7d
Merge pull request #16530 from AndreaCatania/rays
Improved ray shape (2D and 3D) by addiing the possibility to act as r…
2018-02-19 22:15:49 +01:00