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/DroneLoader.java | |
| download | worlds.jar-main.tar.xz worlds.jar-main.zip | |
Diffstat (limited to 'NET/worlds/scape/DroneLoader.java')
| -rw-r--r-- | NET/worlds/scape/DroneLoader.java | 155 |
1 files changed, 155 insertions, 0 deletions
diff --git a/NET/worlds/scape/DroneLoader.java b/NET/worlds/scape/DroneLoader.java new file mode 100644 index 0000000..53a8b15 --- /dev/null +++ b/NET/worlds/scape/DroneLoader.java @@ -0,0 +1,155 @@ +/* */ package NET.worlds.scape; +/* */ +/* */ import NET.worlds.network.URL; +/* */ import java.util.Enumeration; +/* */ import java.util.Vector; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ class DroneLoader +/* */ { +/* */ static final boolean debug = false; +/* */ +/* */ public synchronized void load(Vector<PendingDrone> droneList) +/* */ { +/* */ try +/* */ { +/* 59 */ if (droneList.size() > 0) +/* */ { +/* */ +/* 62 */ Vector<PendingDrone> listCopy = (Vector)droneList.clone(); +/* 63 */ Enumeration<PendingDrone> enums = listCopy.elements(); +/* */ +/* 65 */ while (enums.hasMoreElements()) +/* */ { +/* 67 */ PendingDrone pd = (PendingDrone)enums.nextElement(); +/* 68 */ if (pd.getDrone().discarded) +/* */ { +/* */ +/* */ +/* 72 */ droneList.removeElement(pd); +/* */ } +/* */ else +/* */ { +/* 76 */ loadDrone(pd); +/* 77 */ droneList.removeElement(pd); +/* */ } +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ +/* 85 */ wait(); +/* */ } +/* */ catch (InterruptedException localInterruptedException) {} +/* */ } +/* */ +/* */ public synchronized void wakeUp() +/* */ { +/* 92 */ notify(); +/* */ } +/* */ +/* */ private static void loadDrone(PendingDrone pd) +/* */ { +/* 97 */ if (!pd.getLoaded()) +/* */ { +/* */ +/* */ +/* 101 */ Enumeration<?> e = PosableShape.getComponentAvatars( +/* 102 */ pd.getUrl()); +/* 103 */ if (e != null) +/* */ { +/* 105 */ while (e.hasMoreElements()) +/* */ { +/* 107 */ String avURL = (String)e.nextElement(); +/* */ +/* 109 */ pd.download(URL.make(avURL)); +/* */ } +/* */ } +/* */ PosableShape ps; +/* */ PosableShape ps; +/* 114 */ if (VehicleShape.isVehicle(pd.getUrl())) { +/* 115 */ ps = new VehicleShape(); +/* */ } else { +/* 117 */ ps = new PosableShape(); +/* */ } +/* 119 */ boolean prog = ProgressiveAdder.get().enabled(); +/* */ +/* 121 */ if (prog) +/* */ { +/* 123 */ ProgressiveAdder.get().scheduleForAdd(pd.getDrone(), +/* 124 */ ps); +/* */ } +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* 132 */ ps.setURL(pd.getUrl()); +/* */ +/* 134 */ ps.setVisible(true); +/* 135 */ ps.setBumpable(false); +/* 136 */ if (!pd.getDrone().isPilotDrone(pd.getUrl())) { +/* 137 */ ps.enableLOD(true); +/* */ } +/* */ +/* 140 */ if (!prog) +/* */ { +/* 142 */ pd.getDrone().SetPendingShape(ps); +/* */ } +/* */ +/* */ +/* 146 */ pd.setLoaded(); +/* */ } +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\scape\DroneLoader.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */
\ No newline at end of file |