@nativewrappers/common 0.0.75 → 0.0.76
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +3 -2
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -999,15 +999,16 @@ function NetEvent(eventName, remoteOnly = true) {
|
|
|
999
999
|
throw new Error("NetEvent does not work on private methods, please mark the method as public");
|
|
1000
1000
|
}
|
|
1001
1001
|
context.addInitializer(function() {
|
|
1002
|
+
const t = this;
|
|
1002
1003
|
onNet(eventName, (...args) => {
|
|
1003
1004
|
const src = source;
|
|
1004
1005
|
try {
|
|
1005
1006
|
$CLIENT: {
|
|
1006
|
-
if (remoteOnly && source !== 65535) {
|
|
1007
|
+
if (GlobalData.IS_CLIENT && remoteOnly && source !== 65535) {
|
|
1007
1008
|
return;
|
|
1008
1009
|
}
|
|
1009
1010
|
}
|
|
1010
|
-
return originalMethod.call(
|
|
1011
|
+
return originalMethod.call(t, ...args);
|
|
1011
1012
|
} catch (e) {
|
|
1012
1013
|
REMOVE_NET_EVENT_LOG: {
|
|
1013
1014
|
if (!GlobalData.EnablePrettyPrint) return;
|