fix(PredictedRigidbody): reduce-send-rate considers angular velocity now too!

This commit is contained in:
mischa 2024-02-14 19:45:28 +01:00 committed by MrGadget
parent 449c33a694
commit fb13fa37e2

View File

@ -309,8 +309,7 @@ void UpdateServer()
// next round of optimizations: if client received nothing for 1s,
// force correct to last received state. then server doesn't need
// to send once per second anymore.
bool moving = predictedRigidbody.velocity != Vector3.zero;
syncInterval = moving ? 0 : 1;
syncInterval = IsMoving() ? 0 : 1;
}
// always set dirty to always serialize in next sync interval.