Fix incorrect network RPC sending when target client ids list is provided but is empty
#2272
This commit is contained in:
@@ -1503,6 +1503,8 @@ NetworkStream* NetworkReplicator::BeginInvokeRPC()
|
||||
|
||||
bool NetworkReplicator::EndInvokeRPC(ScriptingObject* obj, const ScriptingTypeHandle& type, const StringAnsiView& name, NetworkStream* argsStream, Span<uint32> targetIds)
|
||||
{
|
||||
if (targetIds.IsValid() && targetIds.Length() == 0)
|
||||
return true; // Target list is provided, but it's empty so nobody will get this RPC
|
||||
Scripting::ObjectsLookupIdMapping.Set(nullptr);
|
||||
const NetworkRpcInfo* info = NetworkRpcInfo::RPCsTable.TryGet(NetworkRpcName(type, name));
|
||||
if (!info || !obj || NetworkManager::IsOffline())
|
||||
|
||||
Reference in New Issue
Block a user