Maniac
Apolyton Sage
I've added a little piece of code to CvUnit::canMoveInto :
When I add a global define, and use it, the game crashes after a couple turns:
However when I hardcode the promotion which the global define points to into the SDK, the game works fine:
Hardcoding stuff in the SDK is of course not desirable, so I'm wondering... what's the problem with using a global define? How can I use this global define in this piece of code?
When I add a global define, and use it, the game crashes after a couple turns:
Code:
if (isBarbarian() && !(isHasPromotion((PromotionTypes)GC.getDefineINT("PROMOTION_NATIVES_CAN_MOVE_IN_CULTURE"))))
{
if (pPlot->isOwned())
{
return false;
}
}
However when I hardcode the promotion which the global define points to into the SDK, the game works fine:
Code:
if (isBarbarian() && !(isHasPromotion((PromotionTypes)GC.getInfoTypeForString("PROMOTION_NATIVES_CAN_MOVE_IN_CULTURE"))))
{
if (pPlot->isOwned())
{
return false;
}
}
Hardcoding stuff in the SDK is of course not desirable, so I'm wondering... what's the problem with using a global define? How can I use this global define in this piece of code?