diff --git a/gamemodes/benny/gamemode/hud.lua b/gamemodes/benny/gamemode/hud.lua index af30931..8e02bc0 100644 --- a/gamemodes/benny/gamemode/hud.lua +++ b/gamemodes/benny/gamemode/hud.lua @@ -217,7 +217,6 @@ function GM:HUDPaint() local drawer = "" drawer = drawer .. v:GetClip() - drawer = drawer .. "+" .. (v:GetSlideState() == SLIDE_FORWARD and 1 or 0) drawer = drawer .. "/" drawer = drawer .. v.Class.ClipSize draw.SimpleText( drawer, "HUD_16", x + 10, y + 60/2 + (16), COLOR_MAIN, TEXT_ALIGN_LEFT, TEXT_ALIGN_CENTER ) @@ -245,7 +244,7 @@ function GM:HUDPaint() S_Push( Bw - 8 - 8, Bh - 18 - 8 ) for i=0, wep.Class.ClipSize-1 do - if (wep:GetClip() + (wep:GetSlideState() == SLIDE_FORWARD and 1 or 0)) >= (i+1) then + if wep:GetClip() >= (i+1) then hCol( COLOR_MAIN ) hRect( (0 - 8 - 2)*i, 0, 8, 18 ) hCol( COLOR_DARK ) diff --git a/gamemodes/benny/gamemode/items.lua b/gamemodes/benny/gamemode/items.lua index 9871a77..976b0a6 100644 --- a/gamemodes/benny/gamemode/items.lua +++ b/gamemodes/benny/gamemode/items.lua @@ -101,10 +101,6 @@ local AnimationLookup = { }, } -SLIDE_FORWARD = 0 -- loaded -SLIDE_EMPTY = 1 -- empty -SLIDE_BACK = 2 -- back - AddItem( "base_firearm", { PrintName = "Base Firearm", Description = "Item base for firearms.", @@ -121,7 +117,6 @@ AddItem( "base_firearm", { "Clip", "BurstCount", "Firemode", - "SlideState", -- 0 = forward and loaded, 1 = forward and empty, 2 = back and empty }, ["Float"] = { "Delay", @@ -185,11 +180,10 @@ AddItem( "base_firearm", { end, ["Attack"] = function( class, ent, handler ) - --if ent:GetClip() <= 0 then return end + if ent:GetClip() <= 0 then return end if ent:GetDelay() > CurTime() then return end if ent:GetDelayBurst() > CurTime() then return end if ent:GetBurstCount() >= class.BurstCount then return end - if ent:GetSlideState() != SLIDE_FORWARD then handler:EmitSound( "benny/weapons/noammo.ogg", 70, 150, 0.4, CHAN_STATIC ) ent:SetDelay( CurTime() + 0.25 ) ent:SetBurstCount( 0 ) return end local Runaway = class.BurstRunaway local BAuto = class.BurstAuto @@ -201,16 +195,9 @@ AddItem( "base_firearm", { end end - ent:SetSlideState( SLIDE_BACK ) - --if ent:GetClip() == 0 then - if ent:GetClip() > 0 then - ent:SetClip( ent:GetClip() - 1 ) - ent:SetSlideState( SLIDE_FORWARD ) - else + ent:SetClip( ent:GetClip() - 1 ) + if ent:GetClip() == 0 then handler:EmitSound( "benny/weapons/1911/slidedrop.ogg", 70, 100, 0.4, CHAN_STATIC ) - if !ent:GetLoaded() then - ent:SetSlideState( SLIDE_EMPTY ) - end end ent:SetDelay( CurTime() + class.Delay ) @@ -239,26 +226,12 @@ AddItem( "base_firearm", { --handler:EmitSound( "weapons/m4a1/m4a1_boltpull.wav", 70, 125, 0.4, CHAN_STATIC ) --ent:SetRefillTime( CurTime() + 0.1 ) --handler:EmitSound( "benny/weapons/basic.ogg", 70, 100, 0.4, CHAN_STATIC ) - - if ent:GetDelay() > CurTime() then return end local ply = handler:GetOwner() local time = 0.6 - if (ent:GetClip() > 0) and ent:GetSlideState() == SLIDE_BACK then - handler:EmitSound( class.BoltDropSound, 70, 100, 0.4, CHAN_STATIC ) - ent:SetSlideState( SLIDE_FORWARD ) - ent:SetClip( ent:GetClip() - 1 ) - ply:AddVCDSequenceToGestureSlot( GESTURE_SLOT_ATTACK_AND_RELOAD, ply:LookupSequence( AnimationLookup["reload_rack"][class.HoldType] ), 0, true ) - time = 0.4 - elseif (ent:GetClip() > 0) and ent:GetSlideState() == SLIDE_EMPTY then - handler:EmitSound( class.BoltPullSound, 70, 100, 0.4, CHAN_STATIC ) - ent:SetSlideState( SLIDE_FORWARD ) - ent:SetClip( ent:GetClip() - 1 ) - ply:AddVCDSequenceToGestureSlot( GESTURE_SLOT_ATTACK_AND_RELOAD, ply:LookupSequence( AnimationLookup["reload_rack"][class.HoldType] ), 0, true ) - time = 0.4 - elseif ent:GetLoaded() then + if ent:GetLoaded() then handler:EmitSound( class.MagOutSound, 70, 100, 0.4, CHAN_STATIC ) ent:SetLoaded( false ) ent:SetClip( 0 ) @@ -269,7 +242,7 @@ AddItem( "base_firearm", { ent:SetLoaded( true ) ent:SetRefillTime( CurTime() + 0.5 ) ply:AddVCDSequenceToGestureSlot( GESTURE_SLOT_ATTACK_AND_RELOAD, ply:LookupSequence( AnimationLookup["reload_insert"][class.HoldType] ), 0, true ) - time = 0.6 + time = 0.8 end ent:SetDelay( CurTime() + time ) end, @@ -288,8 +261,6 @@ AddItem( "base_firearm", { handler:EmitSound( "weapons/m4a1/m4a1_deploy.wav", 70, 125, 0.4, CHAN_STATIC ) ent:SetDelay( CurTime() + 0.25 ) - if ent:GetSlideState() == SLIDE_BACK then ent:SetSlideState( SLIDE_EMPTY ) end - local ply = handler:GetOwner() ply:AddVCDSequenceToGestureSlot( GESTURE_SLOT_ATTACK_AND_RELOAD, ply:LookupSequence( AnimationLookup["holster"][class.HoldType] ), 0, true ) end,