Bazaar developer reference

CvUnit::doDelayedDeath()

Defined in
CvUnit.cpp, line 19588
Class
CvUnit
Hook name
CivHooks::CvUnit_doDelayedDeath

Hooks

static bool BeforeCvUnit_doDelayedDeath(CvUnit* self, bool& result);static void AfterCvUnit_doDelayedDeath(CvUnit* self, bool& result);static bool ReplaceCvUnit_doDelayedDeath(bool (*original)(CvUnit*), CvUnit* self);CivRegisterBefore<CivHooks::CvUnit_doDelayedDeath>(host, &BeforeCvUnit_doDelayedDeath);CivRegisterAfter<CivHooks::CvUnit_doDelayedDeath>(host, &AfterCvUnit_doDelayedDeath);CivRegisterReplace<CivHooks::CvUnit_doDelayedDeath>(host, &ReplaceCvUnit_doDelayedDeath);

Code

19587// Returns true if killed...19588bool CvUnit::doDelayedDeath()19589{19590	VALIDATE_OBJECT19591	if(m_bDeathDelay && !isFighting() && !IsBusy())19592	{19593		kill(false);19594		return true;19595	}1959619597	return false;19598}

Calls

Called by