File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed
Player/Character/MovementSystem/ClientPrediction Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -26,18 +26,17 @@ private void Awake() {
2626 if ( ! rigid ) {
2727 rigid = gameObject . GetComponent < Rigidbody > ( ) ;
2828 }
29- if ( ! graphicsHolder ) {
30- Debug . LogWarning ( "Rigidbody is missing graphics holder and won't be smoothed or handled by client side prediction. GameObject: " + gameObject . name ) ;
31- }
3229 }
3330
3431 private void OnEnable ( ) {
35- if ( rigid && graphicsHolder ) {
36- //Register for rigidbody smoothing
37- AirshipPredictionManager . instance . RegisterRigidbody ( rigid , graphicsHolder ) ;
38-
32+ if ( rigid ) {
3933 //Listen to replays
4034 AirshipPredictionManager . instance . RegisterPredictedObject ( this ) ;
35+
36+ if ( graphicsHolder ) {
37+ //Register for rigidbody smoothing
38+ AirshipPredictionManager . instance . RegisterRigidbody ( rigid , graphicsHolder ) ;
39+ }
4140 }
4241 }
4342
Original file line number Diff line number Diff line change @@ -245,6 +245,7 @@ private static void GenerateTypes() {
245245 typeof ( AccessoryComponent ) ,
246246 typeof ( ActiveAccessory ) ,
247247 typeof ( CharacterMovementState ) ,
248+ typeof ( AirshipPredictionManager ) ,
248249
249250 // Steam
250251 typeof ( AirshipSteamFriendInfo ) ,
You can’t perform that action at this time.
0 commit comments