Quick Links:
-
+
diff --git a/G-Earth/src/main/resources/gearth/services/unity_tools/js_code/unity_code.js b/G-Earth/src/main/resources/gearth/services/unity_tools/js_code/unity_code.js
index b7a8e6e..2c98fe1 100644
--- a/G-Earth/src/main/resources/gearth/services/unity_tools/js_code/unity_code.js
+++ b/G-Earth/src/main/resources/gearth/services/unity_tools/js_code/unity_code.js
@@ -20,6 +20,7 @@ let _gearth_incoming_copy;
let _malloc;
let _free;
+let _module;
var packetBuff = {"out": [], "in": []};
@@ -97,10 +98,10 @@ function inject_out(packet) {
let inject_amount = Math.min(_g_packet_split, packet.length - i);
let packet_location = _malloc(inject_amount + 16);
- unityInstance.Module.HEAPU8.set(out_packet_objid, packet_location);
- unityInstance.Module.HEAPU8.fill(0, packet_location + 4, packet_location + 12);
- unityInstance.Module.HEAPU8.set(writeLittleEndian(inject_amount), packet_location + 12);
- unityInstance.Module.HEAPU8.set(packet.slice(i, i + inject_amount), packet_location + 16);
+ _module.HEAPU8.set(out_packet_objid, packet_location);
+ _module.HEAPU8.fill(0, packet_location + 4, packet_location + 12);
+ _module.HEAPU8.set(writeLittleEndian(inject_amount), packet_location + 12);
+ _module.HEAPU8.set(packet.slice(i, i + inject_amount), packet_location + 16);
_gearth_outgoing_copy(out_send_param1, packet_location, out_send_param3);
_free(packet_location);
@@ -128,8 +129,8 @@ function inject_in(packet) {
let inject_amount = Math.min(_g_packet_split, packet.length - i);
let packet_location = _malloc(inject_amount + 16);
- unityInstance.Module.HEAPU8.set(in_packet_prefix, packet_location);
- unityInstance.Module.HEAPU8.set(packet.slice(i, i + inject_amount), packet_location + 16);
+ _module.HEAPU8.set(in_packet_prefix, packet_location);
+ _module.HEAPU8.set(packet.slice(i, i + inject_amount), packet_location + 16);
_gearth_incoming_copy(in_recv_param1, packet_location, 0, inject_amount, 0);
_free(packet_location);
diff --git a/G-Earth/src/main/resources/gearth/services/unity_tools/js_code/unity_imports.js b/G-Earth/src/main/resources/gearth/services/unity_tools/js_code/unity_imports.js
index 221d93c..e5da2fb 100644
--- a/G-Earth/src/main/resources/gearth/services/unity_tools/js_code/unity_imports.js
+++ b/G-Earth/src/main/resources/gearth/services/unity_tools/js_code/unity_imports.js
@@ -1,10 +1,10 @@
function g_outgoing_packet(param1, param2, param3) {
out_send_param1 = param1;
out_send_param3 = param3;
- out_packet_objid = unityInstance.Module.HEAPU8.slice(param2, param2 + 4);
+ out_packet_objid = Module.HEAPU8.slice(param2, param2 + 4);
- let length = readLittleEndian(unityInstance.Module.HEAPU8.subarray(param2 + 12, param2 + 12 + 4));
- let array = [].slice.call(unityInstance.Module.HEAPU8.subarray(param2 + 12 + 4, param2 + 12 + 4 + length));
+ let length = readLittleEndian(Module.HEAPU8.subarray(param2 + 12, param2 + 12 + 4));
+ let array = [].slice.call(Module.HEAPU8.subarray(param2 + 12 + 4, param2 + 12 + 4 + length));
packetBuff["out"] = packetBuff["out"].concat(array);
@@ -15,9 +15,9 @@ function g_outgoing_packet(param1, param2, param3) {
function g_incoming_packet(param1, param2, param3, param4, param5) {
in_recv_param1 = param1;
- in_packet_prefix = unityInstance.Module.HEAPU8.slice(param2, param2 + 16);
+ in_packet_prefix = Module.HEAPU8.slice(param2, param2 + 16);
- let buffer = unityInstance.Module.HEAPU8.slice(param2 + 16, param2 + 16 + param4);
+ let buffer = Module.HEAPU8.slice(param2 + 16, param2 + 16 + param4);
packetBuff["in"] = packetBuff["in"].concat([].slice.call(buffer));
let packets = collect_packets("in");
diff --git a/G-Earth/src/main/resources/gearth/ui/info/Info.fxml b/G-Earth/src/main/resources/gearth/ui/info/Info.fxml
index b78aabc..e19c71d 100644
--- a/G-Earth/src/main/resources/gearth/ui/info/Info.fxml
+++ b/G-Earth/src/main/resources/gearth/ui/info/Info.fxml
@@ -25,63 +25,68 @@
-