Giter Site home page Giter Site logo

Comments (6)

timfel avatar timfel commented on May 24, 2024

(by iddqd-mail)
Check, if this was fixed in rev.8959

from stratagus.

timfel avatar timfel commented on May 24, 2024

(by andre-ng)
I tried out the fix, but unfortunately it seems that it didn't work :( I tried putting archers (range 4) in a garrisonable building of 4x4 tile size, and they could still only attack units to the south of the building that were adjacent to the building (meaning that the range is being counted without taking into account the building's larger tile size).

from stratagus.

timfel avatar timfel commented on May 24, 2024

(by iddqd-mail)
Another fix in rev.8961, check, if that bug has been fixed.

from stratagus.

timfel avatar timfel commented on May 24, 2024

(by andre-ng)
cybermind, thanks for your attention in trying to fix this bug. I tested the fix in revision 8961, and unfortunately it did not solve the issue. Everything happens exactly the same as before.

from stratagus.

timfel avatar timfel commented on May 24, 2024

(by iddqd-mail)
Could you upload a test map or something to show this bug?

from stratagus.

timfel avatar timfel commented on May 24, 2024

(by andre-ng)
I managed to pinpoint the reason for the bug. It was in the function MapDistanceTo(const CUnit &dst) in unit.h. Here is a fixed version of the function:

int MapDistanceTo(const CUnit &dst) const
{
    const CUnitType *distance_unit_type = Container ? Container->Type : Type;
    return MapDistanceBetweenTypes(*distance_unit_type, tilePos, *dst.Type, dst.tilePos);
}

I have tested it and can confirm this fix works.

from stratagus.

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.