Back to TPG

TPG.CalculateSpeedBonus

S🏷️ Weapons

Part of TPG namespace

TPG.CalculateSpeedBonus(primaryId, secondaryId, specialId)
View on GitHub|gamemode/config/sh_weapons.lua:419-429
📋 Has LDoc👁️ 0 viewsUpdated 1 month ago

Description

Sum the movement-speed bonus/penalty from a full loadout's three weapon slots. An id that does not resolve to a known weapon (unknown category, unknown id, a stale saved loadout referencing a removed weapon) contributes 0 silently rather than erroring or warning, so a broken loadout reference shows up as a speed discrepancy, not as a visible failure. tier's speedBonus (see TPG.Config.minSpeedPercent).

Parameters

NameTypeDescription
primaryIdstring
secondaryIdstring
specialIdstring

Returns

TypeDescription
numberCombined speed bonus, added into the same sum as the armor

Examples

No examples available.

Used In

No usages found in the codebase.