diff options
| author | Fuwn <[email protected]> | 2021-05-03 16:38:41 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2021-05-03 16:38:41 -0700 |
| commit | e1e781bb2135ef78592226f1a3eaba4925702f1f (patch) | |
| tree | 8a5b590463ed413e1c6eabb719130e701b95ca63 /NET/worlds/scape/TwoWayPortal.java | |
| download | worlds.jar-main.tar.xz worlds.jar-main.zip | |
Diffstat (limited to 'NET/worlds/scape/TwoWayPortal.java')
| -rw-r--r-- | NET/worlds/scape/TwoWayPortal.java | 99 |
1 files changed, 99 insertions, 0 deletions
diff --git a/NET/worlds/scape/TwoWayPortal.java b/NET/worlds/scape/TwoWayPortal.java new file mode 100644 index 0000000..ac07aac --- /dev/null +++ b/NET/worlds/scape/TwoWayPortal.java @@ -0,0 +1,99 @@ +/* */ 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 + */
\ No newline at end of file |