bts300- bool CvUnit::canParadropAt(const CvPlot* pPlot, int iX, int iY) const
- {
- if (!canParadrop(pPlot))
- {
- return false;
- }
- CvPlot* pTargetPlot = GC.getMapINLINE().plotINLINE(iX, iY);
- if (NULL == pTargetPlot || pTargetPlot == pPlot)
- {
- return false;
- }
- if (!pTargetPlot->isVisible(getTeam(), false))
- {
- return false;
- }
- if (!canMoveInto(pTargetPlot))
- {
- return false;
- }
- if (plotDistance(pPlot->getX_INLINE(), pPlot->getY_INLINE(), iX, iY) > getDropRange())
- {
- return false;
- }
- return true;
- }
复制代码
bts319
- bool CvUnit::canParadropAt(const CvPlot* pPlot, int iX, int iY) const
- {
- if (!canParadrop(pPlot))
- {
- return false;
- }
- CvPlot* pTargetPlot = GC.getMapINLINE().plotINLINE(iX, iY);
- if (NULL == pTargetPlot || pTargetPlot == pPlot)
- {
- return false;
- }
- if (!pTargetPlot->isVisible(getTeam(), false))
- {
- return false;
- }
- if (!canMoveInto(pTargetPlot, false, false, true))
- {
- return false;
- }
- if (plotDistance(pPlot->getX_INLINE(), pPlot->getY_INLINE(), iX, iY) > getDropRange())
- {
- return false;
- }
- if (!canCoexistWithEnemyUnit(NO_TEAM))
- {
- if (pTargetPlot->isEnemyCity(*this))
- {
- return false;
- }
- if (pTargetPlot->isVisibleEnemyUnit(this))
- {
- return false;
- }
- }
- return true;
- }
复制代码
区别很明显. |