79 Commits

Author SHA1 Message Date
mattias hornlund
fb01be95a4 Iris
- Fixed issue with tearoff of actor with subobject triggering ensure
- Added test recreating the bug
- Added Description string parameter to FReplicationSystemTestNode packet sending methods to facilitate logging of more context when writing tests

#rb LouisPhilippe.Sequin

[CL 26484421 by mattias hornlund in 5.3 branch]
2023-07-20 09:29:47 -04:00
mattias hornlund
2b6e6bd62f Fixed issue where FNetBitArray::FindLastZero would return index out of bounds for array sizes not aligned with the size of the storage.
#rb LouisPhilippe.Seguin

[CL 26462333 by mattias hornlund in 5.3 branch]
2023-07-19 11:38:34 -04:00
louisphilippe seguin
a45acac5be Iris
* Poll configs are now set using Frequency (updates per second) instead of frames between polls.
* This allows the poll configs to work with any type of server tick rate
* Added ability to recover a given object's poll frequency via GetPollFrequencyOfRootObject
* ActorReplicationBridge will now listen to changes in server tick rates and reinitalize the poll frame updates of all objects via ReinitPollFrequency()

#jira UE-185786
#rb Peter.Engstorm
#rnx

[CL 25894242 by louisphilippe seguin in ue5-main branch]
2023-06-09 11:12:03 -04:00
louisphilippe seguin
8b3d0a80e5 Iris
* Formalize the concept of ForceNetUpdate by splitting MarkDirty and ForceNetUpdate into seperate lists.
* Now dirty objects will not be forced to be polled immediately anymore. It's only if you call ForceNetUpdate that you can skip your polling frequency.
* Another exeception is when a subobject gets added to a root object. There we are forcing a call to ForceNetUpdate.
* Added code to ensure that only the currently updated object can be marked dirty during the poll phase.

#jira UE-181952
#rb Peter.Engstorm, Mattias.Hornlund
#rnx

[CL 25814811 by louisphilippe seguin in ue5-main branch]
2023-06-06 09:49:57 -04:00
peter engstrom
86abf30e18 Iris - Store FName strings, when required, as they were. To prevent default state checksum mismatch the serialization is a no-op when serializing default state. Equality check will ignore casing.
#preflight 647752964b0d5a1eb13e073f
#rb louisphilippe.seguin

[CL 25702752 by peter engstrom in ue5-main branch]
2023-05-31 11:09:10 -04:00
steve robb
ba1fe48aca Preparation for deprecating the hashing arrays and strings by pointer - now you have to be explicit and call the right function for hashing a pointer, hashing an array contents or hashing a TCHAR* pointer as a null-terminated string.
Added GetArrayHash() for hashing arrays by their contents.
Added a new pair of keyfuncs for TSets and TMaps which allow TCHAR* keys (or TCHAR* values passed to *ByHash functions) to be hashed by FCrc::Strihash_DEPRECATED().

#rb devin.doucette
#preflight 64708e7c296b2b37c6fd894a

[CL 25647216 by steve robb in ue5-main branch]
2023-05-26 12:51:39 -04:00
mattias hornlund
43bb68281b Iris
- Implemented support for capturing object references when using the LastResortNetSerializer

#rb Peter.Engstsrom
#preflight 646decce1417daba1ed2851f

[CL 25635250 by mattias hornlund in ue5-main branch]
2023-05-25 19:33:33 -04:00
louisphilippe seguin
034b274fb1 Added unit test for CombineMultiple and FNetBitArray
#rnx
#rb trivial

[CL 25495772 by louisphilippe seguin in ue5-main branch]
2023-05-16 15:55:20 -04:00
louisphilippe seguin
cfcec3c94d Allow replication of UObjects with UFunctions but no UProperties
#jira UE-185169, UE-43332
#rb Ryan.Gerleve
#rnx

[CL 25495746 by louisphilippe seguin in ue5-main branch]
2023-05-16 15:54:10 -04:00
peter engstrom
bc95260e7b Iris - Use both all ones and all zeros optimization in WriteSparseBitArray.
#rnx
#preflight 6463318a007ade636a8c70e4
#rb mattias.hornlund

[CL 25494919 by peter engstrom in ue5-main branch]
2023-05-16 15:28:07 -04:00
louisphilippe seguin
09f8425107 ReplicationSystemTest
* Added unit test for delaying dirty objects when culled.

#jira UE-184028
#rb Peter.Engstorm
#rnx

[CL 25447831 by louisphilippe seguin in ue5-main branch]
2023-05-12 09:49:39 -04:00
louisphilippe seguin
ef3ab645be Iris
* Enable culling of non-relevant objects from the poll+copy phases.  Controlled via Net.Iris.CullNonRelevant
* Now accumulating dirty flags for dirty objects not cleaned after getting culled.
* DirtyObjectTracker now tracking objects set dirty in the current tick and objects not cleaned in previous frames.
* Now tracking list of CleanedObjects during the frame and only resetting dirty status of the cleaned objects.

#jira UE-184028, UE-181941
#rb Peter.Engstorm, Mattias.Hornlund
#rnx

[CL 25413294 by louisphilippe seguin in ue5-main branch]
2023-05-10 15:07:54 -04:00
peter engstrom
e8183a5f94 Iris - Fixed issue with subobjects fitered out and then allowed to be replicated again. Before they wouldn't replicate unless it or another subobject had dirty state.
#jira UE-184341
#rb mattias.hornlund
#preflight 6459ead6013f37515830271e

[CL 25384191 by peter engstrom in ue5-main branch]
2023-05-09 04:07:28 -04:00
louisphilippe seguin
652bd080ac NetBitArray
* Added InitAndCopy functions on FNetBitArray. Used to quickly construct a bit array from an existing source (either bitarray or bitarrayview)
* Added Set functions.  Used to overwrite the bitarray with the word operations of two other arrays.

#rb Peter.Engstorm

[CL 25380553 by louisphilippe seguin in ue5-main branch]
2023-05-08 19:08:58 -04:00
louisphilippe seguin
9bcd7d97a7 Iris
* Added unit tests for RPC sending

#rb Mattias.Hornlund
#rnx

[CL 25355234 by louisphilippe seguin in ue5-main branch]
2023-05-05 11:23:31 -04:00
mattias hornlund
bca8fd0aac Iris
- Fixed bug where we did not immediately resend lost state for properties utilizing multiple changemask bits (arrays) until next time root property bit was modfied.
- Added testcase to catch this.

#rb Peter.Engstrom
#preflight 64512e821c2846595cb25a60

[CL 25314687 by mattias hornlund in ue5-main branch]
2023-05-03 02:46:34 -04:00
ryan gerleve
d62f1e3ccc Validate that assertion macros in ReplicationSystemTest will be compatible with ReplicationSystemLowLevelTests.
Fix one in TestGroups.cpp that was incompatible.

#rb LouisPhilippe.Seguin, Peter.Engstrom

[CL 25219790 by ryan gerleve in ue5-main branch]
2023-04-27 14:04:51 -04:00
louisphilippe seguin
1d3c76e632 Iris
* Added GridFilter unit tests
* Encapsulated RepTag creation hack for unit tests
* Fix FragmentGridFilter reading world location fragment using wrong FVector unit type

#rb Peter.Engstorm
#rnx

[CL 25214436 by louisphilippe seguin in ue5-main branch]
2023-04-27 10:37:07 -04:00
louisphilippe seguin
a41e92c0d2 Iris
* Add Filter Trait to NetObjectGroups
* NetObjectGroup global filtered list is now correct when a group acquires or loses it's filter trait

#jira UE-184027
#rb Peter.Engstorm, Mattias.Hornlund
#rnx

[CL 25199569 by louisphilippe seguin in ue5-main branch]
2023-04-26 11:43:37 -04:00
louisphilippe seguin
e2e8e1f275 Iris
* Added thread-safe checks to FDirtyNetObjectTracker

#jira UE-184037
#rb Peter.Engstorm, Mattias.Hornlund
#rnx
#jira UE-184037

[CL 25199520 by louisphilippe seguin in ue5-main branch]
2023-04-26 11:41:45 -04:00
louisphilippe seguin
732be4e0aa ReplicationSystemTest
* Break on failed line instead of inside the FMessageLog

#rb Ryan.Gerleve
#rnx

[CL 25191980 by louisphilippe seguin in ue5-main branch]
2023-04-25 19:19:03 -04:00
louisphilippe seguin
0a0f5cb4f6 Iris
* Added unit test for filtering that runs both pre and post filter types

#rb trivial
#rnx

[CL 25183867 by louisphilippe seguin in ue5-main branch]
2023-04-25 13:26:45 -04:00
louisphilippe seguin
394d9dd910 Iris
* Filter are now done in two passes
* The first pass executes regular engine filter options then any dynamic filters not using fragment data.
* Then any filtered object not relevant to atleast one connection will get culled out.
* Culled out objects will not get polled or copy their dirty data into the fragments.
* After the poll and copy is done, we now filter again only for filters that work with fragment data.
* This final filter list gets passed to be prioritized and given to the ReplicationWriter.

#jira UE-181941
#rb Peter.Engstorm, Mattias.Hornlund
#rnx

[CL 25175076 by louisphilippe seguin in ue5-main branch]
2023-04-24 23:02:37 -04:00
louisphilippe seguin
d8d138bcbc Iris
* Add cull distance to world locations storage
* Now only UNetObjectGridFragmentLocFilter reads the cull distance from the fragment data.
* UNetObjectGridWorldLocFilter wil instead read it from FWorldLocations

#rb Peter.Engstorm
#rnx

[CL 25096579 by louisphilippe seguin in ue5-main branch]
2023-04-18 18:07:31 -04:00
peter engstrom
aafb58227d Iris - Changemask for TArray. Allows TArrays to only replicate a subset of the entire array when few elements have changed. Feature can be disabled with cvar net.Iris.UseChangeMaskForTArray 0
#jira UE-181100
#preflight 643e87ee211b661dc4428fa7
#rb louisphilippe.seguin, mattias.hornlund

[CL 25089292 by peter engstrom in ue5-main branch]
2023-04-18 12:49:50 -04:00