Bazaar developer reference

PUF_isOtherPlayer(const CvUnit *, int, int)

Defined in
CvGameCoreUtils.cpp, line 711
Hook name
CivHooks::PUF_isOtherPlayer

Hooks

static bool BeforePUF_isOtherPlayer(const CvUnit* pUnit, int iData1, int arg2, bool& result);static void AfterPUF_isOtherPlayer(const CvUnit* pUnit, int iData1, int arg2, bool& result);static bool ReplacePUF_isOtherPlayer(bool (*original)(const CvUnit*, int, int), const CvUnit* pUnit, int iData1, int arg2);CivRegisterBefore<CivHooks::PUF_isOtherPlayer>(host, &BeforePUF_isOtherPlayer);CivRegisterAfter<CivHooks::PUF_isOtherPlayer>(host, &AfterPUF_isOtherPlayer);CivRegisterReplace<CivHooks::PUF_isOtherPlayer>(host, &ReplacePUF_isOtherPlayer);

Code

711bool PUF_isOtherPlayer(const CvUnit* pUnit, int iData1, int)712{713	CvAssertMsg(iData1 != -1, "Invalid data argument, should be >= 0");714	return (pUnit->getOwner() != iData1);715}

Calls