Skip to content

Commit

Permalink
2.8b
Browse files Browse the repository at this point in the history
- Stickers fix
  • Loading branch information
daffyyyy committed Oct 19, 2024
1 parent 7dffaee commit 8d8b2c3
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 11 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.8a
2.8b
17 changes: 8 additions & 9 deletions WeaponAction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,9 @@ private void GivePlayerWeaponSkin(CCSPlayerController player, CBasePlayerWeapon
return;

if (isKnife) return;

if (weaponInfo.Stickers.Count > 0) SetStickers(player, weapon);

if (weaponInfo.KeyChain != null) SetKeychain(player, weapon);
if (weaponInfo.Stickers.Count > 0) SetStickers(player, weapon);

UpdatePlayerWeaponMeshGroupMask(player, weapon, !newPaints.Contains(fallbackPaintKit));
}
Expand Down Expand Up @@ -145,15 +145,14 @@ private void SetStickers(CCSPlayerController? player, CBasePlayerWeapon weapon)
foreach (var sticker in weaponInfo.Stickers)
{
int stickerSlot = weaponInfo.Stickers.IndexOf(sticker);

CAttributeListSetOrAddAttributeValueByName.Invoke(weapon.AttributeManager.Item.NetworkedDynamicAttributes.Handle,
$"sticker slot {stickerSlot} id", ViewAsFloat(sticker.Id));
CAttributeListSetOrAddAttributeValueByName.Invoke(weapon.AttributeManager.Item.NetworkedDynamicAttributes.Handle,
$"sticker slot {stickerSlot} schema", sticker.Schema);
CAttributeListSetOrAddAttributeValueByName.Invoke(weapon.AttributeManager.Item.NetworkedDynamicAttributes.Handle,
$"sticker slot {stickerSlot} offset x", sticker.OffsetX);
CAttributeListSetOrAddAttributeValueByName.Invoke(weapon.AttributeManager.Item.NetworkedDynamicAttributes.Handle,
$"sticker slot {stickerSlot} offset y", sticker.OffsetY);
// CAttributeListSetOrAddAttributeValueByName.Invoke(weapon.AttributeManager.Item.NetworkedDynamicAttributes.Handle,
// $"sticker slot {stickerSlot} schema", stickerSlot);
// CAttributeListSetOrAddAttributeValueByName.Invoke(weapon.AttributeManager.Item.NetworkedDynamicAttributes.Handle,
// $"sticker slot {stickerSlot} offset x", sticker.OffsetX);
// CAttributeListSetOrAddAttributeValueByName.Invoke(weapon.AttributeManager.Item.NetworkedDynamicAttributes.Handle,
// $"sticker slot {stickerSlot} offset y", sticker.OffsetY);
CAttributeListSetOrAddAttributeValueByName.Invoke(weapon.AttributeManager.Item.NetworkedDynamicAttributes.Handle,
$"sticker slot {stickerSlot} wear", sticker.Wear);
CAttributeListSetOrAddAttributeValueByName.Invoke(weapon.AttributeManager.Item.NetworkedDynamicAttributes.Handle,
Expand Down
2 changes: 1 addition & 1 deletion WeaponPaints.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public partial class WeaponPaints : BasePlugin, IPluginConfig<WeaponPaintsConfig
public override string ModuleAuthor => "Nereziel & daffyy";
public override string ModuleDescription => "Skin, gloves, agents and knife selector, standalone and web-based";
public override string ModuleName => "WeaponPaints";
public override string ModuleVersion => "2.8a";
public override string ModuleVersion => "2.8b";

public override void Load(bool hotReload)
{
Expand Down

0 comments on commit 8d8b2c3

Please sign in to comment.