Reverted some of Fesiug's "Improvements"

This commit is contained in:
Haodong Mo 2020-09-27 12:45:26 +10:00
parent 5609ae05df
commit 53c77250f9
20 changed files with 88 additions and 40 deletions

View File

@ -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

View File

@ -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

View File

@ -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)

View File

@ -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

View File

@ -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

View File

@ -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()

View File

@ -41,6 +41,8 @@ function SWEP:ChangeFiremode(pred)
self:SetNWInt("firemode", fmi)
self:RecalcAllBuffs()
if SERVER then
if pred then
SuppressHostEvents(self:GetOwner())

View File

@ -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()

View File

@ -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

View File

@ -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

View File

@ -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()

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -0,0 +1,7 @@
"UnlitGeneric"
{
"$basetexture" "particle/muzzleflash1"
"$additive" "1"
"$vertexcolor" 1
"$vertexalpha" "1"
}

Binary file not shown.

View File

@ -0,0 +1,15 @@
"UnlitGeneric"
{
"$basetexture" "particle/muzzleflash2"
"$additive" "1"
"$vertexcolor" 1
"$vertexalpha" "1"
"Proxies"
{
"AnimatedOffsetTexture"
{
"animatedtexturevar" "$basetexture"
"animatedtextureframenumvar" "$frame"
"animatedtextureframerate" 25.00
}
}

Binary file not shown.

View File

@ -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
}

View File

@ -0,0 +1,9 @@
"UnlitGeneric"
{
"$basetexture" "particle\Particle_Glow_05"
$vertexcolor 1
$vertexalpha 1
$translucent 1
$additive 1
$ignorez 1
}