Bazaar developer reference

CvPlot::updateRevealedOwner(TeamTypes)

Defined in
CvPlot.cpp, line 8955
Class
CvPlot
Hook name
CivHooks::CvPlot_updateRevealedOwner

Hooks

static bool BeforeCvPlot_updateRevealedOwner(CvPlot* self, TeamTypes eTeam);static void AfterCvPlot_updateRevealedOwner(CvPlot* self, TeamTypes eTeam);static void ReplaceCvPlot_updateRevealedOwner(void (*original)(CvPlot*, TeamTypes), CvPlot* self, TeamTypes eTeam);CivRegisterBefore<CivHooks::CvPlot_updateRevealedOwner>(host, &BeforeCvPlot_updateRevealedOwner);CivRegisterAfter<CivHooks::CvPlot_updateRevealedOwner>(host, &AfterCvPlot_updateRevealedOwner);CivRegisterReplace<CivHooks::CvPlot_updateRevealedOwner>(host, &ReplaceCvPlot_updateRevealedOwner);

Code

8955void CvPlot::updateRevealedOwner(TeamTypes eTeam)8956{8957	CvPlot* pAdjacentPlot;8958	bool bRevealed;8959	int iI;89608961	CvAssertMsg(eTeam >= 0, "eTeam is expected to be non-negative (invalid Index)");8962	CvAssertMsg(eTeam < MAX_TEAMS, "eTeam is expected to be within maximum bounds (invalid Index)");89638964	bRevealed = false;89658966	if(!bRevealed)8967	{8968		if(isVisible(eTeam))8969		{8970			bRevealed = true;8971		}8972	}89738974	if(!bRevealed)8975	{8976		for(iI = 0; iI < NUM_DIRECTION_TYPES; ++iI)8977		{8978			pAdjacentPlot = plotDirection(getX(), getY(), ((DirectionTypes)iI));89798980			if(pAdjacentPlot != NULL)8981			{8982				if(pAdjacentPlot->isVisible(eTeam))8983				{8984					bRevealed = true;8985					break;8986				}8987			}8988		}8989	}89908991	setRevealedOwner(eTeam, ((bRevealed) ? getOwner() : NO_PLAYER));8992}

Calls

Called by