Giter Site home page Giter Site logo

Comments (2)

Metadorius avatar Metadorius commented on June 10, 2024

The proposed solution is to make a shallow copy of the array before iteration and iterate on it instead.

from phobos.

Starkku avatar Starkku commented on June 10, 2024

Should be fixed in ed3b785. It now iterates on a copy of the array instead of the original.

This is not normally an issue because things like objects dying as result of damage and being logically deleted from the game etc. happen 1 frame after they're hit by the fatal damage, by which point this code is done iterating through them anyways. Advanced rubble (and probably rubble in general) is however created immediately after the building has been taken fatal damage which causes the arrays to change mid-iteration here. Another case I think that is probably the same are passengers of Explodes=true transport. It might be possible that there are other edge-cases that could cause potentially eligible targets to expire before they are iterated over, even if it is a copy of array but difficult to say for sure.

from phobos.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.