Commit graph

107 commits

Author SHA1 Message Date
Fabio Alessandrelli
7e592f9641 Add ENet option to disable server relaying.
It's useless when building fully authoritative servers, and prevents
various kinds of abuse.
2019-11-27 11:48:31 +01:00
Fabio Alessandrelli
391f6ff2c6 Fix memory leak in NetworkedMultiplayerENet.
Dynamically allocated ids of peers where not correctly freed when
calling close_connection and disconnect_peer (with now=true).
2019-11-26 16:00:55 +01: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
a7ac8ec876 doc: Fix parsing of self-closing XML tags
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 `/>`.
2019-09-24 13:34:05 +02:00
Bojidar Marinov
b397bcf4a1
Run doctool after overridden properties changes 2019-09-04 15:26:08 +03:00
Robin Hübner
8aeade74db Replace 'ERR_EXPLAIN' with 'ERR_FAIL_*_MSG' in rest of 'modules/' 2019-08-12 10:15:54 +02:00
Rémi Verschelde
b0d41847ed SCons: Use CPPDEFINES instead of CPPFLAGS for pre-processor defines
It's the recommended way to set those, and is more portable
(automatically prepends -D for GCC/Clang and /D for MSVC).

We still use CPPFLAGS for some pre-processor flags which are not
defines.
2019-07-03 09:59:04 +02:00
Rémi Verschelde
b9aa13e591 doc: Remove hardcoded default values from descriptions
They are now generated automatically by doctool.
2019-06-30 13:58:07 +02:00
Rémi Verschelde
c6cea6e9b3 doc: Add default values to all properties
Thanks to @bojidar-bg's impressive work in #29380.
2019-06-30 13:58:07 +02:00
Rémi Verschelde
52355c638b
Merge pull request #29380 from bojidar-bg/16086-docs-default-value
Add default values to the editor help, docs, and generated RST
2019-06-29 12:28:30 +02:00
Hugo Locurcio
f7f6115f76
Proofread and improve the whole class reference
- Document a few more properties and methods
- Add more information to many classes
- Fix lots of typos and gramar mistakes
- Use [code] tags for parameters consistently
- Use [b] and [i] tags consistently
- Put "Warning:" and "Note:" on their own line to be more visible,
  and make them always bold
- Tweak formatting in code examples to be more readable
- Use double quotes consistently
- Add more links to third-party technologies
2019-06-27 22:30:19 +02:00
Bojidar Marinov
0c4c36d823
Add default values to the editor help, docs, and generated RST
Also, make spacing of "=" in the editor help a bit more consistent.
Closes #16086
2019-06-27 18:29:35 +03:00
Rémi Verschelde
bc82781f7d doc: Replace all [code]CONSTANT[/code] by new [constant CONSTANT] hyperlinks 2019-06-27 13:49:36 +02:00
JohnJLight
38d3bfe971 Made use of semicolons more consitent, fixed formatting 2019-06-19 15:24:31 +02:00
Fabio Alessandrelli
abe2c22966 Fix ENet incorrectly binding to wildcard.
Values were not properly initialized, and wildcard would evaluate to
true in most cases.
2019-06-15 05:59:50 +02:00
Rémi Verschelde
6d16f2f053 Fix error macro calls not ending with semicolon
It's not necessary, but the vast majority of calls of error macros
do have an ending semicolon, so it's best to be consistent.
Most WARN_DEPRECATED calls did *not* have a semicolon, but there's
no reason for them to be treated differently.
2019-06-11 14:49:34 +02:00
Rémi Verschelde
e0574e1d98 Fix typos with codespell
Using codespell 1.15.0.

Method:
```
$ cat > ../godot-word-whitelist.txt << EOF
ang
curvelinear
doubleclick
leapyear
lod
merchantibility
nd
numer
ois
ony
que
seeked
synching
te
uint
unselect
webp
EOF

$ codespell -w -q 3 -I ../godot-word-whitelist.txt --skip="./thirdparty,*.po"
$ git diff // undo unwanted changes
```
2019-05-19 13:10:35 +02:00
Rémi Verschelde
d52b70fb5e SCons: Always use env.Prepend for CPPPATH
Include paths are processed from left to right, so we use Prepend to
ensure that paths to bundled thirdparty files will have precedence over
system paths (e.g. `/usr/include` should have lowest priority).
2019-04-30 13:12:06 +02:00
Hein-Pieter van Braam
a033c686f9
Merge pull request #25004 from Faless/enet/proto_optimize
Save 4 bytes in ENet multiplayer protocol.
2019-04-23 06:29:11 +03:00
Rémi Verschelde
ab4705a807
Merge pull request #28125 from KoBeWi/code_true_code
Consistently wrap booleans in [code]
2019-04-22 11:59:16 +02:00
Rémi Verschelde
6af69f851a doc: Drop unused <demos> tag 2019-04-19 11:03:46 +02:00
Tomasz Chabora
b0846f60c9 Consistently wrap booleans in [code] 2019-04-17 17:13:00 +02:00
Rémi Verschelde
c8994b56f9 Style: Apply new changes from clang-format 8.0
It seems to stay compatible with formatting done by clang-format 6.0 and 7.0,
so contributors can keep using those versions for now (they will not undo those
changes).
2019-04-09 17:09:48 +02:00
Rémi Verschelde
39c868171e doc: Bump version to 3.2 2019-04-01 12:33:56 +02:00
marxin
7de7f0ef17 Fix all -Wtype-limits warnings. 2019-02-21 19:34:35 +01:00
Fabio Alessandrelli
dc583a6225 Add check to validate client IDs in ENet.
Server now checks that the ID received from the client is not already
used by someone else and is a valid ID (>=2)
2019-02-20 16:28:53 +01:00
Rémi Verschelde
1ffd1bc8f3 doc: Sync classref with current source 2019-02-18 09:35:29 +01:00
Fabio Alessandrelli
d7cd25ad9c Save 4 bytes in ENet multiplayer protocol.
Avoid sending encoded packet flags (reliable/unreliable/ordered) as
that's already been done by ENet itself and we can read them from the
incoming packet.
2019-01-15 08:38:40 +01:00
Rémi Verschelde
a15620c83e doc: Fix wrong references found by Sphinx and new makerst.py 2019-01-07 12:15:01 +01:00
Rémi Verschelde
b16c309f82 Update copyright statements to 2019
Happy new year to the wonderful Godot community!
2019-01-01 12:58:10 +01:00
Rémi Verschelde
5f8af252e8 doc: Use HTTPS for docs.godotengine.org and point to latest branch
Fixes #23509.
2018-11-05 08:46:27 +01:00
Kelly Thomas
b1ab7b4acf [Docs] Fix some broken links 2018-10-06 04:20:16 +08:00
Rémi Verschelde
3a2ca68af3 SCons: Build thirdparty code in own env, disable warnings
Also remove unnecessary `Export('env')` in other SCsubs,
Export should only be used when exporting *new* objects.
2018-09-28 14:07:39 +02:00
Rémi Verschelde
a2b6be23ad ENet: Remove redundant if condition
Closes #22445.
2018-09-26 10:53:45 +02:00
Fabio Alessandrelli
977c9477c1 Set ENet service time to 0.
Process all packets in queue, but never wait.
2018-09-25 16:26:45 +02:00
Rémi Verschelde
1a16dabfb5
Merge pull request #21982 from luzpaz/misc-typos
Misc. typos
2018-09-13 10:59:00 +02:00
luz.paz
08bde5b2de Misc. typos
Found via `codespell -q 3 -I ../godot-word-whitelist.txt --skip="./thirdparty,*.po"`
2018-09-12 21:39:17 -04:00
Rémi Verschelde
277b24dfb7 Make core/ includes absolute, remove subfolders from include path
This allows more consistency in the manner we include core headers,
where previously there would be a mix of absolute, relative and
include path-dependent includes.
2018-09-12 09:52:22 +02:00
Hein-Pieter van Braam
0e29f7974b Reduce unnecessary COW on Vector by make writing explicit
This commit makes operator[] on Vector const and adds a write proxy to it.  From
now on writes to Vectors need to happen through the .write proxy. So for
instance:

Vector<int> vec;
vec.push_back(10);
std::cout << vec[0] << std::endl;
vec.write[0] = 20;

Failing to use the .write proxy will cause a compilation error.

In addition COWable datatypes can now embed a CowData pointer to their data.
This means that String, CharString, and VMap no longer use or derive from
Vector.

_ALWAYS_INLINE_ and _FORCE_INLINE_ are now equivalent for debug and non-debug
builds. This is a lot faster for Vector in the editor and while running tests.
The reason why this difference used to exist is because force-inlined methods
used to give a bad debugging experience. After extensive testing with modern
compilers this is no longer the case.
2018-07-26 00:54:16 +02:00
robojumper
98b59cf2a3 Add support for tutorial links to makerst.py
Also change the <tutorials> structure to make use of individual <link> tags
2018-06-12 17:40:24 +02:00
Rémi Verschelde
3334209a73 SCons: Pass env to modules can_build method
This allows to disable modules based on the environment,
in particular `env[tools]` which tells us if we are
building the editor or not.
2018-05-30 19:11:36 +02:00
Fabio Alessandrelli
f95e4c72df Expose channels in NetworkedMultiplayerENet 2018-05-12 23:51:58 +02:00
Fabio Alessandrelli
dd546dc5b8 Document websocket module, further document enet 2018-05-08 21:15:50 +02:00
mhilbrunner
ba4600757a Enet: Add wait time param to close_connection()
Enet: Allow to set client interface/address and port

Enet: More error checks

Fix comment
2018-05-07 01:37:15 +02:00
mhilbrunner
b0826dec05 Add DNS resolution in NetworkedMultiplayerEnet::create_client() 2018-04-13 22:31:01 +02:00
Fabio Alessandrelli
6b9ec810c6 Implement get_peer_[address|port] in ENet/WSServer
Also implement get_connected_host and get_connected_port in WebSocketPeer
(not supported in HTML5 due to browser limitation).
Add shorthand disconnect_peer(id) for get_peer(id)->close() like in ENet to
WebSocketServer.
2018-04-12 12:30:51 +02:00
mhilbrunner
c531287328 NetworkedMultiplayerEnet: Add disconnecting/kicking peers 2018-04-10 19:00:05 +02:00
Max Hilbrunner
ec3f5218e8
[DOCS] Net.MultiplayerEnet: List returned errors 2018-03-13 15:55:52 +01:00
Max Hilbrunner
5aae17a6fb [DOCS] NetworkedMultiplayerENet 2018-03-02 05:03:03 +01:00