- new function: militia can be ordered to pick up gear from sector in tactical, just like ordering them to drop it. does not work in combat for obvious reason.

- if militia stand in water and are ordered to drop their equipment, they will drop it on land.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6263 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Flugente
2013-07-31 18:59:32 +00:00
parent 64f7d6e616
commit 71274fdf55
14 changed files with 152 additions and 61 deletions
+7 -4
View File
@@ -15903,6 +15903,13 @@ void SOLDIERTYPE::DropSectorEquipment()
OBJECTTYPE* pObj = NULL;
UINT8 size = this->inv.size();
INT32 sPutGridNo = this->sGridNo;
if ( sPutGridNo == NOWHERE )
sPutGridNo = RandomGridNo();
if ( Water( sPutGridNo) )
sPutGridNo = gMapInformation.sCenterGridNo;
if ( ( this->sSectorX == gWorldSectorX ) && ( this->sSectorY == gWorldSectorY ) && ( this->bSectorZ == gbWorldSectorZ) )
{
for ( UINT8 cnt = 0; cnt < size; ++cnt )
@@ -15920,10 +15927,6 @@ void SOLDIERTYPE::DropSectorEquipment()
if ( !gGameExternalOptions.fMilitiaUseSectorInventory_Ammo && Item[ pObj->usItem ].usItemClass & IC_GUN )
(*pObj)[0]->data.gun.ubGunShotsLeft = 0;
INT32 sPutGridNo = this->sGridNo;
if ( sPutGridNo == NOWHERE )
sPutGridNo = RandomGridNo();
AddItemToPool( sPutGridNo, pObj, 1 , this->pathing.bLevel, (WOLRD_ITEM_FIND_SWEETSPOT_FROM_GRIDNO|WORLD_ITEM_REACHABLE), -1 );
DeleteObj( &(this->inv[cnt]) );
}