@@ -97,27 +97,21 @@ private void TestRigidBody2D()
97
97
Assert . True ( serverClientPlayerNetworkRigidbody2d . WasKinematicBeforeSpawn ) ;
98
98
Assert . True ( clientServerPlayerNetworkRigidbody2d . WasKinematicBeforeSpawn ) ;
99
99
100
- // Validate kinematic settings after spawn
101
- var serverLocalPlayerRigidbody2d = m_ServerNetworkManager . LocalClient . PlayerObject . GetComponent < Rigidbody2D > ( ) ;
102
- var clientLocalPlayerRigidbody2d = m_ClientNetworkManagers [ 0 ] . LocalClient . PlayerObject . GetComponent < Rigidbody2D > ( ) ;
103
- var serverClientPlayerRigidbody2d = m_PlayerNetworkObjects [ m_ServerNetworkManager . LocalClientId ] [ m_ClientNetworkManagers [ 0 ] . LocalClientId ] . GetComponent < Rigidbody2D > ( ) ;
104
- var clientServerPlayerRigidbody2d = m_PlayerNetworkObjects [ m_ClientNetworkManagers [ 0 ] . LocalClientId ] [ m_ServerNetworkManager . LocalClientId ] . GetComponent < Rigidbody2D > ( ) ;
105
-
106
100
var isOwnerAuthority = m_AuthorityMode == NetworkTransformRigidBodyTestComponent . AuthorityModes . Owner ;
107
101
if ( isOwnerAuthority )
108
102
{
109
103
// can commit player has authority and should have a kinematic mode of false (or true in case body was already kinematic).
110
- Assert . True ( ! serverLocalPlayerRigidbody2d . isKinematic ) ;
111
- Assert . True ( ! clientLocalPlayerRigidbody2d . isKinematic ) ;
112
- Assert . True ( serverClientPlayerRigidbody2d . isKinematic ) ;
113
- Assert . True ( clientServerPlayerRigidbody2d . isKinematic ) ;
104
+ Assert . True ( ! serverLocalPlayerNetworkRigidbody2d . IsKinematic ( ) ) ;
105
+ Assert . True ( ! clientLocalPlayerNetworkRigidbody2d . IsKinematic ( ) ) ;
106
+ Assert . True ( serverClientPlayerNetworkRigidbody2d . IsKinematic ( ) ) ;
107
+ Assert . True ( clientServerPlayerNetworkRigidbody2d . IsKinematic ( ) ) ;
114
108
}
115
109
else
116
110
{
117
- Assert . True ( ! serverLocalPlayerRigidbody2d . isKinematic ) ;
118
- Assert . True ( clientLocalPlayerRigidbody2d . isKinematic ) ;
119
- Assert . True ( ! serverClientPlayerRigidbody2d . isKinematic ) ;
120
- Assert . True ( clientServerPlayerRigidbody2d . isKinematic ) ;
111
+ Assert . True ( ! serverLocalPlayerNetworkRigidbody2d . IsKinematic ( ) ) ;
112
+ Assert . True ( clientLocalPlayerNetworkRigidbody2d . IsKinematic ( ) ) ;
113
+ Assert . True ( ! serverClientPlayerNetworkRigidbody2d . IsKinematic ( ) ) ;
114
+ Assert . True ( clientServerPlayerNetworkRigidbody2d . IsKinematic ( ) ) ;
121
115
}
122
116
}
123
117
#endif
0 commit comments