Quantcast
Viewing all articles
Browse latest Browse all 12856

[SDK] CvGlobals.cpp crash issue..maybe?

Code:

CvUnitInfo& CvGlobals::getUnitInfo(UnitTypes eUnitNum)
{
        FAssert(eUnitNum > -1);
        FAssert(eUnitNum < GC.getNumUnitInfos());
        return *(m_paUnitInfo[eUnitNum]);
}

Any body have any notions as to why this would:

1: be an assert fail

2: cause a CTD because it is an assert fail?

Before this I have this assert fail from supercheese Specialist enhancement code:
Code:

void CvCity::changeSpecialistUnhappiness(int iChange)
{
        if (iChange != 0)
        {
                m_iSpecialistUnhappiness += iChange;
                FAssert(getSpecialistUnhappiness() >= 0);

                AI_setAssignWorkDirty(true);

                if (getTeam() == GC.getGameINLINE().getActiveTeam())
                {
                        setInfoDirty(true);
                }
        }
}

If you would like any other files or code snippets just let me know, I am at a loss as to what is wrong or where the connections to an epic fail might be!

What is even more confusing is that it doesn't happen all the time... just some games..

Viewing all articles
Browse latest Browse all 12856

Trending Articles