diff options
| author | Bojidar Marinov <bojidar.marinov.bg@gmail.com> | 2018-01-12 00:35:12 +0200 |
|---|---|---|
| committer | Bojidar Marinov <bojidar.marinov.bg@gmail.com> | 2018-01-12 00:58:14 +0200 |
| commit | 9b8e8b2220b4e2bac3310262d3d1cd7a8eb3b0a5 (patch) | |
| tree | 805b828de2c1b899392245dbf77d45c4450664c8 /modules/enet/networked_multiplayer_enet.cpp | |
| parent | c1c17b04bd5090503416cef24b4da9209d5cf563 (diff) | |
| download | redot-engine-9b8e8b2220b4e2bac3310262d3d1cd7a8eb3b0a5.tar.gz | |
Bind many more properties to scripts
Notable potentially breaking changes:
- PROPERTY_USAGE_NOEDITOR is now PROPERTY_USAGE_STORAGE | PROPERTY_USAGE_NETWORK, without PROPERTY_USAGE_INTERNAL
- Some properties were renamed, and sometimes even shadowed by new ones
- New getter methods (some virtual) were added
Diffstat (limited to 'modules/enet/networked_multiplayer_enet.cpp')
| -rw-r--r-- | modules/enet/networked_multiplayer_enet.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/modules/enet/networked_multiplayer_enet.cpp b/modules/enet/networked_multiplayer_enet.cpp index 3ad80d3978..f3f4acd768 100644 --- a/modules/enet/networked_multiplayer_enet.cpp +++ b/modules/enet/networked_multiplayer_enet.cpp @@ -36,6 +36,10 @@ void NetworkedMultiplayerENet::set_transfer_mode(TransferMode p_mode) { transfer_mode = p_mode; } +NetworkedMultiplayerPeer::TransferMode NetworkedMultiplayerENet::get_transfer_mode() const { + + return transfer_mode; +} void NetworkedMultiplayerENet::set_target_peer(int p_peer) { @@ -659,6 +663,8 @@ void NetworkedMultiplayerENet::_bind_methods() { ClassDB::bind_method(D_METHOD("get_compression_mode"), &NetworkedMultiplayerENet::get_compression_mode); ClassDB::bind_method(D_METHOD("set_bind_ip", "ip"), &NetworkedMultiplayerENet::set_bind_ip); + ADD_PROPERTY(PropertyInfo(Variant::INT, "compression_mode", PROPERTY_HINT_ENUM, "None,Range Coder,FastLZ,ZLib,ZStd"), "set_compression_mode", "get_compression_mode"); + BIND_ENUM_CONSTANT(COMPRESS_NONE); BIND_ENUM_CONSTANT(COMPRESS_RANGE_CODER); BIND_ENUM_CONSTANT(COMPRESS_FASTLZ); |
