Skip to content

Commit

Permalink
4.0.10 (typo fix/repush)
Browse files Browse the repository at this point in the history
Fixed a typo in ReplicateState.
Fixed not all changes making it in Pro > Free export.
Fixed package.json version.
  • Loading branch information
FirstGearGames committed Jan 29, 2024
1 parent 0510b2b commit f6947e8
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 18 deletions.
1 change: 1 addition & 0 deletions Assets/FishNet/Demos/SpringBoard.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ MonoBehaviour:
_componentIndexCache: 0
_addedNetworkObject: {fileID: 0}
_networkObjectCache: {fileID: 0}
Force: 20
--- !u!65 &4811354048062409396
BoxCollider:
m_ObjectHideFlags: 0
Expand Down
11 changes: 1 addition & 10 deletions Assets/FishNet/Runtime/Managing/Prediction/PredictionManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -506,16 +506,7 @@ internal void ReconcileToStates()
return;

uint estimatedLastRemoteTick = _networkManager.TimeManager.LastPacketTick.Value();
//NOTESSTART
/* Don't run a reconcile unless it's possible for ticks queued
* that tick to be run already. Otherwise you are not replaying inputs
* at all, just snapping to corrections. This means states which arrive late or out of order
* will be ignored since they're before the reconcile, which means important actions
* could have gone missed.
*
* A system which synchronized all current states rather than what's only needed to correct
* the inputs would likely solve this. */
//NOTESEND

if (_reconcileStates.Peek().ClientTick >= (_networkManager.TimeManager.LocalTick - QueuedInputs - 2))
return;

Expand Down
6 changes: 3 additions & 3 deletions Assets/FishNet/Runtime/Object/NetworkBehaviour.Prediction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -765,7 +765,7 @@ protected internal void Replicate_Replay_Authoritative<T>(uint replayTick, Repli
if (findResult == ReplicateTickFinder.DataPlacementResult.Exact)
{
data = replicatesHistory[replicateIndex];
state = ReplicateState.Replayed;
state = ReplicateState.ReplayedCreated;

del.Invoke(data, state, channel);
_networkObjectCache.LastUnorderedReplicateTick = data.GetTick();
Expand All @@ -785,7 +785,7 @@ protected internal void Replicate_Replay_NonAuthoritative<T>(uint replayTick, Re
if (findResult == ReplicateTickFinder.DataPlacementResult.Exact)
{
data = replicatesHistory[replicateIndex];
state = ReplicateState.Replayed;
state = ReplicateState.ReplayedCreated;
}
//If not not found then it's being run as predicted.
else
Expand All @@ -795,7 +795,7 @@ protected internal void Replicate_Replay_NonAuthoritative<T>(uint replayTick, Re
if (replicatesHistory.Count == 0 || replicatesHistory[replicatesHistory.Count - 1].GetTick() < replayTick)
state = ReplicateState.Future;
else
state = ReplicateState.Replayed;
state = ReplicateState.ReplayedCreated;
}

del.Invoke(data, state, channel);
Expand Down
6 changes: 3 additions & 3 deletions Assets/FishNet/Runtime/Object/ReplicateState.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public enum ReplicateState : byte
/// Data was received for the replayed tick.
/// This occurs when a replicate would be replaying past datas, triggered by a reconcile, and there is user created data for the tick.
/// </summary>
ReplayeCreated = 4,
ReplayedCreated = 4,
/// <summary>
/// Client has not run the tick locally yet. This can be used to exit replicate early to not process actions, or create actions based on previous datas.
/// </summary>
Expand All @@ -47,11 +47,11 @@ public static class ReplicateStateExtensions
/// <summary>
/// Returns if value is replayed.
/// </summary>
public static bool IsReplayed(this ReplicateState value) => (value == ReplicateState.ReplayedPredicted || value == ReplicateState.ReplayeCreated || value == ReplicateState.Future);
public static bool IsReplayed(this ReplicateState value) => (value == ReplicateState.ReplayedPredicted || value == ReplicateState.ReplayedCreated || value == ReplicateState.Future);
/// <summary>
/// Returns if value is user created.
/// </summary>
public static bool IsCreated(this ReplicateState value) => (value == ReplicateState.CurrentCreated || value == ReplicateState.ReplayeCreated);
public static bool IsCreated(this ReplicateState value) => (value == ReplicateState.CurrentCreated || value == ReplicateState.ReplayedCreated);
/// <summary>
/// Returns if value is predicted.
/// </summary>
Expand Down
2 changes: 1 addition & 1 deletion Assets/FishNet/VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.0.10
4.0.10
2 changes: 1 addition & 1 deletion Assets/FishNet/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "com.firstgeargames.fishnet",
"version": "4.0.6",
"version": "4.0.10",
"displayName": "FishNet: Networking Evolved",
"description": "A feature-rich Unity networking solution aimed towards reliability, ease of use, efficiency, and flexibility.",
"unity": "2021.3",
Expand Down

0 comments on commit f6947e8

Please sign in to comment.