Skip to content

Commit

Permalink
Fix cutting off 4th and 5th sticker
Browse files Browse the repository at this point in the history
  • Loading branch information
MarvinKlein1508 committed Mar 22, 2024
1 parent ce4f502 commit 840109f
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions CSGencodes.Core/Models/Weapon.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public string GetGencode(decimal @float, int pattern, List<AppliedSticker> stick
StringBuilder sb = new();
sb.Append($"!gen {weapon_id} {gen_id} {pattern} {@float.ToString("0.00000000000000", CultureInfo.InvariantCulture)}");

int max_size = stickers.Count > StickerSlotsAmount ? StickerSlotsAmount : stickers.Count;


var sortedStickers = stickers.OrderBy(x => x.PosId).ToList();

Expand All @@ -59,10 +59,6 @@ public string GetGencode(decimal @float, int pattern, List<AppliedSticker> stick
int currentPos = 0;
foreach (var sticker in sortedStickers)
{
if (StickerSlotsAmount < (currentPos + 1))
{
break;
}

while (sticker.PosId != (currentPos - addedStickers))
{
Expand Down

0 comments on commit 840109f

Please sign in to comment.