MongooseSDK

I guess this answers the firaxis programmer's comment about whether to take this out!
:lol:

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.

EDIT

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)
 
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)

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.
 
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?
 
Top Bottom