summaryrefslogtreecommitdiffstats
path: root/core/io/multiplayer_api.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Don't reset MultiplayerAPI when setting same peer.Fabio Alessandrelli2019-01-151-0/+2
| | | | | | | | | | | | | | A GDScript call to: `multiplayer.network_peer.some_prop = true` seems to transalte to: ``` var temp = multiplayer.network_peer temp.some_prop = true multiplayer.network_peer = temp ``` Which caused the MultiplayerAPI to be resetted. The call to set_network_peer is now ignored if the peer that's beeing set is the same as the currently set one.
* Fix MultiplayerAPI initialization, clear.Fabio Alessandrelli2019-01-151-0/+3
| | | | | | | | | rpc_sender_id is now correctly initialized to 0 so get_rpc_sender_id() work reliably even if called before receiving any RPC. root_node is initialized to NULL (fix crashes when incorrectly using the MultiplayerAPI). clear function now resets the packet cache size to free more memory when not running.
* Update copyright statements to 2019Rémi Verschelde2019-01-011-2/+2
| | | | Happy new year to the wonderful Godot community!
* Remove redundant "== false" codeAaron Franke2018-10-061-1/+1
| | | | | | Some of this code has been re-organized. f
* Remove redundant "== true" codeAaron Franke2018-10-061-1/+1
| | | If it can be compared to a boolean, it can be evaluated as one in-place.
* Better MultiplayerAPI error logs.Fabio Alessandrelli2018-09-251-54/+98
|
* Skip RPC/RSET when MASTERSYNC and we are master.Fabio Alessandrelli2018-09-251-5/+8
|
* doc: Sync classref with current sourceRémi Verschelde2018-09-151-2/+2
|
* Clearly deprecate sync too in favor of remotesync.Fabio Alessandrelli2018-09-151-7/+3
| | | | | NOTE: This changes the RPC_MODE_* enum values. Games should be re-exported. GDNative rebuilt.
* Rename slave keyword to puppetFabio Alessandrelli2018-09-151-5/+6
| | | | | The slave keyword will still be available as deprecated in 3.1 but will be dropped from future releases.
* Make core/ includes absolute, remove subfolders from include pathRémi Verschelde2018-09-121-1/+2
| | | | | | 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.
* doc: Sync classref with current sourceRémi Verschelde2018-07-261-1/+1
| | | | Fix various missing arguments in bindings.
* Reduce unnecessary COW on Vector by make writing explicitHein-Pieter van Braam2018-07-261-18/+18
| | | | | | | | | | | | | | | | | | | | | | | 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.
* MultiplayerAPI::send_bytes transfer mode support.Fabio Alessandrelli2018-07-081-2/+5
| | | | | Added as extra parameter, allow you to specify which transfer mode to use for those specific bytes
* New sync RPC modes to match all combinationsFabio Alessandrelli2018-05-291-0/+9
|
* Refactor RPCMode enum and checksFabio Alessandrelli2018-05-291-64/+83
|
* Revert "RPCMode refactor, more sync modes"Max Hilbrunner2018-05-291-92/+64
|
* New sync RPC modes to match all combinationsFabio Alessandrelli2018-05-261-0/+9
|
* Refactor RPCMode enum and checksFabio Alessandrelli2018-05-261-64/+83
|
* Add missing copyright headersGuilherme Felipe2018-05-161-0/+30
|
* Allow sending raw bytes through MultiplayerAPIFabio Alessandrelli2018-05-121-1/+38
|
* Internal methods in MultiplayerAPI start with _Fabio Alessandrelli2018-05-081-20/+20
|
* Add new MultiplayerAPI classFabio Alessandrelli2018-03-031-0/+722
Handles all the high level networking stuff