mirror of
https://github.com/eaglerforge/EaglerForgeInjector
synced 2025-07-25 07:01:20 -09:00
Add pi optimizations
This commit is contained in:
parent
bf2c2e2800
commit
1dc4669521
15
injector.js
15
injector.js
@ -135,6 +135,19 @@ var main;(function(){`
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
if(globalThis.optimizePi){
|
||||
patchedFile = patchedFile.replaceAll(
|
||||
/3\.1415927410125732 \/ 180/i,
|
||||
"0.01745"
|
||||
);
|
||||
|
||||
patchedFile = patchedFile.replaceAll(
|
||||
/3\.1415927410125732/i,
|
||||
"3.14159"
|
||||
);
|
||||
}
|
||||
|
||||
const extractInstanceMethodRegex =
|
||||
/^[\t ]*function \S+?_\S+?_\S+?\((\$this)?/gm; // /^[\t ]*function \S+?_\S+?_\S+?\(\$this/gm
|
||||
const extractInstanceMethodFullNameRegex = /function (\S*?)\(/gm; // /function (\S*?)\(\$this/gm
|
||||
@ -197,6 +210,8 @@ var main;(function(){`
|
||||
);
|
||||
//Edge cases. sigh
|
||||
//Done: add support for static properties on classes with constructors like this: function nmcg_GuiMainMenu() {
|
||||
|
||||
|
||||
patchedFile = patchedFile.replaceAll(
|
||||
/function [a-z]+?_([a-zA-Z\$]+?)\(\) \{/gm,
|
||||
(match) => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user