Cannot use Iron Sights while standing still

I have been doing some editing converting a Gmod 13 CSS Weapon Base to TTT, and I cannot seem to get iron sights working while standing still, it works while crouching and moving. I shorten the code because nobody got time for that.
[LUA]
– Accuracy
SWEP.CrouchCone = 0.01 – Accuracy when we’re crouching
SWEP.CrouchWalkCone = 0.02 – Accuracy when we’re crouching and walking
SWEP.WalkCone = 0.025 – Accuracy when we’re walking
SWEP.AirCone = 0.1 – Accuracy when we’re in air
SWEP.StandCone = 0.015 – Accuracy when we’re standing still

– crosshair
if CLIENT then
local sights_opacity = CreateConVar(“ttt_ironsights_crosshair_opacity”, “0.8”, FCVAR_ARCHIVE)
local crosshair_brightness = CreateConVar(“ttt_crosshair_brightness”, “1.0”, FCVAR_ARCHIVE)
local crosshair_size = CreateConVar(“ttt_crosshair_size”, “1.0”, FCVAR_ARCHIVE)
local disable_crosshair = CreateConVar(“ttt_disable_crosshair”, “0”, FCVAR_ARCHIVE)

function SWEP:DrawHUD()
local client = LocalPlayer()
if disable_crosshair:GetBool() or (not IsValid(client)) then return end

  local sights = (not self.NoSights) and self:GetIronsights()

  local x = ScrW() * 0.5
  local y = ScrH() * 0.5
  local scale = math.max(0.2,  10 * self.Primary.Cone)

  local LastShootTime = self:LastShootTime()
  scale = scale * (2 - math.Clamp( (CurTime() - LastShootTime) * 5, 0.0, 1.0 ))

  local alpha = sights and sights_opacity:GetFloat() or 1
  local bright = crosshair_brightness:GetFloat() or 1

  -- somehow it seems this can be called before my player metatable
  -- additions have loaded
  if client.IsTraitor and client:IsTraitor() then
     surface.SetDrawColor(255 * bright,
                          50 * bright,
                          50 * bright,
                          255 * alpha)
  else
     surface.SetDrawColor(0,
                          255 * bright,
                          0,
                          255 * alpha)
  end

  local gap = 20 * scale * (sights and 0.8 or 1)
  local length = gap + (25 * crosshair_size:GetFloat()) * scale
  surface.DrawLine(x - length, y, x - gap, y)
  surface.DrawLine(x + length, y, x + gap, y)
  surface.DrawLine(x, y - length, x, y - gap)
  surface.DrawLine(x, y + length, x, y + gap)

  if self.HUDHelp then
     self:DrawHelp()
  end

end

local GetTranslation = LANG.GetTranslation
local GetPTranslation = LANG.GetParamTranslation

– Many non-gun weapons benefit from some help
local help_spec = {text = “”, font = “TabLarge”, xalign = TEXT_ALIGN_CENTER}
function SWEP:DrawHelp()
local data = self.HUDHelp

  local translate = data.translatable
  local primary   = data.primary
  local secondary = data.secondary

  if translate then
     primary   = primary   and GetPTranslation(primary,   data.translate_params)
     secondary = secondary and GetPTranslation(secondary, data.translate_params)
  end

  help_spec.pos  = {ScrW() / 2.0, ScrH() - 40}
  help_spec.text = secondary or primary
  draw.TextShadow(help_spec, 2)

  -- if no secondary exists, primary is drawn at the bottom and no top line
  -- is drawn
  if secondary then
     help_spec.pos[2] = ScrH() - 60
     help_spec.text = primary
     draw.TextShadow(help_spec, 2)
  end

end

– mousebuttons are enough for most weapons
local default_key_params = {
primaryfire = Key("+attack", “LEFT MOUSE”),
secondaryfire = Key("+attack2", “RIGHT MOUSE”),
usekey = Key("+use", “USE”)
};

function SWEP:AddHUDHelp(primary_text, secondary_text, translate, extra_params)
extra_params = extra_params or {}

  self.HUDHelp = {
     primary = primary_text,
     secondary = secondary_text,
     translatable = translate,
     translate_params = table.Merge(extra_params, default_key_params)
  };

end
end

function SWEP:CanSecondaryAttack()
if not IsValid(self.Owner) then return end

if self:Clip2() <= 0 then
self:DryFire(self.SetNextSecondaryFire)
return false
end
return true
end

function SWEP:SecondaryAttack()
if self.NoSights or (not self.IronSightsPos) then return end
–if self:GetNextSecondaryFire() > CurTime() then return end

self:SetIronsights(not self:GetIronsights())

self:SetNextSecondaryFire(CurTime() + 0.3)
end

– Dummy functions that will be replaced when SetupDataTables runs. These are
– here for when that does not happen (due to e.g. stacking base classes)
function SWEP:GetIronsights() return false end
function SWEP:SetIronsights() end

– Set up ironsights dt bool. Weapons using their own DT vars will have to make
– sure they call this.
function SWEP:SetupDataTables()
– Put it in the last slot, least likely to interfere with derived weapon’s
– own stuff.
self:NetworkVar(“Bool”, 3, “Ironsights”)
end

function SWEP:Initialize()
if CLIENT and self:Clip1() == -1 then
self:SetClip1(self.Primary.DefaultClip)
elseif SERVER then
self.fingerprints = {}

  self:SetIronsights(false)

end

self:SetDeploySpeed(self.DeploySpeed)

--Spread Change
self:SetNWInt("crouchcone", self.CrouchCone)
self:SetNWInt("crouchwalkcone", self.CrouchWalkCone)
self:SetNWInt("walkcone", self.WalkCone)
self:SetNWInt("aircone", self.AirCone)
self:SetNWInt("standcone", self.StandCone)
self:SetNWInt("ironsightscone", self.IronsightsCone)
--Recoil change
self:SetNWInt("recoil", self.Recoil)
self:SetNWInt("recoilzoom", self.RecoilZoom)
--Delay change
self:SetNWInt("delay", self.Delay)
self:SetNWInt("delayzoom", self.DelayZoom)

– compat for gmod update
if self.SetWeaponHoldType then
self:SetWeaponHoldType(self.HoldType or “pistol”)
end
end

function SWEP:Think()
if self.Owner:OnGround() and (self.Owner:KeyDown(IN_FORWARD) or self.Owner:KeyDown(IN_BACK) or self.Owner:KeyDown(IN_MOVERIGHT) or self.Owner:KeyDown(IN_MOVELEFT)) then
if self.Owner:KeyDown(IN_DUCK) then
self.Primary.Cone = self:GetNWInt(“crouchwalkcone”)
else
self.Primary.Cone = self:GetNWInt(“walkcone”)
end
elseif self.Owner:OnGround() and self.Owner:KeyDown(IN_DUCK) then
self.Primary.Cone = self:GetNWInt(“crouchcone”)
elseif not self.Owner:OnGround() then
self.Primary.Cone = self:GetNWInt(“aircone”)
else
if (self:SetIronsights() == true) then
self.Primary.Cone = self:GetNWInt(“ironsightscone”)
else
self.Primary.Cone = self:GetNWInt(“standcone”)
end

end

end

local ttt_lowered = CreateConVar(“ttt_ironsights_lowered”, “1”, FCVAR_ARCHIVE)

local LOWER_POS = Vector(0, 0, -2)

local IRONSIGHT_TIME = 0.25
function SWEP:GetViewModelPosition( pos, ang )
if not self.IronSightsPos then return pos, ang end

local bIron = self:GetIronsights()

if bIron != self.bLastIron then
self.bLastIron = bIron
self.fIronTime = CurTime()

  if bIron then
     self.SwayScale = 0.3
     self.BobScale = 0.1
  else
     self.SwayScale = 1.0
     self.BobScale = 1.0
  end

end

local fIronTime = self.fIronTime or 0
if (not bIron) and fIronTime < CurTime() - IRONSIGHT_TIME then
return pos, ang
end

local mul = 1.0

if fIronTime > CurTime() - IRONSIGHT_TIME then

  mul = math.Clamp( (CurTime() - fIronTime) / IRONSIGHT_TIME, 0, 1 )

  if not bIron then mul = 1 - mul end

end

local offset = self.IronSightsPos + (ttt_lowered:GetBool() and LOWER_POS or vector_origin)

if self.IronSightsAng then
ang = ang * 1
ang:RotateAroundAxis( ang:Right(), self.IronSightsAng.x * mul )
ang:RotateAroundAxis( ang:Up(), self.IronSightsAng.y * mul )
ang:RotateAroundAxis( ang:Forward(), self.IronSightsAng.z * mul )
end

pos = pos + offset.x * ang:Right() * mul
pos = pos + offset.y * ang:Forward() * mul
pos = pos + offset.z * ang:Up() * mul

return pos, ang
end
[/LUA]

Wait what base is this?

[editline]11th September 2014[/editline]

looks a bit like BTW

I used the TTT default base and I believe BTW base.