Commit Graph

2693 Commits

Author SHA1 Message Date
Kaligule 050c4dab00 Add a reference to pow to the description of exp.
This might be especially usefull since godot script doesn't support ** or ^ as operators, so beginners might search for the exponential function, when what they really need is the pow function.

This is exactly what happened to me and since I couldn't find helpfull information in the documentation I had to look it up online, where I found the answer on a helpfull [reddit thread](https://www.reddit.com/r/godot/comments/3mvwz0/how_do_i_do_exponents_in_godot/).

@akien-mga told me how to reference methods here:
godotengine#30909

(cherry picked from commit a2c81a7455)
2019-11-08 15:48:19 +01:00
George Marques 82b15ab469 GDScript: Fix type resolution not being return in some cases
Some situations caused the parser node type to not being update when
trying to resolve the type, returning invalid data and breaking the
parsing when it shouldn't. This patch fix the behavior.

(cherry picked from commit 64d09b7de5)
2019-11-08 15:48:19 +01:00
Michael Alexsander Silva Dias e384d77194 Fix 'GDNativeLibrary' editor being incorrectly opened
(cherry picked from commit 147990cb6d)
2019-11-08 15:48:19 +01:00
Ignacio Etcheverry b6bcd09d7c C#: Fix Color.ToHtml()
(cherry picked from commit 57fe284fe6)
2019-11-08 15:48:19 +01:00
shaderbeast a07d53b262 Mark class_name line as safe in editor
(cherry picked from commit 1e6a52b215)
2019-11-08 15:48:19 +01:00
Cameron Reikes 781006e25a Expression before 'is' may be null
(cherry picked from commit 2339e85b78)
2019-11-08 15:48:19 +01:00
Bojidar Marinov 8112025573 Re-allow indexing on "self" and object types in GDScript
Fixes #25081

(cherry picked from commit e3d05fa42d)
2019-11-08 15:48:19 +01:00
George Marques c9a5ca7ca5 GDScript: Add _ prefix on class name in type compatibility check
This makes sure that the classes internally represented with an
underscore (_) prefix, such as singletons, are still properly checked
for inheritance in the ClassDB.

(cherry picked from commit 05465b9693)
2019-11-08 15:48:19 +01:00
Marcel Admiraal 37f7dcf3bc Call activate function when setting RigidBodyBullet activation state.
(cherry picked from commit 0539023fd4)
2019-11-08 15:48:19 +01:00
Michael Alexsander Silva Dias b7e644bd26 Make 'break' and 'continue' be marked as safe
(cherry picked from commit a8826ad3b8)
2019-11-08 15:48:19 +01:00
Xenoamor 90abe89662 Fix GridMap list text not expanding when palette is resized
This is to close #31304

(cherry picked from commit 69438149f5)
2019-11-08 15:48:19 +01:00
Bastiaan Olij ea3a42c500 Fix self reference issue in core structures for GDNative plugins
(cherry picked from commit bf9a97c2cb)
2019-11-08 15:48:18 +01:00
Ignacio Etcheverry ef92c9740f Make git no longer ignore solution files inside the mono module
(cherry picked from commit 33c0d47273)
2019-11-08 15:48:18 +01:00
Fabio Alessandrelli 53c2e2da50 WebSocketServer now sanitize destination peers.
When relaying messages in multiplayer mode.
Could cause a crash in case a malicious client sends a bogus packet and
for those cases where a peer has just disconnected and a message arrive
from another peer with the disconnected one as destination.

(cherry picked from commit 17be67b8c7)
2019-11-08 15:48:18 +01:00
Fabio Alessandrelli cd0ba31533 Fix WebSocketServer relaying message 2 times.
The WebSocketMultiplayerPeer was relaying the same message two times,
both in _server_relay and _process_multiplayer (which was only supposed
to store the packet, given the server was one of the destination).

_process_multiplayer now only store the packet, and calls _server_relay
which will relay the message to other clients if needed.

(cherry picked from commit d1539db2c6)
2019-11-08 15:48:18 +01:00
Ignacio Etcheverry aa8386c593 Mono: Force preemptive thread suspend mode as a temporary workaround
(cherry picked from commit 5a6070dde3)
2019-11-08 14:01:49 +01:00
Harley Laue 6befb0836e Allow building cvtt with system squish
It looks like the SCsub for cvtt was copied from squish and it left
the `if env['build_squish']:` line intact. This means that using
`scons builtin_squish=no modules/cvtt` would fail and overal builds
would also fail because they'd fail to find `ConvectionKernels.h`

(cherry picked from commit 0fbd00f656)
2019-11-08 14:00:39 +01:00
sheepandshepherd e46f2be4d7 Document GDNativeLibrary
(cherry picked from commit 04dbcd7f5a)
2019-11-08 13:09:55 +01:00
ktksgit eedf4b27a1 Fix crash in PluginScript destructor 2019-11-05 23:30:42 +01:00
Anish c70a3671b0 Fixes VideostreamGDNative crash on audio_channel=0.
Added an if case to check if the mix_callback exists before running any
of the audio code.

Fixes: #28644
(cherry picked from commit f0757f31a4)
2019-09-26 14:48:53 +02:00
Bojidar Marinov 33b2d65f98 Fix slight issues with autocompletion and member lists in GDScript
Fixes #27152
Fixes #28591

(cherry picked from commit f9d9530902)
2019-09-26 14:48:16 +02:00
Andrii Doroshenko (Xrayez) 9114357bc5 Fix BMP loader to distinguish between compression types
Some of the values in compression enumeration represent uncompressed formats:

https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-wmf/4e588f70-bd92-4a6f-b77f-35d0feaf7a57

This allows the loader to proceed with uncompressed formats.
Note that loading compressed BMP's is still not supported.

(cherry picked from commit 422a8ffe02)
2019-09-26 14:42:51 +02:00
Andrii Doroshenko (Xrayez) f8dce7ade9 Fix BMP loader incorrectly interpreting color table size
Color table should exist for images with bit count <= 8. Importing 16-bit
BMP images could also likely have a color table but they're not currently
supported in Godot.

(cherry picked from commit d5c5aabbf2)
2019-09-26 14:42:13 +02:00
Andrii Doroshenko (Xrayez) 5dd3d3dadf Import 4/1 bit bmp images
Add some sanity checks according to bmp specification.

Read color table and index data within the same scope and
then simply extend the color palette.

This particular implementation has one limitation: not all 4/1 bit images
can be imported as it requires bit unpacking (size dimensions must be
a multiple of 8 for 1-bit and 2 (even) for 4-bit images).

(cherry picked from commit 6484da5721)
2019-09-26 14:41:27 +02:00
Shinryuuji c6ee986f53 Add support for 8bpp bmp files
(cherry picked from commit b9578b8f46)
2019-09-26 14:41:04 +02:00
Vasiliy Makarov d3422f8cf7 Fix pvrtc encoder
Always resize image to square of power2
Enable mipmaps only if original texture has it enabled
Fix #28534, #28541

(cherry picked from commit 4009d26022)
2019-09-24 09:00:46 +02:00
Andrii Doroshenko (Xrayez) f6c0078264 Fix TGA indexed images loaded with flipped color table
This fixes incorrect color table lookup where red and blue channels were flipped.

(cherry picked from commit d0f0f1f1cb)
2019-09-24 09:00:45 +02:00
ShyRed a849625813 Fix missing re-activation of bullet physics sleep feature
Adds the missing option of re-enabling the sleep feature in bullet physics once a body had the sleep feature disabled.

(cherry picked from commit 0877cf6419)
2019-09-24 09:00:45 +02:00
hbina085 8c2e10c393 Many fallthrough switch cases now have the FALLTHROUGH macro to tell the compiler that this is intended.
(cherry picked from commit 9f0c6a6009)
2019-09-24 09:00:45 +02:00
Rémi Verschelde fc18d637a8 Fix -Wimplicit-fallthrough warnings from GCC 8
Adds `FALLTHROUGH` macro to specify when a fallthrough is intentional.
Can be replaced by `[[fallthrough]]` if/when we switch to C++17.

The warning is now enabled by default for GCC on `extra` warnings level
(part of GCC's `-Wextra`). It's not enabled in Clang's `-Wextra` yet,
but we could enable it manually once we switch to C++11. There's no
equivalent feature in MSVC for now.

Fixes #26135.

(cherry picked from commit fc370b3feb)
2019-09-24 09:00:45 +02:00
qarmin 3b703d6707 Small fixes, mostly dupicated code
(cherry picked from commit 856a8226a5)
2019-09-24 09:00:45 +02:00
Aaron Franke 3a7aa3a0e4
[3.1] [Mono] Make all structs serializable
Manually cherrypicked from https://github.com/godotengine/godot/pull/31191
2019-08-19 19:23:18 -04:00
Aaron Franke 329817edad
[3.1] [Mono] Backport gitignore files
This avoids seeing files generated on master when switching to the 3.1 branch.
2019-08-19 19:19:21 -04:00
Rémi Verschelde a5082c010a doc: Fix invalid tags or properties introduced in recent cherry-picks 2019-07-29 17:55:20 +02:00
Michael Alexsander Silva Dias eef5dc98fa Update some dead links in the codebase
(cherry picked from commit 12ae7a4c02)
2019-07-29 17:47:46 +02:00
Remi Rampin 417f223e63 DOC: Fix spelling
See also https://github.com/godotengine/godot-docs/pull/2595

(cherry picked from commit ddfd67401f)
2019-07-29 17:47:46 +02:00
tree786 37e9ec842c doc: UPNP: Add example on how to open/close a port
I have added a small code sample to show how to automate the process of port forwarding (and closing after you are done).
Thanks to @mhilbrunner for explaining how to achieve t0his (see #18780)

(cherry picked from commit 2a63853720)
2019-07-29 17:47:46 +02:00
Rémi Verschelde 383c678a1e doc: Replace all [code]CONSTANT[/code] by new [constant CONSTANT] hyperlinks
(cherry picked from commit bc82781f7d)
2019-07-29 17:32:54 +02:00
Rémi Verschelde 7a97fd99c7 Properly expose all Error constants to scripting languages
(cherry picked from commit 1bf448dd87)
2019-07-29 17:32:54 +02:00
Rémi Verschelde 755896b036 doc: Complete and harmonize all _MAX constant descriptions
(cherry picked from commit 86ed7a9884)
2019-07-29 17:32:53 +02:00
Chaosus 67efb30f2a Extends wrapi/wrapf docs
(cherry picked from commit 4c137bebe8)
2019-07-29 16:17:43 +02:00
Rémi Verschelde 0893bb9a02 doc: Improve docs for Resource* classes
Also move module-specific classes to their own module's `doc_classes`
folder.

(cherry picked from commit 0764451dc5)
2019-07-29 16:05:01 +02:00
Tomasz Chabora dea5dafea5 Consistently wrap booleans in [code]
(cherry picked from commit b0846f60c9)
2019-07-29 14:54:32 +02:00
Rémi Verschelde df6a6a2004 doc: Sync classref with current source 2019-07-05 11:34:47 +02:00
Fabio Alessandrelli a24e681e1c Fix ENet incorrectly binding to wildcard.
Values were not properly initialized, and wildcard would evaluate to
true in most cases.

(cherry picked from commit abe2c22966)
2019-07-03 16:32:41 +02:00
hilfazer c7551515e3 autocomplete for enum values
(cherry picked from commit ca1932636f)
2019-06-27 09:59:58 +02:00
Aaron Franke a51257e2b7
[Mono] Change Atan2 arguments to Y X 2019-06-09 04:15:32 -04:00
Rémi Verschelde 5f683f7c17 SCons: Clean xatlas SCsub from thekla/poshlib defines
Those are not used in xatlas.

(cherry picked from commit eb155bc91a)
2019-06-04 11:11:21 +02:00
Fabio Alessandrelli 0e6a49a5bc Freetype clone env for no-SMID single file
Fix freetype build issue for javascript platform.
When disabling optimizations (SMID) in specific freetype, source files,
we need to make sure to copy all other CPPFLAGS, not just override them.

(cherry picked from commit 4f9408a0f8)
2019-06-04 11:08:40 +02:00
Fabio Alessandrelli 20a37529f5 Revert "Update libwebsockets to 3.1 (plus UWP patch)"
This reverts commit 90210c4862.

(cherry picked from commit be414e4476)
2019-06-04 11:05:33 +02:00