Skip to content

/forcedrop only drops about half the items when there are multiple of said item. #1

@PhaserArray

Description

@PhaserArray

As an example, give yourself 10 scrap metal and force drop it, only 5 will be dropped.

I believe there's a simple fix to it. Do not iterate over the indices in a page front to back as you are removing items from the list and the indexes will change. Instead, iterate over the items in reverse with for (byte index = count - 1; index >= 0 ; index--) instead of the current for (byte index = 0; index < count; index++).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions