mirror of
https://github.com/1dot13/source.git
synced 2026-07-29 13:52:17 +02:00
Changed MOVEITEM dropoff gridno to a location that is always guaranteed to exist and be accessible
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6297 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -5885,8 +5885,12 @@ void HandleEquipmentMove( INT16 sMapX, INT16 sMapY, INT8 bZ )
|
||||
|
||||
// we loop over all mercs with this assignment in this sector, and then do a separate loop over each target sector
|
||||
std::map<UINT8, UINT8> sectormercmap; // this map uses the sectors we take stuff from as keys and the number of mercs as elements
|
||||
|
||||
// count any interrogators found here, and sum up their interrogation values
|
||||
|
||||
// we need a gridno to which we drop stuff
|
||||
INT32 sDropOffGridNo = gMapInformation.sCenterGridNo;
|
||||
if ( !GridNoOnVisibleWorldTile( sDropOffGridNo ) )
|
||||
sDropOffGridNo = RandomGridNo();
|
||||
|
||||
SOLDIERTYPE *pSoldier = NULL;
|
||||
UINT32 uiCnt = 0;
|
||||
UINT32 firstid = gTacticalStatus.Team[ OUR_TEAM ].bFirstID;
|
||||
@@ -5904,6 +5908,9 @@ void HandleEquipmentMove( INT16 sMapX, INT16 sMapY, INT8 bZ )
|
||||
sectormercmap[targetsector]++;
|
||||
else
|
||||
sectormercmap[targetsector] = 1;
|
||||
|
||||
if ( pSoldier->sGridNo != NOWHERE )
|
||||
sDropOffGridNo = pSoldier->sGridNo;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5915,10 +5922,6 @@ void HandleEquipmentMove( INT16 sMapX, INT16 sMapY, INT8 bZ )
|
||||
CHAR16 wSectorName[ 64 ];
|
||||
GetShortSectorString( sMapX, sMapY, wSectorName );
|
||||
|
||||
INT32 sDropOffGridNo = gMapInformation.sCenterGridNo;
|
||||
if ( !GridNoOnVisibleWorldTile( sDropOffGridNo ) )
|
||||
sDropOffGridNo = RandomGridNo();
|
||||
|
||||
WORLDITEM* pWorldItem_Target = NULL;
|
||||
|
||||
// now loop over all sectors from which we take stuff, and move the equipment
|
||||
|
||||
Reference in New Issue
Block a user