- Fix for fade skins (same seed if 0 by default)
This commit is contained in:
Dawid Bepierszcz
2024-10-20 15:35:20 +02:00
parent 7d4078dc40
commit 686c225f4f
6 changed files with 21 additions and 15 deletions

View File

@@ -44,7 +44,7 @@ namespace WeaponPaints
UpdatePlayerEconItemId(weapon.AttributeManager.Item);
int weaponDefIndex = weapon.AttributeManager.Item.ItemDefinitionIndex;
int fallbackPaintKit = 0;
int fallbackPaintKit;
weapon.AttributeManager.Item.AccountID = (uint)player.SteamID;
@@ -98,7 +98,16 @@ namespace WeaponPaints
weapon.AttributeManager.Item.ItemIDHigh = weapon.AttributeManager.Item.ItemIDLow >> 32;
weapon.AttributeManager.Item.CustomName = weaponInfo.Nametag;
weapon.FallbackPaintKit = weaponInfo.Paint;
weapon.FallbackSeed = weaponInfo.Seed;
if (weaponInfo is { Paint: 38, Seed: 0 })
{
weapon.FallbackSeed = _fadeSeed++;
}
else
{
weapon.FallbackSeed = weaponInfo.Seed;
}
weapon.FallbackWear = weaponInfo.Wear;
CAttributeListSetOrAddAttributeValueByName.Invoke(weapon.AttributeManager.Item.NetworkedDynamicAttributes.Handle, "set item texture prefab", weapon.FallbackPaintKit);