SetHoldType -> SetWeaponHoldType
No idea who coded the new weapon hold type setting but it's horrible and broken.
This commit is contained in:
parent
8920bd2cf1
commit
4ece4c30ea
25 changed files with 32 additions and 32 deletions
|
@ -172,7 +172,7 @@ local pweapon_holdtype = SimplePanel( pweapon )
|
||||||
end
|
end
|
||||||
hbox.OnSelect = function(panel,index,value)
|
hbox.OnSelect = function(panel,index,value)
|
||||||
if (!value) then return end
|
if (!value) then return end
|
||||||
wep:SetHoldType( value )
|
wep:SetWeaponHoldType( value )
|
||||||
wep.HoldType = value
|
wep.HoldType = value
|
||||||
RunConsoleCommand("swepck_setholdtype", value)
|
RunConsoleCommand("swepck_setholdtype", value)
|
||||||
end
|
end
|
||||||
|
|
|
@ -29,7 +29,7 @@ local function Cmd_SetHoldType( pl, cmd, args )
|
||||||
local holdtype = args[1]
|
local holdtype = args[1]
|
||||||
local wep = GetSCKSWEP( pl )
|
local wep = GetSCKSWEP( pl )
|
||||||
if (IsValid(wep) and holdtype and table.HasValue( wep:GetHoldTypes(), holdtype )) then
|
if (IsValid(wep) and holdtype and table.HasValue( wep:GetHoldTypes(), holdtype )) then
|
||||||
wep:SetHoldType( holdtype )
|
wep:SetWeaponHoldType( holdtype )
|
||||||
wep.HoldType = holdtype
|
wep.HoldType = holdtype
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -76,7 +76,7 @@ local sck_class = ""
|
||||||
|
|
||||||
function SWEP:Initialize()
|
function SWEP:Initialize()
|
||||||
|
|
||||||
self:SetHoldType(self.HoldType)
|
self:SetWeaponHoldType(self.HoldType)
|
||||||
|
|
||||||
self:SetIronSights( true )
|
self:SetIronSights( true )
|
||||||
self:ResetIronSights()
|
self:ResetIronSights()
|
||||||
|
|
|
@ -18,7 +18,7 @@ SWEP.WalkSpeed = SPEED_NORMAL
|
||||||
SWEP.FullWalkSpeed = SPEED_SLOWEST
|
SWEP.FullWalkSpeed = SPEED_SLOWEST
|
||||||
|
|
||||||
function SWEP:Initialize()
|
function SWEP:Initialize()
|
||||||
self:SetHoldType("slam")
|
self:SetWeaponHoldType("slam")
|
||||||
self:SetDeploySpeed(1.1)
|
self:SetDeploySpeed(1.1)
|
||||||
self:HideViewAndWorldModel()
|
self:HideViewAndWorldModel()
|
||||||
end
|
end
|
||||||
|
|
|
@ -21,7 +21,7 @@ end
|
||||||
SWEP.WalkSpeed = SPEED_SLOWEST
|
SWEP.WalkSpeed = SPEED_SLOWEST
|
||||||
|
|
||||||
function SWEP:Initialize()
|
function SWEP:Initialize()
|
||||||
self:SetHoldType("rpg")
|
self:SetWeaponHoldType("rpg")
|
||||||
self:SetDeploySpeed(1.1)
|
self:SetDeploySpeed(1.1)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,7 @@ SWEP.EmptyWhenPurchased = true
|
||||||
function SWEP:Initialize()
|
function SWEP:Initialize()
|
||||||
if not self:IsValid() then return end --???
|
if not self:IsValid() then return end --???
|
||||||
|
|
||||||
self:SetHoldType(self.HoldType)
|
self:SetWeaponHoldType(self.HoldType)
|
||||||
self:SetDeploySpeed(1.1)
|
self:SetDeploySpeed(1.1)
|
||||||
|
|
||||||
-- Maybe we didn't want to convert the weapon to the new system...
|
-- 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 self.IronSightsHoldType then
|
||||||
if b then
|
if b then
|
||||||
self:SetHoldType(self.IronSightsHoldType)
|
self:SetWeaponHoldType(self.IronSightsHoldType)
|
||||||
else
|
else
|
||||||
self:SetHoldType(self.HoldType)
|
self:SetWeaponHoldType(self.HoldType)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -44,7 +44,7 @@ SWEP.SwingOffset = Vector(0, 0, 0)
|
||||||
|
|
||||||
function SWEP:Initialize()
|
function SWEP:Initialize()
|
||||||
self:SetDeploySpeed(1.1)
|
self:SetDeploySpeed(1.1)
|
||||||
self:SetHoldType(self.HoldType)
|
self:SetWeaponHoldType(self.HoldType)
|
||||||
self:SetWeaponSwingHoldType(self.SwingHoldType)
|
self:SetWeaponSwingHoldType(self.SwingHoldType)
|
||||||
|
|
||||||
if CLIENT then
|
if CLIENT then
|
||||||
|
@ -54,7 +54,7 @@ end
|
||||||
|
|
||||||
function SWEP:SetWeaponSwingHoldType(t)
|
function SWEP:SetWeaponSwingHoldType(t)
|
||||||
local old = self.ActivityTranslate
|
local old = self.ActivityTranslate
|
||||||
self:SetHoldType(t)
|
self:SetWeaponHoldType(t)
|
||||||
local new = self.ActivityTranslate
|
local new = self.ActivityTranslate
|
||||||
self.ActivityTranslate = old
|
self.ActivityTranslate = old
|
||||||
self.ActivityTranslateSwing = new
|
self.ActivityTranslateSwing = new
|
||||||
|
|
|
@ -18,7 +18,7 @@ SWEP.WalkSpeed = SPEED_NORMAL
|
||||||
SWEP.FullWalkSpeed = SPEED_SLOW
|
SWEP.FullWalkSpeed = SPEED_SLOW
|
||||||
|
|
||||||
function SWEP:Initialize()
|
function SWEP:Initialize()
|
||||||
self:SetHoldType("slam")
|
self:SetWeaponHoldType("slam")
|
||||||
self:SetDeploySpeed(1.1)
|
self:SetDeploySpeed(1.1)
|
||||||
self:HideViewAndWorldModel()
|
self:HideViewAndWorldModel()
|
||||||
end
|
end
|
||||||
|
|
|
@ -34,7 +34,7 @@ SWEP.NoPickupNotification = true
|
||||||
SWEP.HoldType = "slam"
|
SWEP.HoldType = "slam"
|
||||||
|
|
||||||
function SWEP:Initialize()
|
function SWEP:Initialize()
|
||||||
self:SetHoldType(self.HoldType)
|
self:SetWeaponHoldType(self.HoldType)
|
||||||
end
|
end
|
||||||
|
|
||||||
if SERVER then
|
if SERVER then
|
||||||
|
|
|
@ -50,7 +50,7 @@ SWEP.Secondary.Ammo = "none"
|
||||||
SWEP.WalkSpeed = SPEED_FAST
|
SWEP.WalkSpeed = SPEED_FAST
|
||||||
|
|
||||||
function SWEP:Initialize()
|
function SWEP:Initialize()
|
||||||
self:SetHoldType("grenade")
|
self:SetWeaponHoldType("grenade")
|
||||||
self:SetDeploySpeed(1.1)
|
self:SetDeploySpeed(1.1)
|
||||||
|
|
||||||
if CLIENT then
|
if CLIENT then
|
||||||
|
|
|
@ -40,7 +40,7 @@ SWEP.NoPickupNotification = true
|
||||||
SWEP.HoldType = "slam"
|
SWEP.HoldType = "slam"
|
||||||
|
|
||||||
function SWEP:Initialize()
|
function SWEP:Initialize()
|
||||||
self:SetHoldType(self.HoldType)
|
self:SetWeaponHoldType(self.HoldType)
|
||||||
self:SetDeploySpeed(10)
|
self:SetDeploySpeed(10)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@ SWEP.WalkSpeed = SPEED_NORMAL
|
||||||
SWEP.FullWalkSpeed = SPEED_SLOWEST
|
SWEP.FullWalkSpeed = SPEED_SLOWEST
|
||||||
|
|
||||||
function SWEP:Initialize()
|
function SWEP:Initialize()
|
||||||
self:SetHoldType("slam")
|
self:SetWeaponHoldType("slam")
|
||||||
self:SetDeploySpeed(1.1)
|
self:SetDeploySpeed(1.1)
|
||||||
self:HideViewAndWorldModel()
|
self:HideViewAndWorldModel()
|
||||||
end
|
end
|
||||||
|
|
|
@ -29,8 +29,8 @@ local SwingSound = Sound( "weapons/slam/throw.wav" )
|
||||||
local HitSound = Sound( "Flesh.ImpactHard" )
|
local HitSound = Sound( "Flesh.ImpactHard" )
|
||||||
|
|
||||||
function SWEP:Initialize()
|
function SWEP:Initialize()
|
||||||
--self:SetHoldType("normal")
|
--self:SetWeaponHoldType("normal")
|
||||||
self:SetHoldType("fist")
|
self:SetWeaponHoldType("fist")
|
||||||
end
|
end
|
||||||
|
|
||||||
function SWEP:PreDrawViewModel(vm, wep, pl)
|
function SWEP:PreDrawViewModel(vm, wep, pl)
|
||||||
|
@ -50,7 +50,7 @@ function SWEP:UpdateNextIdle()
|
||||||
end
|
end
|
||||||
|
|
||||||
function SWEP:PrimaryAttack(right)
|
function SWEP:PrimaryAttack(right)
|
||||||
--self:SetHoldType("fist")
|
--self:SetWeaponHoldType("fist")
|
||||||
self:SetNextIdleHoldType(CurTime() + 2)
|
self:SetNextIdleHoldType(CurTime() + 2)
|
||||||
self.Owner:SetAnimation(PLAYER_ATTACK1)
|
self.Owner:SetAnimation(PLAYER_ATTACK1)
|
||||||
self.WalkSpeed = 165
|
self.WalkSpeed = 165
|
||||||
|
@ -197,7 +197,7 @@ function SWEP:Think()
|
||||||
local idle_holdtype_time = self:GetNextIdleHoldType()
|
local idle_holdtype_time = self:GetNextIdleHoldType()
|
||||||
|
|
||||||
if idle_holdtype_time > 0 and curtime >= idle_holdtype_time then
|
if idle_holdtype_time > 0 and curtime >= idle_holdtype_time then
|
||||||
--self:SetHoldType("normal")
|
--self:SetWeaponHoldType("normal")
|
||||||
self:SetNextIdleHoldType(0)
|
self:SetNextIdleHoldType(0)
|
||||||
self.WalkSpeed = SPEED_NORMAL
|
self.WalkSpeed = SPEED_NORMAL
|
||||||
self.Owner:ResetSpeed()
|
self.Owner:ResetSpeed()
|
||||||
|
|
|
@ -18,7 +18,7 @@ SWEP.Secondary.Ammo = "none"
|
||||||
SWEP.WalkSpeed = SPEED_FAST
|
SWEP.WalkSpeed = SPEED_FAST
|
||||||
|
|
||||||
function SWEP:Initialize()
|
function SWEP:Initialize()
|
||||||
self:SetHoldType("grenade")
|
self:SetWeaponHoldType("grenade")
|
||||||
self:SetDeploySpeed(1.1)
|
self:SetDeploySpeed(1.1)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@ SWEP.WalkSpeed = SPEED_NORMAL
|
||||||
SWEP.FullWalkSpeed = SPEED_SLOWEST
|
SWEP.FullWalkSpeed = SPEED_SLOWEST
|
||||||
|
|
||||||
function SWEP:Initialize()
|
function SWEP:Initialize()
|
||||||
self:SetHoldType("slam")
|
self:SetWeaponHoldType("slam")
|
||||||
self:SetDeploySpeed(1.1)
|
self:SetDeploySpeed(1.1)
|
||||||
self:HideViewAndWorldModel()
|
self:HideViewAndWorldModel()
|
||||||
end
|
end
|
||||||
|
|
|
@ -40,7 +40,7 @@ SWEP.NoPickupNotification = true
|
||||||
SWEP.HoldType = "slam"
|
SWEP.HoldType = "slam"
|
||||||
|
|
||||||
function SWEP:Initialize()
|
function SWEP:Initialize()
|
||||||
self:SetHoldType(self.HoldType)
|
self:SetWeaponHoldType(self.HoldType)
|
||||||
self:SetDeploySpeed(10)
|
self:SetDeploySpeed(10)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -53,7 +53,7 @@ SWEP.Secondary.Ammo = "none"
|
||||||
SWEP.WalkSpeed = SPEED_FAST
|
SWEP.WalkSpeed = SPEED_FAST
|
||||||
|
|
||||||
function SWEP:Initialize()
|
function SWEP:Initialize()
|
||||||
self:SetHoldType("grenade")
|
self:SetWeaponHoldType("grenade")
|
||||||
self:SetDeploySpeed(1.1)
|
self:SetDeploySpeed(1.1)
|
||||||
|
|
||||||
if CLIENT then
|
if CLIENT then
|
||||||
|
|
|
@ -42,7 +42,7 @@ SWEP.NoPickupNotification = true
|
||||||
SWEP.HoldType = "slam"
|
SWEP.HoldType = "slam"
|
||||||
|
|
||||||
function SWEP:Initialize()
|
function SWEP:Initialize()
|
||||||
self:SetHoldType(self.HoldType)
|
self:SetWeaponHoldType(self.HoldType)
|
||||||
self:SetDeploySpeed(10)
|
self:SetDeploySpeed(10)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -40,7 +40,7 @@ SWEP.NoMagazine = true
|
||||||
SWEP.HoldType = "slam"
|
SWEP.HoldType = "slam"
|
||||||
|
|
||||||
function SWEP:Initialize()
|
function SWEP:Initialize()
|
||||||
self:SetHoldType(self.HoldType)
|
self:SetWeaponHoldType(self.HoldType)
|
||||||
self:SetDeploySpeed(1.1)
|
self:SetDeploySpeed(1.1)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@ SWEP.WalkSpeed = SPEED_NORMAL
|
||||||
SWEP.FullWalkSpeed = SPEED_SLOW
|
SWEP.FullWalkSpeed = SPEED_SLOW
|
||||||
|
|
||||||
function SWEP:Initialize()
|
function SWEP:Initialize()
|
||||||
self:SetHoldType("slam")
|
self:SetWeaponHoldType("slam")
|
||||||
self:SetDeploySpeed(1.1)
|
self:SetDeploySpeed(1.1)
|
||||||
self:HideViewAndWorldModel()
|
self:HideViewAndWorldModel()
|
||||||
end
|
end
|
||||||
|
|
|
@ -18,7 +18,7 @@ SWEP.WalkSpeed = SPEED_NORMAL
|
||||||
SWEP.FullWalkSpeed = SPEED_SLOWEST
|
SWEP.FullWalkSpeed = SPEED_SLOWEST
|
||||||
|
|
||||||
function SWEP:Initialize()
|
function SWEP:Initialize()
|
||||||
self:SetHoldType("slam")
|
self:SetWeaponHoldType("slam")
|
||||||
self:SetDeploySpeed(1.1)
|
self:SetDeploySpeed(1.1)
|
||||||
self:HideViewAndWorldModel()
|
self:HideViewAndWorldModel()
|
||||||
end
|
end
|
||||||
|
|
|
@ -18,7 +18,7 @@ SWEP.WalkSpeed = SPEED_NORMAL
|
||||||
SWEP.FullWalkSpeed = SPEED_SLOWEST
|
SWEP.FullWalkSpeed = SPEED_SLOWEST
|
||||||
|
|
||||||
function SWEP:Initialize()
|
function SWEP:Initialize()
|
||||||
self:SetHoldType("slam")
|
self:SetWeaponHoldType("slam")
|
||||||
self:SetDeploySpeed(1.1)
|
self:SetDeploySpeed(1.1)
|
||||||
self:HideViewAndWorldModel()
|
self:HideViewAndWorldModel()
|
||||||
end
|
end
|
||||||
|
|
|
@ -50,7 +50,7 @@ SWEP.Secondary.Ammo = "none"
|
||||||
SWEP.WalkSpeed = SPEED_FAST
|
SWEP.WalkSpeed = SPEED_FAST
|
||||||
|
|
||||||
function SWEP:Initialize()
|
function SWEP:Initialize()
|
||||||
self:SetHoldType("grenade")
|
self:SetWeaponHoldType("grenade")
|
||||||
self:SetDeploySpeed(1.1)
|
self:SetDeploySpeed(1.1)
|
||||||
|
|
||||||
if CLIENT then
|
if CLIENT then
|
||||||
|
|
|
@ -28,9 +28,9 @@ function SWEP:SetIronsights(b)
|
||||||
|
|
||||||
if self.IronSightsHoldType then
|
if self.IronSightsHoldType then
|
||||||
if b then
|
if b then
|
||||||
self:SetHoldType(self.IronSightsHoldType)
|
self:SetWeaponHoldType(self.IronSightsHoldType)
|
||||||
else
|
else
|
||||||
self:SetHoldType(self.HoldType)
|
self:SetWeaponHoldType(self.HoldType)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -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_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_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_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_headcrab = "> PRIMARY: Lunge attack\n> RELOAD: Burrow"
|
||||||
LANGUAGE.controls_fast_headcrab = "> PRIMARY: Lunge attack"
|
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"
|
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"
|
||||||
|
|
Loading…
Reference in a new issue