Revision: 352
Author: TongShen.Martin
Date: Fri Oct 16 02:04:56 2009
Log: 0.308: 修正击败隐藏国籍船只导致永久封锁的Bug
0.308: fix: fix phantom blockading caused by defeating a hidden nationality
unit
http://code.google.com/p/sanguoforciv4/source/detail?r=352
Modified:
/trunk/The History of Three Kingdoms/CvGameCoreDLL/CvUnit.cpp
/trunk/The History of Three Kingdoms/Documents/changelog.txt
/trunk/The History of Three Kingdoms/Documents/changelog_en.txt
=======================================
--- /trunk/The History of Three Kingdoms/CvGameCoreDLL/CvUnit.cpp Thu Oct
15 05:02:19 2009
+++ /trunk/The History of Three Kingdoms/CvGameCoreDLL/CvUnit.cpp Fri Oct
16 02:04:56 2009
@@ -2455,7 +2455,12 @@
// pDefender->kill(false);
if (pDefender->getLegionHero() != NO_HERO)
{
+ bool bTempHiddenNationality = (isHiddenNationality()
&& !m_pUnitInfo->isHiddenNationality());
pDefender->doLegionMemberDefeated(this, false, true);
+ if (bTempHiddenNationality)
+ {
+ m_bTempCheck = true;
+ }
}
pDefender->kill(false, getOwnerINLINE());
FAssert (pDefender != NULL);
@@ -2511,7 +2516,12 @@
if (pDefender->getLegionHero() != NO_HERO)
{
+ bool bTempHiddenNationality = (pDefender->isHiddenNationality()
&& !pDefender->getUnitInfo().isHiddenNationality());
pDefender->doLegionMemberDefeated(this, false, false);
+ if (bTempHiddenNationality)
+ {
+ pDefender->setTempCheck(true);
+ }
}
pDefender->kill(false, getOwnerINLINE());
FAssert (pDefender != NULL);
@@ -6262,7 +6272,10 @@
{
for (int iTeam = 0; iTeam < MAX_TEAMS; ++iTeam)
{
- if (isEnemy((TeamTypes)iTeam))
+ // Sanguo Mod sea lord, start, by poyuzhe 10.15.09
+ // if (isEnemy((TeamTypes)iTeam))
+ if (isEnemy((TeamTypes)iTeam) || isTempCheck())
+ // Sanguo Mod sea lord, end
{
bValid = (iPathDist <= iBlockadeRange);
if( !bValid && (iChange == -1 &&
pLoopPlot->getBlockadedCount((TeamTypes)iTeam) > 0) )
@@ -6303,6 +6316,10 @@
/*************************************************************************************************/
/** BETTER_BTS_AI_MOD
END */
/*************************************************************************************************/
+
+ // Sanguo Mod sea lord, start, by poyuzhe 10.15.09
+ setTempCheck(false);
+ // Sanguo Mod sea lord, end
}
@@ -11473,7 +11490,12 @@
// Sanguo Mod Hero, start, added by poyuzhe 02.22.09
if (pLoopUnit->getLegionHero() != NO_HERO)
{
+ bool bTempHiddenNationality = (pLoopUnit->isHiddenNationality()
&& !pLoopUnit->getUnitInfo().isHiddenNationality());
pLoopUnit->doLegionMemberDefeated(this, false, false);
+ if (bTempHiddenNationality)
+ {
+ pLoopUnit->setTempCheck(true);
+ }
}
// Sanguo Mod Hero, end
=======================================
--- /trunk/The History of Three Kingdoms/Documents/changelog.txt Thu Oct 15
05:02:19 2009
+++ /trunk/The History of Three Kingdoms/Documents/changelog.txt Fri Oct 16
02:04:56 2009
@@ -1101,3 +1101,5 @@
ÐÞÕýCAR ModÖдò´íÁË×Öµ¼ÖµÄCTD
¹æÔòµ÷Õû£ºÓ¢ÐÛ¿ÉÒÔÔÚÈκεØÐÎÐÐ×ß
ÔÚÎÞ³ÇÊÐÕæÊµµØÍ¼¾çÇé³õʼÁìÐäÓ¢ÐÛ×Ô¶¯¼ÓÈëÊÆÁ¦
+
+0.308: ÐÞÕý»÷°ÜÒþ²Ø¹ú¼®´¬Ö»µ¼ÖÂÓÀ¾Ã·âËøµÄBug
=======================================
--- /trunk/The History of Three Kingdoms/Documents/changelog_en.txt Thu Oct
15 05:02:19 2009
+++ /trunk/The History of Three Kingdoms/Documents/changelog_en.txt Fri Oct
16 02:04:56 2009
@@ -1,3 +1,5 @@
+0.308: fix: fix phantom blockading caused by defeating a hidden
nationality unit
+
0.307: fix: fix the capture last city CTD bug once and for all
fix a type-induced CTD in CAR Mod
rule tweak: heroes can now walk all terrain