feat: updated engine version to 4.4-rc1
This commit is contained in:
parent
ee00efde1f
commit
21ba8e33af
5459 changed files with 1128836 additions and 198305 deletions
|
|
@ -1,4 +1,5 @@
|
|||
#!/usr/bin/env python
|
||||
from misc.utility.scons_hints import *
|
||||
|
||||
Import("env")
|
||||
Import("env_modules")
|
||||
|
|
|
|||
|
|
@ -30,9 +30,6 @@
|
|||
|
||||
#include "webrtc_multiplayer_peer.h"
|
||||
|
||||
#include "core/io/marshalls.h"
|
||||
#include "core/os/os.h"
|
||||
|
||||
void WebRTCMultiplayerPeer::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("create_server", "channels_config"), &WebRTCMultiplayerPeer::create_server, DEFVAL(Array()));
|
||||
ClassDB::bind_method(D_METHOD("create_client", "peer_id", "channels_config"), &WebRTCMultiplayerPeer::create_client, DEFVAL(Array()));
|
||||
|
|
@ -296,7 +293,7 @@ Error WebRTCMultiplayerPeer::add_peer(Ref<WebRTCPeerConnection> p_peer, int p_pe
|
|||
ERR_FAIL_COND_V(p_unreliable_lifetime < 0, ERR_INVALID_PARAMETER);
|
||||
ERR_FAIL_COND_V(is_refusing_new_connections(), ERR_UNAUTHORIZED);
|
||||
// Peer must be valid, and in new state (to create data channels)
|
||||
ERR_FAIL_COND_V(!p_peer.is_valid(), ERR_INVALID_PARAMETER);
|
||||
ERR_FAIL_COND_V(p_peer.is_null(), ERR_INVALID_PARAMETER);
|
||||
ERR_FAIL_COND_V(p_peer->get_connection_state() != WebRTCPeerConnection::STATE_NEW, ERR_INVALID_PARAMETER);
|
||||
|
||||
Ref<ConnectedPeer> peer = memnew(ConnectedPeer);
|
||||
|
|
|
|||
|
|
@ -43,15 +43,20 @@ void WebRTCPeerConnection::set_default_extension(const StringName &p_extension)
|
|||
default_extension = StringName(p_extension, true);
|
||||
}
|
||||
|
||||
WebRTCPeerConnection *WebRTCPeerConnection::create() {
|
||||
WebRTCPeerConnection *WebRTCPeerConnection::create(bool p_notify_postinitialize) {
|
||||
#ifdef WEB_ENABLED
|
||||
return memnew(WebRTCPeerConnectionJS);
|
||||
return static_cast<WebRTCPeerConnection *>(ClassDB::creator<WebRTCPeerConnectionJS>(p_notify_postinitialize));
|
||||
#else
|
||||
if (default_extension == StringName()) {
|
||||
WARN_PRINT_ONCE("No default WebRTC extension configured.");
|
||||
return memnew(WebRTCPeerConnectionExtension);
|
||||
return static_cast<WebRTCPeerConnection *>(ClassDB::creator<WebRTCPeerConnectionExtension>(p_notify_postinitialize));
|
||||
}
|
||||
Object *obj = nullptr;
|
||||
if (p_notify_postinitialize) {
|
||||
obj = ClassDB::instantiate(default_extension);
|
||||
} else {
|
||||
obj = ClassDB::instantiate_without_postinitialization(default_extension);
|
||||
}
|
||||
Object *obj = ClassDB::instantiate(default_extension);
|
||||
return Object::cast_to<WebRTCPeerConnectionExtension>(obj);
|
||||
#endif
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,8 +33,6 @@
|
|||
|
||||
#include "webrtc_data_channel.h"
|
||||
|
||||
#include "core/io/packet_peer.h"
|
||||
|
||||
class WebRTCPeerConnection : public RefCounted {
|
||||
GDCLASS(WebRTCPeerConnection, RefCounted);
|
||||
|
||||
|
|
@ -85,7 +83,7 @@ public:
|
|||
virtual Error poll() = 0;
|
||||
virtual void close() = 0;
|
||||
|
||||
static WebRTCPeerConnection *create();
|
||||
static WebRTCPeerConnection *create(bool p_notify_postinitialize = true);
|
||||
|
||||
WebRTCPeerConnection();
|
||||
~WebRTCPeerConnection();
|
||||
|
|
|
|||
|
|
@ -35,7 +35,6 @@
|
|||
|
||||
#include "core/extension/ext_wrappers.gen.inc"
|
||||
#include "core/object/gdvirtual.gen.inc"
|
||||
#include "core/variant/native_ptr.h"
|
||||
|
||||
class WebRTCPeerConnectionExtension : public WebRTCPeerConnection {
|
||||
GDCLASS(WebRTCPeerConnectionExtension, WebRTCPeerConnection);
|
||||
|
|
|
|||
|
|
@ -150,5 +150,5 @@ WebRTCPeerConnectionJS::~WebRTCPeerConnectionJS() {
|
|||
godot_js_rtc_pc_destroy(_js_id);
|
||||
_js_id = 0;
|
||||
}
|
||||
};
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue