Skip to content

Commit 99e22ef

Browse files
authored
Add default clip attribute + Fix MP5 default clip (#1026)
* l4d2_weapon_attributes: Add default clip sm_weapon <weapon> defclip # * Sync MP5 default clip size * Sync sniper default clips in EQ
1 parent 249149c commit 99e22ef

3 files changed

Lines changed: 8 additions & 2 deletions

File tree

‎addons/sourcemod/scripting/l4d2_weapon_attributes.sp‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ static const L4D2IntWeaponAttributes iIntWeaponAttributes[] =
5656
L4D2IWA_Damage,
5757
L4D2IWA_Bullets,
5858
L4D2IWA_ClipSize,
59+
L4D2IWA_DefaultSize,
5960
L4D2IWA_Bucket,
6061
L4D2IWA_Tier, // L4D2 only
6162
};
@@ -90,6 +91,7 @@ static const char sWeaponAttrNames[PLUGIN_WEAPON_MAX_ATTRS][MAX_ATTRS_NAME_LENGT
9091
"Damage",
9192
"Bullets",
9293
"Clip Size",
94+
"Default Clip",
9395
"Bucket",
9496
"Tier",
9597
"Max player speed",
@@ -123,6 +125,7 @@ static const char sWeaponAttrShortName[PLUGIN_WEAPON_MAX_ATTRS][MAX_ATTRS_NAME_L
123125
"damage",
124126
"bullets",
125127
"clipsize",
128+
"defclip",
126129
"bucket",
127130
"tier",
128131
"speed",
@@ -214,7 +217,7 @@ public Plugin myinfo =
214217
{
215218
name = "L4D2 Weapon Attributes",
216219
author = "Jahze, A1m`, Forgetest",
217-
version = "3.1.0",
220+
version = "3.1.1",
218221
description = "Allowing tweaking of the attributes of all weapons"
219222
};
220223

@@ -679,7 +682,7 @@ void SetWeaponAttributeInt(const char[] sWeaponName, int iAtrriIndex, int iSetVa
679682
}
680683

681684
L4D2_SetIntWeaponAttribute(sWeaponName, iIntWeaponAttributes[iAtrriIndex], iSetValue);
682-
685+
683686
value.curVal = iSetValue;
684687
hDefaultWeaponAttributes[iAtrriIndex].SetArray(sWeaponName, value, sizeof(value), true);
685688

‎cfg/cfgogl/eq/shared_settings.cfg‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,9 +223,11 @@ l4d2_addweaponrule sniper_military sniper_awp
223223

224224
// [l4d_weapon_attributes.smx]
225225
sm_weapon sniper_scout clipsize 10
226+
sm_weapon sniper_scout defclip 10
226227
sm_weapon sniper_scout damage 125
227228
sm_weapon sniper_scout tankdamagemult 1.2
228229
sm_weapon sniper_awp clipsize 10
230+
sm_weapon sniper_awp defclip 10
229231
sm_weapon sniper_awp damage 145
230232
sm_weapon sniper_awp tankdamagemult 1.2414
231233

‎cfg/cfgogl/zonemod/shared_settings.cfg‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -325,6 +325,7 @@ sm_weapon smg_mp5 rangemod 0.80
325325
sm_weapon smg_mp5 maxmovespread 2.35
326326
sm_weapon smg_mp5 reloadduration 2.7
327327
sm_weapon smg_mp5 clipsize 60
328+
sm_weapon smg_mp5 defclip 60
328329

329330
////////////////////////////////
330331
// [Pistol Tweaks 'n Stuff] //

0 commit comments

Comments
 (0)