Remove client ignoring server movement by accident
This commit is contained in:
		
							parent
							
								
									10dfed94c9
								
							
						
					
					
						commit
						4d15ff3ed5
					
				| @ -229,11 +229,11 @@ public class GroundMovementTree implements BehaviorTree { | |||||||
|     //                    System.out.println(EntityUtils.getEntityPosition(parent)); |     //                    System.out.println(EntityUtils.getEntityPosition(parent)); | ||||||
|                     //    System.out.println(message.getpositionX() + " " + message.getpositionY() + " " + message.getpositionZ()); |                     //    System.out.println(message.getpositionX() + " " + message.getpositionY() + " " + message.getpositionZ()); | ||||||
|                         //this should only fire on the client, we don't want the server snap updating due to client position reporting |                         //this should only fire on the client, we don't want the server snap updating due to client position reporting | ||||||
|                         // if(position.distance(message.getpositionX(),message.getpositionY(),message.getpositionZ()) > STATE_DIFFERENCE_HARD_UPDATE_THRESHOLD){ |                         if(position.distance(message.getpositionX(),message.getpositionY(),message.getpositionZ()) > STATE_DIFFERENCE_HARD_UPDATE_THRESHOLD){ | ||||||
|                         //     EntityUtils.getPosition(parent).set(message.getpositionX(),message.getpositionY(),message.getpositionZ()); |                             EntityUtils.getPosition(parent).set(message.getpositionX(),message.getpositionY(),message.getpositionZ()); | ||||||
|                         // } else if(position.distance(message.getpositionX(),message.getpositionY(),message.getpositionZ()) > STATE_DIFFERENCE_SOFT_UPDATE_THRESHOLD){ |                         } else if(position.distance(message.getpositionX(),message.getpositionY(),message.getpositionZ()) > STATE_DIFFERENCE_SOFT_UPDATE_THRESHOLD){ | ||||||
|                         //     EntityUtils.getPosition(parent).add(new Vector3d(message.getpositionX(),message.getpositionY(),message.getpositionZ()).mul(SOFT_UPDATE_MULTIPLIER)); |                             EntityUtils.getPosition(parent).add(new Vector3d(message.getpositionX(),message.getpositionY(),message.getpositionZ()).mul(SOFT_UPDATE_MULTIPLIER)); | ||||||
|                         // } |                         } | ||||||
|                         //we want to always update the server facing vector with where the client says they're facing |                         //we want to always update the server facing vector with where the client says they're facing | ||||||
|                         EntityUtils.getRotation(parent).set(message.getrotationX(),message.getrotationY(),message.getrotationZ(),message.getrotationW()); |                         EntityUtils.getRotation(parent).set(message.getrotationX(),message.getrotationY(),message.getrotationZ(),message.getrotationW()); | ||||||
|                         // CreatureUtils.setFacingVector(parent, new Vector3d(message.getrotationX(),message.getrotationY(),message.getrotationZ())); |                         // CreatureUtils.setFacingVector(parent, new Vector3d(message.getrotationX(),message.getrotationY(),message.getrotationZ())); | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user