@@ -75,50 +75,55 @@ public override void Process()
7575
7676 if ( IsLocalPlayer && ( GameManager . NetworkManager . IsClient && ! GameManager . NetworkManager . IsServer ) && Health > 0 )
7777 {
78- bool dot = false ;
78+ bool poschg = false ;
79+ bool rotchg = false ;
7980
8081 if ( Raylib . IsKeyDown ( KeyboardKey . Space ) )
8182 {
8283 Position = Position + new Vector3 ( 0 , 0.1f * WalkSpeed / 6 , 0 ) ;
83- dot = true ;
84+ poschg = true ;
8485 }
8586 if ( Raylib . IsKeyDown ( KeyboardKey . LeftShift ) )
8687 {
8788 Position = Position + new Vector3 ( 0 , 0.1f * - WalkSpeed / 6 , 0 ) ;
88- dot = true ;
89+ poschg = true ;
8990 }
9091 if ( Raylib . IsKeyDown ( KeyboardKey . Q ) )
9192 {
9293 Rotation += new Vector3 ( 0 , - 0.1f * - WalkSpeed , 0 ) ;
93- dot = true ;
94+ rotchg = true ;
9495 }
9596 if ( Raylib . IsKeyDown ( KeyboardKey . E ) )
9697 {
9798 Rotation += new Vector3 ( 0 , 0.1f * - WalkSpeed , 0 ) ;
98- dot = true ;
99+ rotchg = true ;
99100 }
100101 if ( Raylib . IsKeyDown ( KeyboardKey . W ) )
101102 {
102103 Position = Position + new Vector3 ( 0.1f * WalkSpeed / 6 * MathF . Cos ( angle ) , 0 , 0.1f * WalkSpeed / 6 * MathF . Sin ( angle ) ) ;
103- dot = true ;
104+ poschg = true ;
104105 }
105106 if ( Raylib . IsKeyDown ( KeyboardKey . A ) )
106107 {
107108 Position = Position + new Vector3 ( 0.1f * WalkSpeed / 6 * MathF . Cos ( angle - 1.5708f ) , 0 , 0.1f * WalkSpeed / 6 * MathF . Sin ( angle - 1.5708f ) ) ;
108- dot = true ;
109+ poschg = true ;
109110 }
110111 if ( Raylib . IsKeyDown ( KeyboardKey . S ) )
111112 {
112113 Position = Position + new Vector3 ( - 0.1f * WalkSpeed / 6 * MathF . Cos ( angle ) , 0 , - 0.1f * WalkSpeed / 6 * MathF . Sin ( angle ) ) ;
113- dot = true ;
114+ poschg = true ;
114115 }
115116 if ( Raylib . IsKeyDown ( KeyboardKey . D ) )
116117 {
117118 Position = Position + new Vector3 ( - 0.1f * WalkSpeed / 6 * MathF . Cos ( angle - 1.5708f ) , 0 , - 0.1f * WalkSpeed / 6 * MathF . Sin ( angle - 1.5708f ) ) ;
118- dot = true ;
119+ poschg = true ;
119120 }
120121
121- if ( dot )
122+ if ( poschg && ! rotchg )
123+ ReplicateProperties ( [ "Position" ] , false ) ;
124+ if ( ! poschg && rotchg )
125+ ReplicateProperties ( [ "Rotation" ] , false ) ;
126+ if ( poschg && rotchg )
122127 ReplicateProperties ( [ "Position" , "Rotation" ] , false ) ;
123128 }
124129
0 commit comments