HackedNPC code section offset same as Cubot

This commit is contained in:
simon
2018-12-23 12:47:32 -05:00
parent 0973548b71
commit 0dbec1d258
2 changed files with 5 additions and 1 deletions

View File

@@ -41,7 +41,7 @@ public class HackedNPC extends NonPlayerCharacter implements ControllableUnit {
cpu.setMemory(new Memory(MEM_SIZE));
cpu.setHardwareHost(this);
cpu.getMemory().write(0, program, 0, program.length);
cpu.getMemory().write(cpu.getCodeSectionOffset(), program, 0, program.length);
for (Object serialisedHw : (List) NpcPlugin.DEFAULT_HACKED_NPC.get("hardware")) {
HardwareModule hardware = GameServer.INSTANCE.getRegistry().deserializeHardware((Document) serialisedHw, this);