Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 5f02a8c

Browse files
author
Timothy Edrick Burhan
committed
mirror fix: do not move object if client
1 parent b77d0ef commit 5f02a8c

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

‎mirror/Assets/_Benchmark/Scripts/SineMoveRandomBehaviour.cs‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,16 @@ public class SineMoveRandomBehaviour : NetworkBehaviour
1111

1212
public override void OnStartServer()
1313
{
14+
if (isClient) return;
15+
1416
_config.ApplyConfig(ref _wrapper);
1517
_wrapper.NetworkStart(transform);
1618
}
1719

1820
private void FixedUpdate()
1921
{
22+
if (isClient) return;
23+
2024
_wrapper.NetworkUpdate(transform);
2125
}
2226
}

‎mirror/Assets/_Benchmark/Scripts/SineMoveYBehaviour.cs‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,16 @@ public class SineMoveYBehaviour : NetworkBehaviour
1111

1212
public override void OnStartServer()
1313
{
14+
if (isClient) return;
15+
1416
_config.ApplyConfig(ref _wrapper);
1517
_wrapper.NetworkStart(transform);
1618
}
1719

1820
private void FixedUpdate()
1921
{
22+
if (isClient) return;
23+
2024
_wrapper.NetworkUpdate(transform);
2125
}
2226
}

‎mirror/Assets/_Benchmark/Scripts/WanderMoveBehaviour.cs‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,16 @@ public class WanderMoveBehaviour : NetworkBehaviour
1111

1212
public override void OnStartServer()
1313
{
14+
if (isClient) return;
15+
1416
_config.ApplyConfig(ref _wrapper);
1517
_wrapper.NetworkStart(transform);
1618
}
1719

1820
private void FixedUpdate()
1921
{
22+
if (isClient) return;
23+
2024
_wrapper.NetworkUpdate(transform);
2125
}
2226
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /