CvUnit::ShowMoves() const
- Defined in
- CvUnit.cpp, line 22530
- Class
- CvUnit
- Hook name
CivHooks::CvUnit_ShowMoves
Hooks
static bool BeforeCvUnit_ShowMoves(const CvUnit* self, bool& result);static void AfterCvUnit_ShowMoves(const CvUnit* self, bool& result);static bool ReplaceCvUnit_ShowMoves(bool (*original)(const CvUnit*), const CvUnit* self);CivRegisterBefore<CivHooks::CvUnit_ShowMoves>(host, &BeforeCvUnit_ShowMoves);CivRegisterAfter<CivHooks::CvUnit_ShowMoves>(host, &AfterCvUnit_ShowMoves);CivRegisterReplace<CivHooks::CvUnit_ShowMoves>(host, &ReplaceCvUnit_ShowMoves);
Code
22530bool CvUnit::ShowMoves() const22531{22532 VALIDATE_OBJECT22533 if(CvPreGame::quickMovement())22534 {22535 return false;22536 }2253722538 for(int iI = 0; iI < MAX_CIV_PLAYERS; iI++)22539 {22540 CvPlayer& kLoopPlayer = GET_PLAYER((PlayerTypes)iI);22541 if(kLoopPlayer.isAlive())22542 {22543 if(kLoopPlayer.isHuman())22544 {22545 if(isEnemy(kLoopPlayer.getTeam()))22546 {22547 return false;22548 }22549 else22550 {22551 return false;22552 }22553 }22554 }22555 }2255622557 return false;22558}