Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,6 @@ public class ClientCharacter : NetworkBehaviour

Quaternion m_LerpedRotation;

bool m_IsHost;

float m_CurrentSpeed;

/// <summary>
Expand Down Expand Up @@ -120,8 +118,6 @@ public override void OnNetworkSpawn()

enabled = true;

m_IsHost = IsHost;

m_ClientActionViz = new ClientActionPlayer(this);

m_ServerCharacter = GetComponentInParent<ServerCharacter>();
Expand Down Expand Up @@ -268,7 +264,7 @@ void Update()
// the game camera tracks a GameObject moving in the Update loop and therefore eliminate any camera jitter,
// this graphics GameObject's position is smoothed over time on the host. Clients do not need to perform any
// positional smoothing since NetworkTransform will interpolate position updates on the root GameObject.
if (m_IsHost)
if (IsHost)
{
// Note: a cached position (m_LerpedPosition) and rotation (m_LerpedRotation) are created and used as
// the starting point for each interpolation since the root's position and rotation are modified in
Expand Down
6 changes: 1 addition & 5 deletions Assets/Scripts/Utils/NetworkOverlay/NetworkStats.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,10 @@ public ExponentialMovingAverageCalculator(float average)

ClientRpcParams m_PongClientParams;

bool m_IsServer;

string m_TextToDisplay;

public override void OnNetworkSpawn()
{
m_IsServer = IsServer;

bool isClientOnly = IsClient && !IsServer;
if (!IsOwner && isClientOnly) // we don't want to track player ghost stats, only our own
{
Expand Down Expand Up @@ -98,7 +94,7 @@ void CreateNetworkStatsText()

void FixedUpdate()
{
if (!m_IsServer)
if (!IsServer)
{
if (Time.realtimeSinceStartup - m_LastPingTime > k_PingIntervalSeconds)
{
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Additional documentation and release notes are available at [Multiplayer Documen
## [unreleased] - yyyy-mm-dd
### Cleanup
* Clarified a TODO comment inside ClientCharacter, detailing how anticipation should only be executed on owning client players (#786)
* Removed now unnecessary cached NetworkBehaviour status on some components, since they now do not allocate memory (#799)

### Fixed
* EnemyPortals' VFX get disabled and re-enabled once the breakable crystals are broken (#784)
Expand Down