mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
- 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:
@@ -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]) );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user