From 7de193a68e47e7e18afa6417e719c0c810a09be2 Mon Sep 17 00:00:00 2001 From: Fesiug Date: Thu, 7 Mar 2024 22:58:30 -0500 Subject: [PATCH] Weapons not on hands for some reason. Tired --- .../benny/entities/weapons/itemhandler.lua | 2 +- gamemodes/benny/gamemode/inventory.lua | 38 ------------------- 2 files changed, 1 insertion(+), 39 deletions(-) diff --git a/gamemodes/benny/entities/weapons/itemhandler.lua b/gamemodes/benny/entities/weapons/itemhandler.lua index 045f218..7edc470 100644 --- a/gamemodes/benny/entities/weapons/itemhandler.lua +++ b/gamemodes/benny/entities/weapons/itemhandler.lua @@ -138,7 +138,7 @@ function SWEP:EquipItem( ent ) ent:EmitSound( "ae/items/pickup.ogg", 70, 100, 1, CHAN_STATIC ) - self:SetActive( ent ) + --self:SetActive( ent ) local inv = p:GetInventory() inv[ent] = true inv:Sync() diff --git a/gamemodes/benny/gamemode/inventory.lua b/gamemodes/benny/gamemode/inventory.lua index 54e161b..a50c55c 100644 --- a/gamemodes/benny/gamemode/inventory.lua +++ b/gamemodes/benny/gamemode/inventory.lua @@ -155,11 +155,6 @@ local dads = { [KEY_0] = 0, } -local mwheel = { - [MOUSE_WHEEL_DOWN] = 1, - [MOUSE_WHEEL_UP] = -1 -} - local function beatup( ply, num ) local inv = ply:GetInventory():GetWeighted() local wep = ply:BennyCheck() @@ -174,43 +169,10 @@ local function beatup( ply, num ) end end -local function boba( ply, mwheel ) - if mwheel != 0 then - print("Test", math.Round( CurTime()%60, 4 ), mwheel ) - local inv = ply:GetInventory():GetWeighted() - local wep = ply:BennyCheck() - - local inf = table.Flip( inv ) - local currpos = inf[wep:GetActiveR()] - if !currpos then - if mwheel > 0 then - currpos = 0 - else - currpos = #inv+1 - end - end - - local want = currpos+mwheel - - if want > #inv then - want = want - #inv - elseif want <= 0 then - want = want + #inv - end - - local ent = inv[want] - if ent then - wep:SetActive(ent) - end - end -end - hook.Add( "PlayerButtonDown", "Benny_PlayerButtonDown_Inv", function( ply, button ) local wep = ply:HandlerCheck() if dads[button] then beatup( ply, dads[button] ) - elseif mwheel[button] then - boba( ply, mwheel[button] ) end end)