mirror of
https://github.com/Nereziel/cs2-WeaponPaints.git
synced 2026-02-25 12:52:17 +00:00
2.3b
- Fixed agent team bug - Minor changes
This commit is contained in:
@@ -99,12 +99,13 @@ namespace WeaponPaints
|
||||
int clip1 = weapon.Value.Clip1;
|
||||
int reservedAmmo = weapon.Value.ReserveAmmo[0];
|
||||
|
||||
if (!weaponsWithAmmo.ContainsKey(weaponByDefindex))
|
||||
if (!weaponsWithAmmo.TryGetValue(weaponByDefindex, out List<(int, int)>? value))
|
||||
{
|
||||
weaponsWithAmmo.Add(weaponByDefindex, new List<(int, int)>());
|
||||
value = new List<(int, int)>();
|
||||
weaponsWithAmmo.Add(weaponByDefindex, value);
|
||||
}
|
||||
|
||||
weaponsWithAmmo[weaponByDefindex].Add((clip1, reservedAmmo));
|
||||
value.Add((clip1, reservedAmmo));
|
||||
|
||||
if (gun == null || gun.VData == null) return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user