1. We have added the ability to collapse/expand forum categories and widgets on forum home.
    Dismiss Notice
  2. Photobucket has changed its policy concerning hotlinking images and now requires an account with a $399.00 annual fee to allow hotlink. More information is available at: this link.
    Dismiss Notice
  3. All Civ avatars are brought back and available for selection in the Avatar Gallery! There are 945 avatars total.
    Dismiss Notice
  4. To make the site more secure, we have installed SSL certificates and enabled HTTPS for both the main site and forums.
    Dismiss Notice
  5. Civ6 is released! Order now! (Amazon US | Amazon UK | Amazon CA | Amazon DE | Amazon FR)
    Dismiss Notice
  6. Dismiss Notice
  7. Forum account upgrades are available for ad-free browsing.
    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 Chieftain

    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 Chieftain

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

Share This Page