From 4e3801be669862e7dbb2ceccc6a34c1652dda1f0 Mon Sep 17 00:00:00 2001 From: Pierce Lally Date: Mon, 1 Dec 2025 12:08:42 -0500 Subject: [PATCH] Revert "port ++ and -- pac proxy operators (#7)" This reverts commit 72f7fe324ca4f86585e204e1f0371a834258e891. --- lua/pac3/core/server/event.lua | 52 +++------------------------------- 1 file changed, 4 insertions(+), 48 deletions(-) diff --git a/lua/pac3/core/server/event.lua b/lua/pac3/core/server/event.lua index 66188b8bf..84cc0db15 100644 --- a/lua/pac3/core/server/event.lua +++ b/lua/pac3/core/server/event.lua @@ -66,56 +66,12 @@ end) -- proxy concommand.Add("pac_proxy", function(ply, _, args) - str = args[1] - if args[1] == nil then - ply:PrintMessage(HUD_PRINTCONSOLE, "\npac_proxy needs at least two arguments.\nname\nnumber, or a series of numbers for a vector. increment notation is available, such as ++1 or --1.\ne.g. pac_proxy myvector 1 2 3\ne.g. pac_proxy value ++5") - return - end - - if ply:IsValid() then - ply.pac_proxy_events = ply.pac_proxy_events or {} - end - local x - local y - local z - if ply.pac_proxy_events[str] ~= nil then - if args[2] then - if string.sub(args[2],1,2) == "++" or string.sub(args[2],1,2) == "--" then - x = ply.pac_proxy_events[str].x + tonumber(string.sub(args[2],2,#args[2])) - else x = tonumber(args[2]) or ply.pac_proxy_events[str].x or 0 end - end - - if args[3] then - if string.sub(args[3],1,2) == "++" or string.sub(args[3],1,2) == "--" then - y = ply.pac_proxy_events[str].y + tonumber(string.sub(args[3],2,#args[3])) - else y = tonumber(args[3]) or ply.pac_proxy_events[str].y or 0 end - end - if not args[3] then y = 0 end - - if args[4] then - if string.sub(args[4],1,2) == "++" or string.sub(args[4],1,2) == "--" then - z = ply.pac_proxy_events[str].z + tonumber(string.sub(args[4],2,#args[4])) - else z = tonumber(args[4]) or ply.pac_proxy_events[str].z or 0 end - end - if not args[4] then z = 0 end - else - x = tonumber(args[2]) or 0 - y = tonumber(args[3]) or 0 - z = tonumber(args[4]) or 0 - end - ply.pac_proxy_events[str] = {name = str, x = x, y = y, z = z} - net.Start("pac_proxy", true) net.WriteEntity(ply) net.WriteString(args[1]) - net.WriteFloat(x or 0) - net.WriteFloat(y or 0) - net.WriteFloat(z or 0) + net.WriteFloat(tonumber(args[2]) or 0) + net.WriteFloat(tonumber(args[3]) or 0) + net.WriteFloat(tonumber(args[4]) or 0) net.Broadcast() -end, nil, -[[pac_proxy sets the number of a command function in a proxy. it is typically accessed as command(\"value\") needs at least two arguments. -name: any name, preferably without spaces -numbers: a number, or a series of numbers for a vector. increment notation is available, such as ++1 and --1. -e.g. pac_proxy myvector 1 2 3 -e.g. pac_proxy value ++5]]) \ No newline at end of file +end)