CvPlot::isVisibleToWatchingHuman() const
- Defined in
- CvPlot.cpp, line 3565
- Class
- CvPlot
- Hook name
CivHooks::CvPlot_isVisibleToWatchingHuman
Hooks
static bool BeforeCvPlot_isVisibleToWatchingHuman(const CvPlot* self, bool& result);static void AfterCvPlot_isVisibleToWatchingHuman(const CvPlot* self, bool& result);static bool ReplaceCvPlot_isVisibleToWatchingHuman(bool (*original)(const CvPlot*), const CvPlot* self);CivRegisterBefore<CivHooks::CvPlot_isVisibleToWatchingHuman>(host, &BeforeCvPlot_isVisibleToWatchingHuman);CivRegisterAfter<CivHooks::CvPlot_isVisibleToWatchingHuman>(host, &AfterCvPlot_isVisibleToWatchingHuman);CivRegisterReplace<CivHooks::CvPlot_isVisibleToWatchingHuman>(host, &ReplaceCvPlot_isVisibleToWatchingHuman);
Code
3565bool CvPlot::isVisibleToWatchingHuman() const3566{3567 int iI;35683569 for(iI = 0; iI < MAX_CIV_PLAYERS; ++iI)3570 {3571 CvPlayerAI& thisPlayer = GET_PLAYER((PlayerTypes)iI);3572 if( (thisPlayer.isAlive() && thisPlayer.isHuman()) || ( CvPreGame::slotStatus((PlayerTypes)iI) == SS_OBSERVER && CvPreGame::slotClaim((PlayerTypes)iI) == SLOTCLAIM_ASSIGNED) )3573 {3574 if(isVisible(thisPlayer.getTeam()))3575 {3576 return true;3577 }3578 }3579 }35803581 return false;3582}
Calls
Called by
- CvPlayer::receiveGoody(CvPlot *, GoodyTypes, CvUnit *)
- CvUnit::jumpToNearestValidPlotWithinRange(int)
- CvUnit::move(CvPlot &, bool)
- CvUnit::rebase(int, int)
- CvUnit::setXY(int, int, bool, bool, bool, bool, bool)
- CvUnitMission::ContinueMission(UnitHandle, int, int)
- CvUnitMission::StartMission(UnitHandle)
- CvLuaPlot::lIsVisibleToWatchingHuman(lua_State *)