From 9ffaaac2d072edea8c4b1dfe84ad75d355d11baf Mon Sep 17 00:00:00 2001 From: Steve Date: Sun, 6 Mar 2011 11:53:44 +0000 Subject: Added method to in PObj to swithpositions when tranmitted Added the new method in the world just before all call to transmit --- src/tesseract/objects/PhysicalObject.java | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/tesseract/objects') diff --git a/src/tesseract/objects/PhysicalObject.java b/src/tesseract/objects/PhysicalObject.java index 4c19381..2497153 100644 --- a/src/tesseract/objects/PhysicalObject.java +++ b/src/tesseract/objects/PhysicalObject.java @@ -111,6 +111,17 @@ public class PhysicalObject extends CollidableObject { return position; } + /** + * Switches the position of the object before transmission. + */ + public void switchPosition() { + float x = position.getX(); + float z = position.getZ(); + + position.x = -x; + position.z = -z; + } + /** * @return The orientation of the object. */ -- cgit v1.2.3