mirror of
https://github.com/1dot13/source.git
synced 2026-08-12 14:10:23 +02:00
BUG 551: Items auto placed into world inventory might accidentally be dropped into the wrong sector. Now, when you're on the map screen, the sector inventory panel is closed, and you try to drop something into the world, sector inventory should automatically open so that items can be placed directly to the sector panel.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@4571 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
+12
-5
@@ -5377,10 +5377,11 @@ void EjectAmmoAndPlace(SOLDIERTYPE* pSoldier, OBJECTTYPE* pObj, UINT8 subObject)
|
||||
(*pObj)[subObject]->data.gun.ubGunAmmoType = NONE;
|
||||
if ( pSoldier )
|
||||
{
|
||||
if ( !AutoPlaceObject( pSoldier, &gTempObject, FALSE ) )
|
||||
{ // put it on the ground
|
||||
AddItemToPool( pSoldier->sGridNo, &gTempObject, 1, pSoldier->pathing.bLevel, 0 , -1 );
|
||||
}
|
||||
AutoPlaceObjectAnywhere( pSoldier, &gTempObject, FALSE );
|
||||
// if ( !AutoPlaceObject( pSoldier, &gTempObject, FALSE ) )
|
||||
// { // put it on the ground
|
||||
// AddItemToPool( pSoldier->sGridNo, &gTempObject, 1, pSoldier->pathing.bLevel, 0 , -1 );
|
||||
// }
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -6282,6 +6283,7 @@ BOOLEAN AutoPlaceObjectAnywhere(SOLDIERTYPE * pSoldier, OBJECTTYPE * pObj, BOOLE
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
extern void CreateDestroyMapInventoryPoolButtons( BOOLEAN fExitFromMapScreen );
|
||||
BOOLEAN AutoPlaceObjectToWorld(SOLDIERTYPE * pSoldier, OBJECTTYPE * pObj, INT8 bVisible)
|
||||
{
|
||||
if(pObj->exists() == false)
|
||||
@@ -6290,8 +6292,13 @@ BOOLEAN AutoPlaceObjectToWorld(SOLDIERTYPE * pSoldier, OBJECTTYPE * pObj, INT8 b
|
||||
INT32 sGridNo = pSoldier?pSoldier->sGridNo:0;
|
||||
INT8 bLevel = pSoldier?pSoldier->pathing.bLevel:0;
|
||||
|
||||
if( guiCurrentScreen == MAP_SCREEN && fShowMapInventoryPool )
|
||||
if( guiCurrentScreen == MAP_SCREEN )
|
||||
{
|
||||
if(!fShowMapInventoryPool)
|
||||
{
|
||||
fShowMapInventoryPool = TRUE;
|
||||
CreateDestroyMapInventoryPoolButtons(FALSE);
|
||||
}
|
||||
fMapPanelDirty = TRUE;
|
||||
return( AutoPlaceObjectInInventoryStash(pObj, sGridNo) );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user