1. Civ6 is coming out TODAY! Order now! (Amazon US | Amazon UK | Amazon CA | Amazon DE | Amazon FR)
    Dismiss Notice
  2. Main site is finally re-opened! We migrated it to a new CMS and gave it a new layout as well.
    Dismiss Notice
  3. Forum account upgrades are available for ad-free browsing.
    Dismiss Notice
  4. Downloads database has been migrated and re-opened! Check it out and post in Site Feedback if any issue. We have done URL re-write so that old links will continue to work.
    Dismiss Notice
  5. A new Civ6 theme forum style is now available and it's made the default forum style! Check it out and comment here.
    Dismiss Notice
  6. We have successfully migrated the forum from vBulletin to Xenforo! Please take a look around and report any issue you see in Site Feedback.
    Dismiss Notice


Discussion in 'Civ4 - Mod Components' started by LunarMongoose, Jun 23, 2009.

  1. PieceOfMind

    PieceOfMind Drill IV Defender Retired Moderator

    Jan 15, 2006

    Thanks jdog, that was quick! I'm glad it wasn't something I did, because I was wracking my brain trying to work out how my change could cause the observed behaviour.


    A question for LunarMongoose.

    Could you perhaps let me know how you fixed it? As I said before, for me this was tinkering in unfamiliar territory so I have no idea how frequently the function is called and so whether I need to try and cut down on (possibly?) expensive functions and repeated calculations.

    Besides, your fix might be more elegant and i wouldn't have to have it commented so weirdly as a fix by me for PIG Mod but from mongoosesdk. :)

    By the way, I also don't like how I reassigned iMinAreaSize but I wondered whether it was necessary to create a new variable or not? (or whether I should)
  2. LunarMongoose

    LunarMongoose New Member

    Jan 29, 2006
    Boston, MA, USA
    I used your code as-was. I don't know how frequently isCoastalLand() is called either, but it doesn't matter; that's where the change has to go, and your change is what it has to be to work right. Nothing about the GC calls is particularly expensive, and there's not a lot of math, so I'm not very worried about it. It's something that could conceivably be added to the CAR cache system, but that would break the save files of the test game I'm currently playing so I don't want to bother. :)

    The double comment was more-or-less fine it just didn't match my format exactly. And the argument reassignment will work in all cases where it's not a pointer that's being passed. Normally structs and custom types like vectors are not passed directly, though they can be, so usually you can look at whether it's a primitive like int to see if it'll work, but regardless it's not a particularly good practice stylistically, no.

    Also... I found the problem with my Sandworm code. Woot.
  3. migck

    migck Señor de la guerra

    Apr 6, 2009
    Sorry to bump this after more than two years, but I am baffled at the usefulness of these changes and wanted to thank you for them.

    I was wondering, is it still OK to pull code from here for other projects, or is it better to use the code from your MongooseMod?
  4. keldath

    keldath LivE LonG AnD PrOsPeR

    Dec 20, 2005
    migck ,

    hi, i wish mongoose would update the sdk for release - he created version 4 for his great mod, but he wont release the sdk unfortunatly :(

    gluck friend.
  5. Cruel

    Cruel New Member

    Jun 22, 2005
    São Paulo, Brazil
    Download not working...

Share This Page