Revert "Revert "change scriptvm to be more reliable""
This reverts commit dbaa4d993c.
This commit is contained in:
@@ -15,10 +15,10 @@ plugins {
|
|||||||
id("se.patrikerdes.use-latest-versions") version "0.2.14"
|
id("se.patrikerdes.use-latest-versions") version "0.2.14"
|
||||||
}
|
}
|
||||||
|
|
||||||
val oprsver = "3.3.1"
|
val oprsver = "3.3.8"
|
||||||
|
|
||||||
group = "com.openosrs"
|
group = "com.openosrs"
|
||||||
version = "1.1.3"
|
version = "1.1.4"
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
@@ -26,6 +26,7 @@ repositories {
|
|||||||
maven {
|
maven {
|
||||||
url = uri("https://repo.runelite.net")
|
url = uri("https://repo.runelite.net")
|
||||||
url = uri("https://raw.githubusercontent.com/open-osrs/hosting/master")
|
url = uri("https://raw.githubusercontent.com/open-osrs/hosting/master")
|
||||||
|
url = uri("https://repo.openosrs.com/repository/maven")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -109,12 +109,12 @@ public class ScriptVM extends AbstractInjector
|
|||||||
final Field scriptInstructions = InjectUtil.findField(inject, "opcodes", "Script");
|
final Field scriptInstructions = InjectUtil.findField(inject, "opcodes", "Script");
|
||||||
final Field scriptStatePC = InjectUtil.findField(inject, "pc", "ScriptFrame");
|
final Field scriptStatePC = InjectUtil.findField(inject, "pc", "ScriptFrame");
|
||||||
|
|
||||||
// Next 4 should be injected by mixins, so don't need fail fast
|
|
||||||
final ClassFile vanillaClient = vanilla.findClass("client");
|
final ClassFile vanillaClient = vanilla.findClass("client");
|
||||||
|
|
||||||
|
// Next 4 should be injected by mixins, so don't need fail fast
|
||||||
final Method runScript = vanillaClient.findStaticMethod("copy$runScript");
|
final Method runScript = vanillaClient.findStaticMethod("copy$runScript");
|
||||||
final Method vmExecuteOpcode = vanillaClient.findStaticMethod("vmExecuteOpcode");
|
final Method vmExecuteOpcode = vanillaClient.findStaticMethod("vmExecuteOpcode");
|
||||||
final Field currentScriptField = vanillaClient.findField("currentScript");
|
final Method setCurrentScript = vanillaClient.findStaticMethod("setCurrentScript");
|
||||||
final Field currentScriptPCField = vanillaClient.findField("currentScriptPC");
|
final Field currentScriptPCField = vanillaClient.findField("currentScriptPC");
|
||||||
|
|
||||||
Execution e = new Execution(inject.getVanilla());
|
Execution e = new Execution(inject.getVanilla());
|
||||||
@@ -242,7 +242,7 @@ public class ScriptVM extends AbstractInjector
|
|||||||
{
|
{
|
||||||
instrIter.previous();
|
instrIter.previous();
|
||||||
instrIter.add(new Dup(instrs));
|
instrIter.add(new Dup(instrs));
|
||||||
instrIter.add(new PutStatic(instrs, currentScriptField));
|
instrIter.add(new InvokeStatic(instrs, setCurrentScript.getPoolMethod()));
|
||||||
instrIter.next();
|
instrIter.next();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user