SetHoldType -> SetWeaponHoldType

No idea who coded the new weapon hold type setting but it's horrible and
broken.
This commit is contained in:
JetBoom 2014-11-11 19:15:49 -05:00
parent 8920bd2cf1
commit 4ece4c30ea
25 changed files with 32 additions and 32 deletions

View file

@ -172,7 +172,7 @@ local pweapon_holdtype = SimplePanel( pweapon )
end
hbox.OnSelect = function(panel,index,value)
if (!value) then return end
wep:SetHoldType( value )
wep:SetWeaponHoldType( value )
wep.HoldType = value
RunConsoleCommand("swepck_setholdtype", value)
end

View file

@ -29,7 +29,7 @@ local function Cmd_SetHoldType( pl, cmd, args )
local holdtype = args[1]
local wep = GetSCKSWEP( pl )
if (IsValid(wep) and holdtype and table.HasValue( wep:GetHoldTypes(), holdtype )) then
wep:SetHoldType( holdtype )
wep:SetWeaponHoldType( holdtype )
wep.HoldType = holdtype
end

View file

@ -76,7 +76,7 @@ local sck_class = ""
function SWEP:Initialize()
self:SetHoldType(self.HoldType)
self:SetWeaponHoldType(self.HoldType)
self:SetIronSights( true )
self:ResetIronSights()

View file

@ -18,7 +18,7 @@ SWEP.WalkSpeed = SPEED_NORMAL
SWEP.FullWalkSpeed = SPEED_SLOWEST
function SWEP:Initialize()
self:SetHoldType("slam")
self:SetWeaponHoldType("slam")
self:SetDeploySpeed(1.1)
self:HideViewAndWorldModel()
end

View file

@ -21,7 +21,7 @@ end
SWEP.WalkSpeed = SPEED_SLOWEST
function SWEP:Initialize()
self:SetHoldType("rpg")
self:SetWeaponHoldType("rpg")
self:SetDeploySpeed(1.1)
end

View file

@ -33,7 +33,7 @@ SWEP.EmptyWhenPurchased = true
function SWEP:Initialize()
if not self:IsValid() then return end --???
self:SetHoldType(self.HoldType)
self:SetWeaponHoldType(self.HoldType)
self:SetDeploySpeed(1.1)
-- Maybe we didn't want to convert the weapon to the new system...
@ -89,9 +89,9 @@ function SWEP:SetIronsights(b)
if self.IronSightsHoldType then
if b then
self:SetHoldType(self.IronSightsHoldType)
self:SetWeaponHoldType(self.IronSightsHoldType)
else
self:SetHoldType(self.HoldType)
self:SetWeaponHoldType(self.HoldType)
end
end

View file

@ -44,7 +44,7 @@ SWEP.SwingOffset = Vector(0, 0, 0)
function SWEP:Initialize()
self:SetDeploySpeed(1.1)
self:SetHoldType(self.HoldType)
self:SetWeaponHoldType(self.HoldType)
self:SetWeaponSwingHoldType(self.SwingHoldType)
if CLIENT then
@ -54,7 +54,7 @@ end
function SWEP:SetWeaponSwingHoldType(t)
local old = self.ActivityTranslate
self:SetHoldType(t)
self:SetWeaponHoldType(t)
local new = self.ActivityTranslate
self.ActivityTranslate = old
self.ActivityTranslateSwing = new

View file

@ -18,7 +18,7 @@ SWEP.WalkSpeed = SPEED_NORMAL
SWEP.FullWalkSpeed = SPEED_SLOW
function SWEP:Initialize()
self:SetHoldType("slam")
self:SetWeaponHoldType("slam")
self:SetDeploySpeed(1.1)
self:HideViewAndWorldModel()
end

View file

@ -34,7 +34,7 @@ SWEP.NoPickupNotification = true
SWEP.HoldType = "slam"
function SWEP:Initialize()
self:SetHoldType(self.HoldType)
self:SetWeaponHoldType(self.HoldType)
end
if SERVER then

View file

@ -50,7 +50,7 @@ SWEP.Secondary.Ammo = "none"
SWEP.WalkSpeed = SPEED_FAST
function SWEP:Initialize()
self:SetHoldType("grenade")
self:SetWeaponHoldType("grenade")
self:SetDeploySpeed(1.1)
if CLIENT then

View file

@ -40,7 +40,7 @@ SWEP.NoPickupNotification = true
SWEP.HoldType = "slam"
function SWEP:Initialize()
self:SetHoldType(self.HoldType)
self:SetWeaponHoldType(self.HoldType)
self:SetDeploySpeed(10)
end

View file

@ -18,7 +18,7 @@ SWEP.WalkSpeed = SPEED_NORMAL
SWEP.FullWalkSpeed = SPEED_SLOWEST
function SWEP:Initialize()
self:SetHoldType("slam")
self:SetWeaponHoldType("slam")
self:SetDeploySpeed(1.1)
self:HideViewAndWorldModel()
end

View file

@ -29,8 +29,8 @@ local SwingSound = Sound( "weapons/slam/throw.wav" )
local HitSound = Sound( "Flesh.ImpactHard" )
function SWEP:Initialize()
--self:SetHoldType("normal")
self:SetHoldType("fist")
--self:SetWeaponHoldType("normal")
self:SetWeaponHoldType("fist")
end
function SWEP:PreDrawViewModel(vm, wep, pl)
@ -50,7 +50,7 @@ function SWEP:UpdateNextIdle()
end
function SWEP:PrimaryAttack(right)
--self:SetHoldType("fist")
--self:SetWeaponHoldType("fist")
self:SetNextIdleHoldType(CurTime() + 2)
self.Owner:SetAnimation(PLAYER_ATTACK1)
self.WalkSpeed = 165
@ -197,7 +197,7 @@ function SWEP:Think()
local idle_holdtype_time = self:GetNextIdleHoldType()
if idle_holdtype_time > 0 and curtime >= idle_holdtype_time then
--self:SetHoldType("normal")
--self:SetWeaponHoldType("normal")
self:SetNextIdleHoldType(0)
self.WalkSpeed = SPEED_NORMAL
self.Owner:ResetSpeed()

View file

@ -18,7 +18,7 @@ SWEP.Secondary.Ammo = "none"
SWEP.WalkSpeed = SPEED_FAST
function SWEP:Initialize()
self:SetHoldType("grenade")
self:SetWeaponHoldType("grenade")
self:SetDeploySpeed(1.1)
end

View file

@ -18,7 +18,7 @@ SWEP.WalkSpeed = SPEED_NORMAL
SWEP.FullWalkSpeed = SPEED_SLOWEST
function SWEP:Initialize()
self:SetHoldType("slam")
self:SetWeaponHoldType("slam")
self:SetDeploySpeed(1.1)
self:HideViewAndWorldModel()
end

View file

@ -40,7 +40,7 @@ SWEP.NoPickupNotification = true
SWEP.HoldType = "slam"
function SWEP:Initialize()
self:SetHoldType(self.HoldType)
self:SetWeaponHoldType(self.HoldType)
self:SetDeploySpeed(10)
end

View file

@ -53,7 +53,7 @@ SWEP.Secondary.Ammo = "none"
SWEP.WalkSpeed = SPEED_FAST
function SWEP:Initialize()
self:SetHoldType("grenade")
self:SetWeaponHoldType("grenade")
self:SetDeploySpeed(1.1)
if CLIENT then

View file

@ -42,7 +42,7 @@ SWEP.NoPickupNotification = true
SWEP.HoldType = "slam"
function SWEP:Initialize()
self:SetHoldType(self.HoldType)
self:SetWeaponHoldType(self.HoldType)
self:SetDeploySpeed(10)
end

View file

@ -40,7 +40,7 @@ SWEP.NoMagazine = true
SWEP.HoldType = "slam"
function SWEP:Initialize()
self:SetHoldType(self.HoldType)
self:SetWeaponHoldType(self.HoldType)
self:SetDeploySpeed(1.1)
end

View file

@ -18,7 +18,7 @@ SWEP.WalkSpeed = SPEED_NORMAL
SWEP.FullWalkSpeed = SPEED_SLOW
function SWEP:Initialize()
self:SetHoldType("slam")
self:SetWeaponHoldType("slam")
self:SetDeploySpeed(1.1)
self:HideViewAndWorldModel()
end

View file

@ -18,7 +18,7 @@ SWEP.WalkSpeed = SPEED_NORMAL
SWEP.FullWalkSpeed = SPEED_SLOWEST
function SWEP:Initialize()
self:SetHoldType("slam")
self:SetWeaponHoldType("slam")
self:SetDeploySpeed(1.1)
self:HideViewAndWorldModel()
end

View file

@ -18,7 +18,7 @@ SWEP.WalkSpeed = SPEED_NORMAL
SWEP.FullWalkSpeed = SPEED_SLOWEST
function SWEP:Initialize()
self:SetHoldType("slam")
self:SetWeaponHoldType("slam")
self:SetDeploySpeed(1.1)
self:HideViewAndWorldModel()
end

View file

@ -50,7 +50,7 @@ SWEP.Secondary.Ammo = "none"
SWEP.WalkSpeed = SPEED_FAST
function SWEP:Initialize()
self:SetHoldType("grenade")
self:SetWeaponHoldType("grenade")
self:SetDeploySpeed(1.1)
if CLIENT then

View file

@ -28,9 +28,9 @@ function SWEP:SetIronsights(b)
if self.IronSightsHoldType then
if b then
self:SetHoldType(self.IronSightsHoldType)
self:SetWeaponHoldType(self.IronSightsHoldType)
else
self:SetHoldType(self.HoldType)
self:SetWeaponHoldType(self.HoldType)
end
end

View file

@ -235,7 +235,7 @@ LANGUAGE.controls_zombie = "> PRIMARY: Claws\n> SECONDARY: Scream\n> RELOA
LANGUAGE.controls_poison_zombie = "> PRIMARY: Claws\n> SECONDARY: Flesh toss\n> RELOAD: Scream"
LANGUAGE.controls_fast_zombie = "> PRIMARY: Claws\n> SECONDARY: Lunge / Climb (next to wall)\n> RELOAD: Scream"
LANGUAGE.controls_bloated_zombie = "> PRIMARY: Claws\n> SECONDARY: Moan\n> SPRINT: Feign death\n> ON DEATH: Poison Gibs"
LANGUAGE.controls_ghoul = "> PRIMARY: Poison claws\n> SECONDARY: Flesh toss\n> SPRINT: Feign death\n> RELOAD: Scream\n> ON HIT HUMAN: Slow\n> ON HIT BY HUMAN: Poison ejection"
LANGUAGE.controls_ghoul = "> PRIMARY: Poison claws\n> SECONDARY: Flesh toss\n> SPRINT: Feign death\n> RELOAD: Scream\n> ON HIT HUMAN: Slow"
LANGUAGE.controls_headcrab = "> PRIMARY: Lunge attack\n> RELOAD: Burrow"
LANGUAGE.controls_fast_headcrab = "> PRIMARY: Lunge attack"
LANGUAGE.controls_poison_headcrab = "> PRIMARY: Lunge attack\n> SECONDARY: Spit poison\n> ON HIT HUMAN: Deadly poison\n> ON HIT POISON IN EYES: Blind\n> RELOAD: Scream"