• How is player speed while aiming down the sights detected?
    1 replies, posted
Hey guys, I've been reading through the terrortown swep base and the base for CSS realistic weapons trying to learn how the game handles player speed while aiming down the iron sights, as most sweps will make you slower when you are doing so. I've done a few ctrl+f searches for various keywords I thought would help but haven't found anything helpful, so either I'm being silly or it isn't entirely obvious. I have a working swep that has no crosshair, but if you aim down the sights you still move at the same speed, which sort of nullifies the point. I did try some trial and error tricks, but neither worked, so I thought I'd ask and see if anyone has helpful information.
Line 1079 of player.lua [lua] -- Slow down ironsighters local wep = ply:GetActiveWeapon() if IsValid(wep) and wep.GetIronsights and wep:GetIronsights() then ply:SetSpeed(true) else ply:SetSpeed(false) end [/lua] In TTT the sprinting speed is slower than the walking speed.
Sorry, you need to Log In to post a reply to this thread.