Part of TPG namespace
TPG.Loadout.StampSpeed(ply)Description
Hold every ACE weapon the player carries to the speed the loadout set. weapon_ace_base's Think force-sets its owner's walk/run speed every tick from SWEP.NormalPlayerWalkSpeed / NormalPlayerRunSpeed (shared.lua Think). The base fills those in from the owner's real speed in its Deploy, but Deploy is just a method, and several ACE weapons define their own without ever calling the base's: weapon_ace_grenade, weapon_ace_smokegrenade and weapon_ace_slam all do. Those inherit the speed-forcing Think and keep the SWEP table's fallbacks, a flat 200 walk / 400 run (shared.lua:72). So pulling out a grenade, which every loadout carries, pinned the player to 200/400 on the SERVER for as long as it was out, and left them there. Most armour tiers sit near enough to those numbers to pass unnoticed; a Juggernaut is meant to move at 60/89 and instead sprinted at over three times its speed. Setting the speed before handing out weapons doesn't help, because these weapons never read it. Stamping the real numbers onto the weapons makes ACE's own Think arrive at the right answer whether or not the weapon ever snapshotted anything. Its CarrySpeedMul still applies on top, so per-weapon weight penalties (the SLAM's 0.6, say) survive. A no-op until tpg.loadout.Apply has run at least once for this player (walk speed networked as 0 means "no loadout yet") and while the player is dead.
Parameters
| Name | Type | Description |
|---|---|---|
ply | Player |
Returns
No return values documented.
Examples
No examples available.
Used In
No usages found in the codebase.