/* */ package NET.worlds.scape; /* */ /* */ import java.io.IOException; /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ public class TwoWayPortal /* */ extends Portal /* */ { /* */ public TwoWayPortal(String targetRoom, float llx, float lly, float llz, float urx, float ury, float urz) /* */ { /* 29 */ super(llx, lly, llz, urx, ury, urz); /* 30 */ setFarSideInfo(null, targetRoom, null); /* */ } /* */ /* */ /* */ /* */ /* 36 */ private static Object classCookie = new Object(); /* */ /* */ public TwoWayPortal() {} /* */ /* 40 */ public void saveState(Saver s) throws IOException { s.saveVersion(0, classCookie); /* 41 */ super.saveState(s); /* */ } /* */ /* */ public void restoreState(Restorer r) throws IOException, TooNewException /* */ { /* 46 */ int vers = r.restoreVersion(classCookie); /* 47 */ switch (vers) { /* */ case 0: /* 49 */ super.restoreState(r); /* 50 */ break; /* */ default: /* 52 */ throw new TooNewException(); /* */ } /* */ /* */ } /* */ /* */ /* */ public void detach() /* */ throws ClassCastException /* */ { /* 61 */ super.detach(); /* 62 */ Portal p = farSide(); /* 63 */ if (p != null) { /* 64 */ p.detach(); /* */ } /* */ } /* */ /* */ /* */ public void reset(boolean showmessage) /* */ { /* 71 */ super.reset(showmessage); /* */ /* 73 */ if (farSideRoom() != null) /* */ { /* 75 */ Portal p = farSide(); /* 76 */ if (p != null) { /* 77 */ if (p.isActive()) { /* 78 */ return; /* */ } /* */ /* 81 */ p.detach(); /* 82 */ bidisconnect(); /* */ } /* */ /* 85 */ Point3Temp left = getWorldPosition(); /* 86 */ Point3Temp right = getFarCorner(); /* 87 */ p = new Portal(right.x, right.y, left.z, left.x, left.y, right.z); /* 88 */ farSideRoom().add(p); /* */ /* 90 */ biconnect(p); /* */ } /* */ } /* */ } /* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\TwoWayPortal.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */