diff --git a/lua/arccw/shared/attachments/default.lua b/lua/arccw/shared/attachments/default.lua index 521267fe..68d9c07e 100644 --- a/lua/arccw/shared/attachments/default.lua +++ b/lua/arccw/shared/attachments/default.lua @@ -195,7 +195,7 @@ att.Override_Firemodes = {} -- all hooks, mults, and adds will work on fire modes -- Use SWEP:GetBurstCount() instead of SWEP.BurstCount --- Use SWEP:Get/SetNextArcCWPrimaryFire() +-- Use SWEP:Get/SetNextPrimaryFire() -- Allows you to change the weapon's name -- string name diff --git a/lua/arccw/shared/sh_physbullet2.lua b/lua/arccw/shared/sh_physbullet2.lua index d81dd135..4b734d45 100644 --- a/lua/arccw/shared/sh_physbullet2.lua +++ b/lua/arccw/shared/sh_physbullet2.lua @@ -338,7 +338,7 @@ function ArcCW:DrawPhysBullets() local delta = (EyePos():DistToSqr(i.Pos) / math.pow(10000, 2)) - size = math.pow(size, Lerp(delta, 1, 2)) + size = math.pow(size, Lerp(delta, 1, 2.6)) local pro = i.Profile or 0 diff --git a/lua/weapons/arccw_base/cl_scope.lua b/lua/weapons/arccw_base/cl_scope.lua index fd1df50f..2dbc381c 100644 --- a/lua/weapons/arccw_base/cl_scope.lua +++ b/lua/weapons/arccw_base/cl_scope.lua @@ -150,7 +150,7 @@ function SWEP:CoolView(ply, pos, ang, fov) oldpostmp = pos * 1 oldangtmp = ang * 1 - targbool = self:GetNextArcCWPrimaryFire() - .1 > CurTime() + targbool = self:GetNextPrimaryFire() - .1 > CurTime() targint = targbool and 1 or 0 targint = math.min(targint, 1-math.pow( vm:GetCycle(), 2 ) ) progress = Lerp(ftv * 15, progress, targint) diff --git a/lua/weapons/arccw_base/sh_anim.lua b/lua/weapons/arccw_base/sh_anim.lua index f696176e..0ca1e752 100644 --- a/lua/weapons/arccw_base/sh_anim.lua +++ b/lua/weapons/arccw_base/sh_anim.lua @@ -105,7 +105,7 @@ function SWEP:PlayAnimation(key, mult, pred, startfrom, tt, skipholster, ignorer if startfrom > (time * mult) then return end if tt then - self:SetNextArcCWPrimaryFire(CurTime() + ((anim.MinProgress or time) * mult) - startfrom) + self:SetNextPrimaryFire(CurTime() + ((anim.MinProgress or time) * mult) - startfrom) end if anim.LHIK then diff --git a/lua/weapons/arccw_base/sh_bash.lua b/lua/weapons/arccw_base/sh_bash.lua index 973e8ad5..3df8c1e1 100644 --- a/lua/weapons/arccw_base/sh_bash.lua +++ b/lua/weapons/arccw_base/sh_bash.lua @@ -1,7 +1,7 @@ function SWEP:Bash(melee2) melee2 = melee2 or false if self:GetState() == ArcCW.STATE_SIGHTS then return end - if self:GetNextArcCWPrimaryFire() > CurTime() then return end + if self:GetNextPrimaryFire() > CurTime() then return end if !self.CanBash and !self:GetBuff_Override("Override_CanBash") then return end @@ -37,7 +37,7 @@ function SWEP:Bash(melee2) if CLIENT then self:OurViewPunch(-self.BashPrepareAng * 0.05) end - self:SetNextArcCWPrimaryFire(CurTime() + mt) + self:SetNextPrimaryFire(CurTime() + mt) if melee2 then if self.HoldtypeActive == "pistol" or self.HoldtypeActive == "revolver" then diff --git a/lua/weapons/arccw_base/sh_customize.lua b/lua/weapons/arccw_base/sh_customize.lua index ba4945f6..08d39afa 100644 --- a/lua/weapons/arccw_base/sh_customize.lua +++ b/lua/weapons/arccw_base/sh_customize.lua @@ -4,7 +4,7 @@ function SWEP:ToggleCustomizeHUD(ic) if ic and self:GetState() == ArcCW.STATE_SPRINT then return end if ic then - if (self:GetNextArcCWPrimaryFire() + 0.1) >= CurTime() then return end + if (self:GetNextPrimaryFire() + 0.1) >= CurTime() then return end self:SetState(ArcCW.STATE_CUSTOMIZE) self:ExitSights() diff --git a/lua/weapons/arccw_base/sh_firemodes.lua b/lua/weapons/arccw_base/sh_firemodes.lua index fd1ede01..072e0df7 100644 --- a/lua/weapons/arccw_base/sh_firemodes.lua +++ b/lua/weapons/arccw_base/sh_firemodes.lua @@ -41,6 +41,8 @@ function SWEP:ChangeFiremode(pred) self:SetNWInt("firemode", fmi) + self:RecalcAllBuffs() + if SERVER then if pred then SuppressHostEvents(self:GetOwner()) diff --git a/lua/weapons/arccw_base/sh_firing.lua b/lua/weapons/arccw_base/sh_firing.lua index cb94aef2..09717f42 100644 --- a/lua/weapons/arccw_base/sh_firing.lua +++ b/lua/weapons/arccw_base/sh_firing.lua @@ -15,7 +15,7 @@ function SWEP:PrimaryAttack() if self:GetNWBool("ubgl") then self:ShootUBGL() return end - if self:GetNextArcCWPrimaryFire() >= CurTime() then return end + if self:GetNextPrimaryFire() >= CurTime() then return end if self:GetState() == ArcCW.STATE_CUSTOMIZE then return end @@ -110,7 +110,7 @@ function SWEP:PrimaryAttack() delay = self:GetBuff_Hook("Hook_ModifyRPM", delay) or delay - self:SetNextArcCWPrimaryFire(CurTime() + delay) + self:SetNextPrimaryFire(CurTime() + delay) local num = self:GetBuff_Override("Override_Num") @@ -312,7 +312,7 @@ function SWEP:PrimaryAttack() if self:GetCurrentFiremode().Mode < 0 and self:GetBurstCount() == -self:GetCurrentFiremode().Mode then local postburst = self:GetCurrentFiremode().PostBurstDelay or 0 - self:SetNextArcCWPrimaryFire(CurTime() + postburst) + self:SetNextPrimaryFire(CurTime() + postburst) end self:ApplyAttachmentShootDamage() @@ -563,7 +563,7 @@ function SWEP:DryFire() return self:PlayAnimation("fire_dry", 1, true, 0, true) end self:MyEmitSound(self.ShootDrySound or "weapons/arccw/dryfire.wav", 75, 100, 1, CHAN_ITEM) - self:SetNextArcCWPrimaryFire(CurTime() + 0.25) + self:SetNextPrimaryFire(CurTime() + 0.25) end function SWEP:DoRecoil() diff --git a/lua/weapons/arccw_base/sh_grenade.lua b/lua/weapons/arccw_base/sh_grenade.lua index af4e67c0..74b599dc 100644 --- a/lua/weapons/arccw_base/sh_grenade.lua +++ b/lua/weapons/arccw_base/sh_grenade.lua @@ -17,7 +17,7 @@ function SWEP:PreThrow() self:PlayAnimation("pre_throw", 1, false, 0, true) - self:SetNextArcCWPrimaryFire(CurTime() + self.PullPinTime) + self:SetNextPrimaryFire(CurTime() + self.PullPinTime) self:SetNWBool("grenadeprimed", true) @@ -25,7 +25,7 @@ function SWEP:PreThrow() end function SWEP:Throw() - if self:GetNextArcCWPrimaryFire() > CurTime() then return end + if self:GetNextPrimaryFire() > CurTime() then return end self:SetNWBool("grenadeprimed", false) @@ -72,5 +72,5 @@ function SWEP:Throw() self:PlayAnimation("draw") end) - self:SetNextArcCWPrimaryFire(CurTime() + 1) + self:SetNextPrimaryFire(CurTime() + 1) end \ No newline at end of file diff --git a/lua/weapons/arccw_base/sh_reload.lua b/lua/weapons/arccw_base/sh_reload.lua index 70390d55..d1ce8496 100644 --- a/lua/weapons/arccw_base/sh_reload.lua +++ b/lua/weapons/arccw_base/sh_reload.lua @@ -9,7 +9,7 @@ function SWEP:Reload() return end - if self:GetNextArcCWPrimaryFire() >= CurTime() then return end + if self:GetNextPrimaryFire() >= CurTime() then return end --if self:GetNextSecondaryFire() > CurTime() then return end -- don't succumb to -- californication diff --git a/lua/weapons/arccw_base/sh_sights.lua b/lua/weapons/arccw_base/sh_sights.lua index 97068f4f..29571543 100644 --- a/lua/weapons/arccw_base/sh_sights.lua +++ b/lua/weapons/arccw_base/sh_sights.lua @@ -20,8 +20,8 @@ function SWEP:EnterSprint() local s = self:GetBuff_Override("Override_ShootWhileSprint") or self.ShootWhileSprint - if !s and self:GetNextArcCWPrimaryFire() <= CurTime() then - self:SetNextArcCWPrimaryFire(CurTime()) + if !s and self:GetNextPrimaryFire() <= CurTime() then + self:SetNextPrimaryFire(CurTime()) end if self.Animations.enter_sprint and !s then @@ -42,8 +42,8 @@ function SWEP:ExitSprint() local s = self:GetBuff_Override("Override_ShootWhileSprint") or self.ShootWhileSprint - if !s and self:GetNextArcCWPrimaryFire() <= CurTime() then - self:SetNextArcCWPrimaryFire(CurTime()) + if !s and self:GetNextPrimaryFire() <= CurTime() then + self:SetNextPrimaryFire(CurTime()) end if self:GetOwner():KeyDown(IN_ATTACK2) then @@ -369,8 +369,8 @@ function SWEP:SwitchActiveSights() self.ActiveSight = 1 end - if self:GetNextArcCWPrimaryFire() <= (CurTime() + self:GetSightTime()) then - self:SetNextArcCWPrimaryFire(CurTime() + self:GetSightTime()) + if self:GetNextPrimaryFire() <= (CurTime() + self:GetSightTime()) then + self:SetNextPrimaryFire(CurTime() + self:GetSightTime()) end local asight = self:GetActiveSights() diff --git a/lua/weapons/arccw_base/sh_think.lua b/lua/weapons/arccw_base/sh_think.lua index bd4e030f..daafe8cb 100644 --- a/lua/weapons/arccw_base/sh_think.lua +++ b/lua/weapons/arccw_base/sh_think.lua @@ -78,8 +78,8 @@ function SWEP:Think() if self:GetCurrentFiremode().Mode < 0 and !self:GetCurrentFiremode().RunawayBurst then local postburst = self:GetCurrentFiremode().PostBurstDelay or 0 - if (CurTime() + postburst) > self:GetNextArcCWPrimaryFire() then - self:SetNextArcCWPrimaryFire(CurTime() + postburst) + if (CurTime() + postburst) > self:GetNextPrimaryFire() then + self:SetNextPrimaryFire(CurTime() + postburst) end end end diff --git a/lua/weapons/arccw_base/shared.lua b/lua/weapons/arccw_base/shared.lua index b8e37a68..7cf85975 100644 --- a/lua/weapons/arccw_base/shared.lua +++ b/lua/weapons/arccw_base/shared.lua @@ -594,12 +594,18 @@ end function SWEP:SetupDataTables() self:NetworkVar("Int", 0, "NWState") - - self:NetworkVar("Float", 0, "NextArcCWPrimaryFire") - self:NetworkVar("Int", 1, "BurstCount") + + -- self:NetworkVar("Float", 0, "NextPrimaryFire") + -- self:NetworkVar("Int", 1, "BurstCount") --self:NetworkVar("Int", 0, "NWState") +end +function SWEP:SetBurstCount(b) + self.BurstCount = b +end +function SWEP:GetBurstCount() + return self.BurstCount or 0 end function SWEP:SetState(v) @@ -662,13 +668,4 @@ function SWEP:BarrelHitWall() else return 0 end -end - -function SWEP:GetNextPrimaryFire() - return self:GetNextArcCWPrimaryFire() -end - -function SWEP:SetNextPrimaryFire(value) - self:SetNextArcCWPrimaryFire(value) - return end \ No newline at end of file diff --git a/lua/weapons/arccw_base/sv_npc.lua b/lua/weapons/arccw_base/sv_npc.lua index d0a83764..a91a3e85 100644 --- a/lua/weapons/arccw_base/sv_npc.lua +++ b/lua/weapons/arccw_base/sv_npc.lua @@ -10,7 +10,7 @@ function SWEP:NPC_Initialize() self:SetHoldType(self.HoldtypeNPC or self:GetBuff_Override("Override_HoldtypeActive") or self.HoldtypeActive) - self:SetNextArcCWPrimaryFire(CurTime()) + self:SetNextPrimaryFire(CurTime()) self:SetClip1(self:GetCapacity() or self.Primary.ClipSize) @@ -30,7 +30,7 @@ function SWEP:NPC_Initialize() self:GetOwner():Input("SetMaxLookDistance", nil, nil, range) - self:SetNextArcCWPrimaryFire(CurTime()) + self:SetNextPrimaryFire(CurTime()) self:SetNextSecondaryFire(CurTime() + 30) self:GetOwner():NextThink(CurTime()) end @@ -108,7 +108,7 @@ function SWEP:NPC_SetupAttachments() end function SWEP:NPC_Shoot() - -- if self:GetNextArcCWPrimaryFire() > CurTime() then return end + -- if self:GetNextPrimaryFire() > CurTime() then return end if !IsValid(self:GetOwner()) then return end if self:Clip1() <= 0 then self:GetOwner():SetSchedule(SCHED_HIDE_AND_RELOAD) return end @@ -264,7 +264,7 @@ function SWEP:NPC_Shoot() self:SetClip1(self:Clip1() - 1) - self:SetNextArcCWPrimaryFire(CurTime() + delay) + self:SetNextPrimaryFire(CurTime() + delay) if delay < 0.1 then self:GetOwner():NextThink(CurTime() + delay) end @@ -316,7 +316,7 @@ function SWEP:GetNPCBurstSettings() delay = self:GetBuff_Hook("Hook_ModifyRPM", delay) or delay - self:SetNextArcCWPrimaryFire(CurTime() + delay) + self:SetNextPrimaryFire(CurTime() + delay) if !mode then return 1, 1, delay end diff --git a/materials/particle/muzzleflash1.vmt b/materials/particle/muzzleflash1.vmt new file mode 100644 index 00000000..60749cb3 --- /dev/null +++ b/materials/particle/muzzleflash1.vmt @@ -0,0 +1,7 @@ +"UnlitGeneric" +{ + "$basetexture" "particle/muzzleflash1" + "$additive" "1" + "$vertexcolor" 1 + "$vertexalpha" "1" +} \ No newline at end of file diff --git a/materials/particle/muzzleflash1.vtf b/materials/particle/muzzleflash1.vtf new file mode 100644 index 00000000..3941ca61 Binary files /dev/null and b/materials/particle/muzzleflash1.vtf differ diff --git a/materials/particle/muzzleflash2.vmt b/materials/particle/muzzleflash2.vmt new file mode 100644 index 00000000..e6366f33 --- /dev/null +++ b/materials/particle/muzzleflash2.vmt @@ -0,0 +1,15 @@ +"UnlitGeneric" +{ + "$basetexture" "particle/muzzleflash2" + "$additive" "1" + "$vertexcolor" 1 + "$vertexalpha" "1" + "Proxies" + { + "AnimatedOffsetTexture" + { + "animatedtexturevar" "$basetexture" + "animatedtextureframenumvar" "$frame" + "animatedtextureframerate" 25.00 + } +} \ No newline at end of file diff --git a/materials/particle/muzzleflash2.vtf b/materials/particle/muzzleflash2.vtf new file mode 100644 index 00000000..f330b32c Binary files /dev/null and b/materials/particle/muzzleflash2.vtf differ diff --git a/materials/particle/particle_glow_05_additive_far.vmt b/materials/particle/particle_glow_05_additive_far.vmt new file mode 100644 index 00000000..92087e6a --- /dev/null +++ b/materials/particle/particle_glow_05_additive_far.vmt @@ -0,0 +1,18 @@ +"SpriteCard" +{ + "$basetexture" "particle\Particle_Glow_05" + $vertexcolor 1 + $vertexalpha 1 + $translucent 1 + $maxsize .35 + //$blendframes 0 + //$STARTFADESIZE .7 + //$ENDFADESIZE .75 + $depthblendscale 8 + $minsize 5 + $maxsize 10 + $additive 1 + $ignorez 1 + $STARTFADESIZE 5 + $ENDFADESIZE 5.5 +} \ No newline at end of file diff --git a/materials/particle/particle_glow_05_additive_noz.vmt b/materials/particle/particle_glow_05_additive_noz.vmt new file mode 100644 index 00000000..9dfc5c47 --- /dev/null +++ b/materials/particle/particle_glow_05_additive_noz.vmt @@ -0,0 +1,9 @@ +"UnlitGeneric" +{ + "$basetexture" "particle\Particle_Glow_05" + $vertexcolor 1 + $vertexalpha 1 + $translucent 1 + $additive 1 + $ignorez 1 +} \ No newline at end of file