Armor Weight Speed Penalty 1.0.0 (olds.ro)
==========================================
Armor is heavy: every armor point lowers the player's top speed a little,
and a helmet adds a bit more. The penalty follows the armor as it is bought
or shot away.
- Speed lost per armor point: olds_aw_factor (0.0005), so 100 armor makes
the player 5 percent slower. A helmet adds olds_aw_helmet (1 percent):
Kevlar + helmet with 100 armor = 6 percent.
- The player always keeps at least olds_aw_min (0.8 = 80 percent) of his
speed; olds_aw_min 1.0 turns the penalty off.
- The penalty applies to the game's own speed for the weapon in hand
(knife, rifle, zoomed sniper, shield...), so the knife is still the
fastest, just a little slower than without armor.
- It never stacks, however often armor is bought: the game works the
speed out again from the weapon and the plugin lowers it once.
- It follows the armor at once: buying armor, losing armor to damage and
changing the cvars all update the speed.
- Freeze time is left alone (nobody can move then); the penalty applies
as soon as it ends.
Requirements
- ReHLDS, ReGameDLL_CS, Metamod-r, ReAPI
- AMX Mod X 1.10.0.5490 or newer
Install
1. Compile scripting/olds_armorweight.sma and copy olds_armorweight.amxx
to addons/amxmodx/plugins/. The compiler needs ReAPI's include files
(reapi.inc and the reapi_*.inc files from the ReAPI release, in
addons/amxmodx/scripting/include/) next to the stock AMX Mod X includes.
2. Copy configs/plugins/olds_armorweight.cfg to
addons/amxmodx/configs/plugins/ and change the values you want.
(If the file is missing, the plugin writes one with the defaults the
first time it starts.)
3. Add olds_armorweight.amxx to addons/amxmodx/configs/plugins.ini.
Settings (addons/amxmodx/configs/plugins/olds_armorweight.cfg)
olds_aw_factor 0.0005 speed lost per armor point, as a fraction
olds_aw_helmet 0.01 extra speed lost with a helmet
olds_aw_min 0.8 the player keeps at least this part of his speed
(1.0 = no penalty at all)
Commands
None.
Tested on
ReHLDS 3.15.0.896, ReGameDLL_CS 5.30.0.814, Metamod-r 1.3.0.149,
AMX Mod X 1.10.0-git5490, ReAPI 5.29.0.358.
Credits and licence
Written from scratch by alexit (olds.ro workshop) for workshop card
LIB-0084. Licence: GNU General Public License v3.0 or later
(GPL-3.0-or-later).