/* */ package NET.worlds.scape; /* */ /* */ import NET.worlds.network.URL; /* */ import java.io.IOException; /* */ import java.util.Enumeration; /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ public class RemotePortal /* */ extends WObject /* */ { /* 45 */ private static Object classCookie = new Object(); /* */ /* */ public void saveState(Saver s) throws IOException /* */ { /* 49 */ if (!$assertionsDisabled) { throw new AssertionError(); /* */ } /* */ } /* */ /* */ /* */ public void restoreState(Restorer r) /* */ throws IOException, TooNewException /* */ { /* 57 */ Portal p = new Portal(); /* 58 */ r.replace(this, p); /* */ /* 60 */ int vers = r.restoreVersion(classCookie); /* */ /* 62 */ WObject dlRepresentation = null; /* 63 */ WObject initialRepresentation = null; /* */ /* 65 */ p.superRestoreState(r); /* 66 */ Point3 p1 = (Point3)r.restore(); /* 67 */ Point3 p2 = (Point3)r.restore(); /* 68 */ p.moveTo(p1); /* 69 */ p.setFarCorner(p2); /* */ /* 71 */ Point3 p3 = (Point3)r.restore(); /* 72 */ Point3 p4 = (Point3)r.restore(); /* 73 */ URL wname = URL.restore(r); /* 74 */ String rname = r.restoreString(); /* 75 */ p.connectTo(wname, rname, p3, p4); /* */ /* 77 */ switch (vers) { /* */ case 0: /* 79 */ r.setOldFlag(); /* */ /* */ /* 82 */ r.restoreBoolean(); /* */ /* 84 */ dlRepresentation = (WObject)r.restoreMaybeNull(); /* 85 */ initialRepresentation = (WObject)r.restoreMaybeNull(); /* */ /* */ /* 88 */ r.restoreMaybeNull(); /* 89 */ break; /* */ /* */ case 1: /* 92 */ dlRepresentation = (WObject)r.restoreMaybeNull(); /* 93 */ initialRepresentation = (WObject)r.restoreMaybeNull(); /* 94 */ break; /* */ /* */ default: /* 97 */ throw new TooNewException(); /* */ } /* */ /* 100 */ if ((initialRepresentation instanceof Surface)) { /* 101 */ Surface s = (Surface)initialRepresentation; /* 102 */ Material m = s.getMaterial(); /* 103 */ s.setMaterial(null); /* 104 */ p.setMaterial(m); /* */ } /* 106 */ if ((dlRepresentation instanceof Surface)) { /* 107 */ Surface s = (Surface)dlRepresentation; /* 108 */ Material m = s.getMaterial(); /* 109 */ s.setMaterial(null); /* 110 */ p.setMaterial(m); /* */ } /* */ /* */ /* 114 */ if (initialRepresentation != null) { /* 115 */ Enumeration en = initialRepresentation.getHandlers(); /* 116 */ while (en.hasMoreElements()) { /* 117 */ SuperRoot h = (SuperRoot)en.nextElement(); /* 118 */ initialRepresentation.removeHandler(h); /* 119 */ p.addHandler(h); /* */ /* */ /* 122 */ en = initialRepresentation.getHandlers(); /* */ } /* */ } /* */ } /* */ } /* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\RemotePortal.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */