mirror of
https://github.com/1dot13/source.git
synced 2026-07-29 13:52:17 +02:00
- Equip Milita Improvements: I've written code, which adds attachments to free positions on the gun militia chose to pick up (by navaroe)
- Bugfix: Reinforcements: Parts of roadblocks were resurrected after reinforcements death (by navaroe) git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7995 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -36,7 +36,7 @@ UINT32 guiMilitiaReinforceTurn = 0, guiMilitiaArrived = 0;//dnl ch68 090913
|
||||
void GetNumberOfEnemiesInFiveSectors( INT16 sSectorX, INT16 sSectorY, UINT8 *pubNumAdmins, UINT8 *pubNumTroops, UINT8 *pubNumElites, UINT8 *pubNumTanks )
|
||||
{
|
||||
UINT8 ubNumAdmins, ubNumTroops, ubNumElites, ubNumTanks;
|
||||
UINT16 pusMoveDir[4][3];
|
||||
UINT16 pusMoveDir[4][3]; //first column in this matrix is number of sector, except for 4th row
|
||||
UINT8 ubDirNumber, ubIndex;
|
||||
|
||||
GetNumberOfStationaryEnemiesInSector( sSectorX, sSectorY, pubNumAdmins, pubNumTroops, pubNumElites, pubNumTanks );
|
||||
@@ -57,10 +57,10 @@ void GetNumberOfEnemiesInFiveSectors( INT16 sSectorX, INT16 sSectorY, UINT8 *pub
|
||||
GenerateDirectionInfos( sSectorX, sSectorY, &ubDirNumber, pusMoveDir, FALSE, TRUE );
|
||||
|
||||
for( ubIndex = 0; ubIndex < ubDirNumber; ubIndex++ )
|
||||
{
|
||||
{ //take number of the involved sector, find its X and Y coordintes and then ask for number of troops there
|
||||
GetNumberOfStationaryEnemiesInSector( SECTORX( pusMoveDir[ ubIndex ][ 0 ] ), SECTORY( pusMoveDir[ ubIndex ][ 0 ] ), &ubNumAdmins, &ubNumTroops, &ubNumElites, &ubNumTanks );
|
||||
|
||||
while( ubNumElites + ubNumTroops + ubNumAdmins + ubNumTanks > gubReinforcementMinEnemyStaticGroupSize)
|
||||
while( ubNumElites + ubNumTroops + ubNumAdmins + ubNumTanks > gubReinforcementMinEnemyStaticGroupSize) //count how many of static group will reinforce the battle, but leave minimal group size to guard
|
||||
{
|
||||
if( ubNumElites )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user