Age | Commit message (Collapse) | Author |
|
|
|
EditorDebuggerServer::register_protocol_handler must not be called before
editor initialization. Otherwise, if the editor is never initialized,
the added StringName will not be released until static destructors are
called (instead of being release during editor deinitialization).
|
|
Using clang-tidy's `readability-braces-around-statements`.
https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
|
|
I couldn't find a tool that enforces it, so I went the manual route:
```
find -name "thirdparty" -prune \
-o -name "*.cpp" -o -name "*.h" -o -name "*.m" -o -name "*.mm" \
-o -name "*.glsl" > files
perl -0777 -pi -e 's/\n}\n([^#])/\n}\n\n\1/g' $(cat files)
misc/scripts/fix_style.sh -c
```
This adds a newline after all `}` on the first column, unless they
are followed by `#` (typically `#endif`). This leads to having lots
of places with two lines between function/class definitions, but
clang-format then fixes it as we enforce max one line of separation.
This doesn't fix potential occurrences of function definitions which
are indented (e.g. for a helper class defined in a .cpp), but it's
better than nothing. Also can't be made to run easily on CI/hooks so
we'll have to be careful with new code.
Part of #33027.
|
|
Which means that reduz' beloved style which we all became used to
will now be changed automatically to remove the first empty line.
This makes us lean closer to 1TBS (the one true brace style) instead
of hybridating it with some Allman-inspired spacing.
There's still the case of braces around single-statement blocks that
needs to be addressed (but clang-format can't help with that, but
clang-tidy may if we agree about it).
Part of #33027.
|
|
|
|
Using clang-tidy's `modernize-use-nullptr`.
https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-nullptr.html
|
|
|
|
Can be manually set, let's not pollute them further.
Should also be done for WebRTC.
|
|
Move copyToFS into utils.js library included with '--pre-js'.
|
|
|
|
Configured for a max line length of 120 characters.
psf/black is very opinionated and purposely doesn't leave much room for
configuration. The output is mostly OK so that should be fine for us,
but some things worth noting:
- Manually wrapped strings will be reflowed, so by using a line length
of 120 for the sake of preserving readability for our long command
calls, it also means that some manually wrapped strings are back on
the same line and should be manually merged again.
- Code generators using string concatenation extensively look awful,
since black puts each operand on a single line. We need to refactor
these generators to use more pythonic string formatting, for which
many options are available (`%`, `format` or f-strings).
- CI checks and a pre-commit hook will be added to ensure that future
buildsystem changes are well-formatted.
|
|
This addresses the issue godotengine/godot#37143
|
|
For us, it practically only changes the fact that `A<A<int>>` is now
used instead of the C++03 compatible `A<A<int> >`.
Note: clang-format 10+ changed the `Standard` arguments to fully
specified `c++11`, `c++14`, etc. versions, but we can't use `c++17`
now if we want to preserve compatibility with clang-format 8 and 9.
`Cpp11` is still supported as deprecated alias for `Latest`.
|
|
Eval should be rechecked.
|
|
Handle removal of Pool*Array types and other recent changes.
|
|
Typed `PoolTypeArray` types are now renamed `PackedTypeArray` and are
sugar for `Vector<Type>`.
|
|
|
|
|
|
This should greatly decrease latency for the most common use cases.
A new function WebSocketPeer::set_no_delay will allow to configure it if
so desired.
|
|
Lower WebSocket latency, fixes.
|
|
We already removed it from the online docs with #35132.
Currently it can only be "Built-In Types" (Variant types) or "Core"
(everything else), which is of limited use.
We might also want to consider dropping it from `ClassDB` altogether
in Godot 4.0.
|
|
WSLPeer now tries to flush packet queue after put_packet call.
WSLServer::listen correctly returns TCP_Server::listen return value.
|
|
- Add some missing descriptions.
- Add links to tutorials for ARVR and AnimationTree.
- Style fixes.
- Engine changes:
* Make `AnimationNodeTransition.input_<number>` properties internal
so that they don't appear in the docs. They still appear in the
inspector based on the actual number of inputs requested.
* Drop unimplemented `CPUParticles.flatness`. It's only used for 3D
particles in `ParticlesMaterial`, and thus only relevant for
`CPUParticles3D`.
|
|
Also fix WebSocketMultiplayer::get_available_packet_count() return value
when peer is not configured to use the multiplayer API.
|
|
Fixes #29777.
Co-authored-by: Cameron Reikes <cameronreikes@gmail.com>
|
|
* Add bind_ip property to WebSocketServer defaulting to "*" (listen to everyone)
* Set default for GDscript Language Server to listen only to localhost
Fixes potential security issue with GDScript language server being exposed to the
broad net by default.
Since it is the server which primary usage is to provide utility to the local
editor there is no need to expose it.
|
|
|
|
Happy new year to the wonderful Godot community!
We're starting a new decade with a well-established, non-profit, free
and open source game engine, and tons of further improvements in the
pipeline from hundreds of contributors.
Godot will keep getting better, and we're looking forward to all the
games that the community will keep developing and releasing with it.
|
|
Used to spit error and report empty packets when connection was still
half-closed (waiting for confirmation from other end).
|
|
|
|
|
|
I messed up a rebase and a commit was partly skipped
|
|
|
|
|
|
This commit also converts all PoolVector<String> parameters to
`const Vector<String>` in both WebSocketServer and WebSocketClient.
|
|
|
|
Via the `trusted_ssl_certificate` property.
|
|
Was lost during library switch
|
|
Follow-up to #31925, `<member />` tags just before `</members>` would cause
a parsing issue, and we'd never notice that we're no longer parsing members.
Also added space before closing `/>`.
|
|
|
|
|
|
More Crypto, SSL server, crt/key as Resource, HashingContext
|
|
Fix WebSocketServer relaying message twice.
|
|
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.
|
|
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.
|
|
Crypto classes will be placed in core/crypto.
|
|
The last remaining ERR_EXPLAIN call is in FreeType code and makes sense as is
(conditionally defines the error message).
There are a few ERR_EXPLAINC calls for C-strings where String is not included
which can stay as is to avoid adding additional _MSGC macros just for that.
Part of #31244.
|
|
|
|
Always call disconnect before emitting signals, to avoid calling it on a
freed object if the user decides to unreference it in a signal.
|