mirror of
https://github.com/1dot13/source.git
synced 2026-09-02 14:36:06 +02:00
Merged revision(s) 7052 from branches/ja2_source_official_2014:
- Fix: Assertion if groupsize exceeds garrison size - Fix: mobile militia never decides to move git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7053 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -1583,6 +1583,9 @@ void UpdateMilitiaSquads(INT16 sMapX, INT16 sMapY )
|
|||||||
|
|
||||||
//ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, L"Roll %ld", iRandomRes);
|
//ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, L"Roll %ld", iRandomRes);
|
||||||
|
|
||||||
|
// Flugente: as I once broke this, allow me to explain this part. We've determined the 'urge' to move to an adjacent sector.
|
||||||
|
// We now see wether an adjacent sector is a worthy target to move to. If we do not find a vali target, we stop the movement function
|
||||||
|
|
||||||
iRandomRes = 256;
|
iRandomRes = 256;
|
||||||
|
|
||||||
for( x = 0; x < uiDirNumber; ++x)
|
for( x = 0; x < uiDirNumber; ++x)
|
||||||
@@ -1592,6 +1595,7 @@ void UpdateMilitiaSquads(INT16 sMapX, INT16 sMapY )
|
|||||||
iRandomRes = x;
|
iRandomRes = x;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// "Decided" to stay here
|
// "Decided" to stay here
|
||||||
if(iRandomRes >= uiDirNumber)
|
if(iRandomRes >= uiDirNumber)
|
||||||
@@ -1658,7 +1662,6 @@ void UpdateMilitiaSquads(INT16 sMapX, INT16 sMapY )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// Kaiden: Roaming Militia Training:
|
// Kaiden: Roaming Militia Training:
|
||||||
// If we're training roaming militia,
|
// If we're training roaming militia,
|
||||||
|
|||||||
@@ -3062,7 +3062,7 @@ void SendReinforcementsForGarrison( INT32 iDstGarrisonID, UINT16 usDefencePoints
|
|||||||
//Send the lowest of the two: number requested or number available
|
//Send the lowest of the two: number requested or number available
|
||||||
|
|
||||||
iReinforcementsApproved = min( iReinforcementsRequested, iReinforcementsAvailable );
|
iReinforcementsApproved = min( iReinforcementsRequested, iReinforcementsAvailable );
|
||||||
if( iReinforcementsApproved < iMaxReinforcementsAllowed - ubNumExtraReinforcements )
|
if( iReinforcementsApproved > iMaxReinforcementsAllowed - ubNumExtraReinforcements )
|
||||||
{
|
{
|
||||||
//The force isn't strong enough, but the queen isn't willing to apply extra resources
|
//The force isn't strong enough, but the queen isn't willing to apply extra resources
|
||||||
iReinforcementsApproved = iMaxReinforcementsAllowed - ubNumExtraReinforcements;
|
iReinforcementsApproved = iMaxReinforcementsAllowed - ubNumExtraReinforcements;
|
||||||
|
|||||||
Reference in New Issue
Block a user