- Fix: missing individual profiles for militia arriving in currently loaded sector

- reduce number of warnings if no individual militia profiles are found

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8558 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Flugente
2018-04-19 19:23:08 +00:00
parent 150b05e0b5
commit 9e71b31a30
2 changed files with 65 additions and 12 deletions
+7
View File
@@ -2288,8 +2288,15 @@ void GroupArrivedAtSector( UINT8 ubGroupID, BOOLEAN fCheckForBattle, BOOLEAN fNe
{
// if they arrive in the sector we have currently loaded, let them join from the edge
// this will always remove them from the group - if you want them to continue moving, issue a new order
// RunAwayScientist fix on 4/10/2018: The below condition needs to have the other functions applied (MoveMilitiaEquipment, MoveMilitiaProfiles, reset)
// because the other if-else sections do NOT trigger if milita move into currently loaded sector.
// This should be done before dissolving the group.
// Currently only MoveMilitiaProfiles is needed, equipment is moved without being called from another func.
if ( pGroup->ubSectorX == gWorldSectorX && pGroup->ubSectorY == gWorldSectorY && pGroup->ubSectorZ == gbWorldSectorZ )
{
// Flugente: move along individual militia data
MoveIndividualMilitiaProfiles( SECTOR( pGroup->ubPrevX, pGroup->ubPrevY ), SECTOR( pGroup->ubSectorX, pGroup->ubSectorY ), pGroup->pEnemyGroup->ubNumAdmins, pGroup->pEnemyGroup->ubNumTroops, pGroup->pEnemyGroup->ubNumElites );
MilitiaGroupEntersCurrentSector( pGroup->ubGroupID, pGroup->ubSectorX, pGroup->ubSectorY );
if ( !fBattlePending && GroupAtFinalDestination( pGroup ) )