mirror of
https://github.com/MirrorNetworking/Mirror.git
synced 2024-11-18 02:50:32 +00:00
fix host mode debug colors
This commit is contained in:
parent
3f0dbadf34
commit
aad1456afd
@ -177,8 +177,10 @@ protected void BeginPredicting()
|
|||||||
predictedRigidbody.detectCollisions = true;
|
predictedRigidbody.detectCollisions = true;
|
||||||
|
|
||||||
state = ForecastState.PREDICTING;
|
state = ForecastState.PREDICTING;
|
||||||
|
|
||||||
#if UNITY_EDITOR // PERF: only access .material in Editor, as it may instantiate!
|
#if UNITY_EDITOR // PERF: only access .material in Editor, as it may instantiate!
|
||||||
if (debugColors) rend.material.color = predictingColor;
|
// only show debug colors in client-only mode when predicting
|
||||||
|
if (debugColors && isClientOnly) rend.material.color = predictingColor;
|
||||||
#endif
|
#endif
|
||||||
// we want to predict until the first server state for our [Command] AddForce came in.
|
// we want to predict until the first server state for our [Command] AddForce came in.
|
||||||
// we know the time when our [Command] arrives on server: NetworkTime.predictedTime.
|
// we know the time when our [Command] arrives on server: NetworkTime.predictedTime.
|
||||||
@ -205,8 +207,10 @@ protected void BeginFollowing()
|
|||||||
{
|
{
|
||||||
predictedRigidbody.isKinematic = true; // full transform sync
|
predictedRigidbody.isKinematic = true; // full transform sync
|
||||||
state = ForecastState.FOLLOWING;
|
state = ForecastState.FOLLOWING;
|
||||||
|
|
||||||
#if UNITY_EDITOR // PERF: only access .material in Editor, as it may instantiate!
|
#if UNITY_EDITOR // PERF: only access .material in Editor, as it may instantiate!
|
||||||
if (debugColors) rend.material.color = originalColor;
|
// only show debug colors in client-only mode when predicting
|
||||||
|
if (debugColors && isClientOnly) rend.material.color = originalColor;
|
||||||
#endif
|
#endif
|
||||||
// reset the collision chain depth so it starts at 0 again next time
|
// reset the collision chain depth so it starts at 0 again next time
|
||||||
remainingCollisionChainDepth = 0;
|
remainingCollisionChainDepth = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user