Skip to content

Raising the limits of map animations, currently there can be be only 2000. #22684

@ZehMatt

Description

@ZehMatt

Given the map size of 999x999 one could place a lot of animated things on the map, I think having only 2000 seems a bit underwhelming and its quite easy to hit this limit even with moderate sized maps. The limit should be raised and also improve the code as when an animation finishes it will erase it from the vector while iterating, it also iterates backwards to make erasing elements safe which isn't very cache friendly, the update and remove can be done with using remove_if.

As for the new limit, I'm not sure what an appropriate number would be, since the animations are also stored in vector we could consider just scrapping the limit since the structure is relatively small so there shouldn't be a big impact unless someone goes into the range of 100k+, this is something that we probably have to play around with and see how some extreme numbers perform.

Here is a save file that needs more than 2000, the save uses over 4000 (I don't remember the exact count but its somewhere near that) the console will also display errors that no more animations can be created.
Deurklink Imagination Megapark.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementAn improvement to an existing feature (no alteration).refactorA task that will improve code readability, without changing outcome.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions