Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BandwidthDisplay mixing up ingress and egress #843

Closed
maxkratt opened this issue Feb 4, 2025 · 1 comment
Closed

BandwidthDisplay mixing up ingress and egress #843

maxkratt opened this issue Feb 4, 2025 · 1 comment

Comments

@maxkratt
Copy link
Contributor

maxkratt commented Feb 4, 2025

General
Fish-Networking version: 4.5.8
Discord link: https://discord.com/channels/424284635074134018/1034477094731784302/1336347150610857996

Description
By DjiFrima

I was confused about the BandwidthDisplay manager. When my client is not moving and not sending anything, my "Client out" stat was showing a few KB/s while my "Client in" stat was 10 B/s. It seemed odd because i was clearly receiving data for my few patrolling bots. After digging it bit, i'm pretty sure that there is a bug in BandwidthDisplay.cs line 183-184. The server in/out stats are fine btw.

_clientAverages.AddIn(obj.ToServerBytes);
_clientAverages.AddOut(obj.FromServerBytes);

I think both method params should be swapped in order to add IN data with data coming FROM the server. Same for Add OUT data with data going TO the server, like this:

_clientAverages.AddIn(obj.FromServerBytes);
_clientAverages.AddOut(obj.ToServerBytes);

@FirstGearGames
Copy link
Owner

Thanks! Fixed in 4.5.9

FirstGearGames pushed a commit that referenced this issue Feb 25, 2025
- Added preciseTick.AsDouble extension.
- Added double.AsPreciseTick extension.
- Added NetworkObject.IsDestroying to know when a NetworkObject is being destroyed or pooled during OnStop callbacks.
- Added TimeManager.TimeToTicks(long).
- Added NetworkObject.IsInitializedNested.
- Added ServerSpawner component which automatically spawns NetworkObjects when the server starts.
- Added OfflineTickSmoother.
- Added NetworkTickSmoother.
- Fixed Network/OfflineTickSmoother detach/reattach settings not working (Introduced in 4.6.0).
- Improved ReplicateState terminology: Future is now only ever true when reconciling, and when data tick has not been run as Current.
- Changed ReplicateState is now a flag.
- Changed ReplicateState previous values now use flag checks internally.
- Added replicateState.FastContains for flag checking.
- Added ReplicateState.IsCurrent, which is the opposite of IsFuture.
- Obsoleted several ReplicateState values in favor of new terminology.
- Improved CharacterControllerPrediction demo notes.
- Improved CharacterControllerPrediction now uses NetworkTrigger to attach and detach from platforms.
- Improved Stable and Beta mode are now available per feature.
- Improved several API and ToString methods to be more verbose.
- Improved PlayerSpawner to find NetworkManager within hierarchy, using InstanceFinder only as a fallback.
- Changed PredictionManager.StateInterpolation is now public.
- Changed Reader.Initialize methods are now public.
- Fixed set RollbackPhysicsType enum as flag.
- Fixed OnStop callbacks not firing on Instantiated objects nested to scene objects when server suddenly disconnects.
Removed debug.
- Fixed DefaultScene incorrectly loading Offline scene when a server stops, even if another server is running such as through Multipass.
- Fixed TimeManager.Tick drifting with latency.
- Fixed UseGlobalCustomSerializer attribute not working on types within read-only assemblies.
- Fixed Object Initialized Twice Error when stopping and starting all sockets without stopping the editor or application.
- Fixed conditional Writer corruption when manually calling RebuildObservers.
- Fixed NetworkObject.SetInitializedValues not running on prefab scene objects with properties that differed from the prefabs.
- Fixed nested NetworkObjects being destroyed on socket stop when using object pooling (#842).
- Fixed collection modified error when using extension transform.DestroyChildren with destroyImmediate as true.
- Fixed BandwidthDisplay showing flipped in/out values for client usage (#843).
- Fixed NetworkCollider/Trigger sometimes incorrectly firing OnEnter/Exit events during reconcilations.
- Obsoleted NetworkBehaviour/Object.HasAuthority; replaced with IsController.
- Obsoleted DetachableNetworkTickSmoother; replaced with NetworkTickSmoother.
- Obsoleted MonoTickSmoother; replaced with OfflineTickSmoother.
- Obsoleted NetworkObject smoother settings in favor of using NetworkTickSmoother.
- Removed HistoryDuration on NetworkCollider/Trigger as it is no longer needed.
- Removed unused ReplicateState values.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants