From 4e47f66575cbd1abe2db2f48e058a1ea46f3fdcb Mon Sep 17 00:00:00 2001 From: DerelictDrone <57756830+DerelictDrone@users.noreply.github.com> Date: Fri, 17 May 2024 16:33:57 -0500 Subject: [PATCH] ZCPU VM now self-aware like GPU and SPU VMs are (#53) --- lua/entities/gmod_wire_cpu.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/entities/gmod_wire_cpu.lua b/lua/entities/gmod_wire_cpu.lua index 5d190a9..853d1fa 100644 --- a/lua/entities/gmod_wire_cpu.lua +++ b/lua/entities/gmod_wire_cpu.lua @@ -28,6 +28,7 @@ function ENT:Initialize() -- Create virtual machine self.VM = CPULib.VirtualMachine() self.VM.SerialNo = CPULib.GenerateSN("CPU") + self.VM.Entity = self -- Since the device supports (quota)interruptible instructions -- Memory access can be a lot cheaper. self.VM.MemoryReadCycles = 2