mirror of
https://github.com/1dot13/source.git
synced 2026-09-09 14:46:05 +02:00
Fix: one could remove Nails' jacekt via [Ctrl] + [W] in strategic inventory
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8288 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
+43
-41
@@ -7646,6 +7646,7 @@ void GetMapKeyboardInput( UINT32 *puiNewEvent )
|
|||||||
//CHRISL: Try to update InSector value so we don't have to "activate" a sector
|
//CHRISL: Try to update InSector value so we don't have to "activate" a sector
|
||||||
if(pSoldier->sSectorX == sSelMapX && pSoldier->sSectorY == sSelMapY && pSoldier->bSectorZ == iCurrentMapSectorZ && !pSoldier->flags.fBetweenSectors)
|
if(pSoldier->sSectorX == sSelMapX && pSoldier->sSectorY == sSelMapY && pSoldier->bSectorZ == iCurrentMapSectorZ && !pSoldier->flags.fBetweenSectors)
|
||||||
pSoldier->bInSector = TRUE;
|
pSoldier->bInSector = TRUE;
|
||||||
|
|
||||||
if(OK_CONTROL_MERC( pSoldier ) && pSoldier->bInSector == TRUE)
|
if(OK_CONTROL_MERC( pSoldier ) && pSoldier->bInSector == TRUE)
|
||||||
{
|
{
|
||||||
if(!fShowMapInventoryPool)
|
if(!fShowMapInventoryPool)
|
||||||
@@ -7653,10 +7654,12 @@ void GetMapKeyboardInput( UINT32 *puiNewEvent )
|
|||||||
fShowMapInventoryPool = TRUE;
|
fShowMapInventoryPool = TRUE;
|
||||||
CreateDestroyMapInventoryPoolButtons( TRUE );
|
CreateDestroyMapInventoryPoolButtons( TRUE );
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!fShowInventoryFlag)
|
if(!fShowInventoryFlag)
|
||||||
{
|
{
|
||||||
fShowInventoryFlag = TRUE;
|
fShowInventoryFlag = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( fCtrl )
|
if( fCtrl )
|
||||||
{
|
{
|
||||||
if ( UsingNewInventorySystem() && fShowInventoryFlag && fShowMapInventoryPool && !gTacticalStatus.fEnemyInSector)
|
if ( UsingNewInventorySystem() && fShowInventoryFlag && fShowMapInventoryPool && !gTacticalStatus.fEnemyInSector)
|
||||||
@@ -7727,11 +7730,12 @@ void GetMapKeyboardInput( UINT32 *puiNewEvent )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
fTeamPanelDirty = TRUE;
|
|
||||||
fMapPanelDirty = TRUE;
|
|
||||||
fInterfacePanelDirty = DIRTYLEVEL2;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fTeamPanelDirty = TRUE;
|
||||||
|
fMapPanelDirty = TRUE;
|
||||||
|
fInterfacePanelDirty = DIRTYLEVEL2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -7747,10 +7751,8 @@ void GetMapKeyboardInput( UINT32 *puiNewEvent )
|
|||||||
AutoPlaceObjectInInventoryStash(&pSoldier->inv[i], pSoldier->sGridNo, pSoldier->pathing.bLevel);
|
AutoPlaceObjectInInventoryStash(&pSoldier->inv[i], pSoldier->sGridNo, pSoldier->pathing.bLevel);
|
||||||
DeleteObj(&pSoldier->inv[i]);
|
DeleteObj(&pSoldier->inv[i]);
|
||||||
}
|
}
|
||||||
fTeamPanelDirty = TRUE;
|
|
||||||
fMapPanelDirty = TRUE;
|
|
||||||
fInterfacePanelDirty = DIRTYLEVEL2;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for(int i = SMALLPOCK23POS; i<NUM_INV_SLOTS; i++)
|
for(int i = SMALLPOCK23POS; i<NUM_INV_SLOTS; i++)
|
||||||
{
|
{
|
||||||
if(pSoldier->inv[i].exists() == true)
|
if(pSoldier->inv[i].exists() == true)
|
||||||
@@ -7758,10 +7760,11 @@ void GetMapKeyboardInput( UINT32 *puiNewEvent )
|
|||||||
AutoPlaceObjectInInventoryStash(&pSoldier->inv[i], pSoldier->sGridNo, pSoldier->pathing.bLevel);
|
AutoPlaceObjectInInventoryStash(&pSoldier->inv[i], pSoldier->sGridNo, pSoldier->pathing.bLevel);
|
||||||
DeleteObj(&pSoldier->inv[i]);
|
DeleteObj(&pSoldier->inv[i]);
|
||||||
}
|
}
|
||||||
fTeamPanelDirty = TRUE;
|
|
||||||
fMapPanelDirty = TRUE;
|
|
||||||
fInterfacePanelDirty = DIRTYLEVEL2;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fTeamPanelDirty = TRUE;
|
||||||
|
fMapPanelDirty = TRUE;
|
||||||
|
fInterfacePanelDirty = DIRTYLEVEL2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -7769,17 +7772,18 @@ void GetMapKeyboardInput( UINT32 *puiNewEvent )
|
|||||||
//CHRISL: drop all items
|
//CHRISL: drop all items
|
||||||
if ( bSelectedInfoChar != -1 && fShowInventoryFlag && fShowMapInventoryPool && !(gTacticalStatus.fEnemyInSector) )
|
if ( bSelectedInfoChar != -1 && fShowInventoryFlag && fShowMapInventoryPool && !(gTacticalStatus.fEnemyInSector) )
|
||||||
{
|
{
|
||||||
for(int i = BODYPOSFINAL; i<NUM_INV_SLOTS; i++)
|
for(int i = BODYPOSFINAL; i<NUM_INV_SLOTS; ++i)
|
||||||
{
|
{
|
||||||
if(pSoldier->inv[i].exists() == true)
|
if(pSoldier->inv[i].exists() == true)
|
||||||
{
|
{
|
||||||
AutoPlaceObjectInInventoryStash(&pSoldier->inv[i], pSoldier->sGridNo, pSoldier->pathing.bLevel);
|
AutoPlaceObjectInInventoryStash(&pSoldier->inv[i], pSoldier->sGridNo, pSoldier->pathing.bLevel);
|
||||||
DeleteObj(&pSoldier->inv[i]);
|
DeleteObj(&pSoldier->inv[i]);
|
||||||
}
|
}
|
||||||
fTeamPanelDirty = TRUE;
|
|
||||||
fMapPanelDirty = TRUE;
|
|
||||||
fInterfacePanelDirty = DIRTYLEVEL2;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fTeamPanelDirty = TRUE;
|
||||||
|
fMapPanelDirty = TRUE;
|
||||||
|
fInterfacePanelDirty = DIRTYLEVEL2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -8305,45 +8309,43 @@ void GetMapKeyboardInput( UINT32 *puiNewEvent )
|
|||||||
if(bSelectedInfoChar != -1)
|
if(bSelectedInfoChar != -1)
|
||||||
{
|
{
|
||||||
SOLDIERTYPE *pSoldier = MercPtrs[ gCharactersList[ bSelectedInfoChar ].usSolID ];
|
SOLDIERTYPE *pSoldier = MercPtrs[ gCharactersList[ bSelectedInfoChar ].usSolID ];
|
||||||
|
|
||||||
//CHRISL: Try to update InSector value so we don't have to "activate" a sector
|
//CHRISL: Try to update InSector value so we don't have to "activate" a sector
|
||||||
if(pSoldier->sSectorX == sSelMapX && pSoldier->sSectorY == sSelMapY && pSoldier->bSectorZ == iCurrentMapSectorZ && !pSoldier->flags.fBetweenSectors)
|
if (pSoldier->sSectorX == sSelMapX && pSoldier->sSectorY == sSelMapY && pSoldier->bSectorZ == iCurrentMapSectorZ && !pSoldier->flags.fBetweenSectors)
|
||||||
pSoldier->bInSector=TRUE;
|
pSoldier->bInSector=TRUE;
|
||||||
if(OK_CONTROL_MERC( pSoldier ))
|
|
||||||
|
if (OK_CONTROL_MERC( pSoldier ))
|
||||||
|
{
|
||||||
|
if(!fShowMapInventoryPool)
|
||||||
{
|
{
|
||||||
if(!fShowMapInventoryPool)
|
fShowMapInventoryPool = TRUE;
|
||||||
{
|
CreateDestroyMapInventoryPoolButtons( TRUE );
|
||||||
fShowMapInventoryPool = TRUE;
|
}
|
||||||
CreateDestroyMapInventoryPoolButtons( TRUE );
|
|
||||||
}
|
if(!fShowInventoryFlag)
|
||||||
if(!fShowInventoryFlag)
|
{
|
||||||
{
|
fShowInventoryFlag = TRUE;
|
||||||
fShowInventoryFlag = TRUE;
|
}
|
||||||
}
|
|
||||||
//tais: borrowed the drop all items code from CHRISL to make it drop EVERYTHING!
|
//tais: borrowed the drop all items code from CHRISL to make it drop EVERYTHING!
|
||||||
if ( bSelectedInfoChar != -1 && fShowInventoryFlag && fShowMapInventoryPool && !(gTacticalStatus.fEnemyInSector) )
|
if ( bSelectedInfoChar != -1 && fShowInventoryFlag && fShowMapInventoryPool && !(gTacticalStatus.fEnemyInSector) )
|
||||||
{
|
{
|
||||||
for(int i = BODYPOSFINAL; i<NUM_INV_SLOTS; i++)
|
for ( int i = HELMETPOS; i<NUM_INV_SLOTS; ++i )
|
||||||
{
|
{
|
||||||
if(pSoldier->inv[i].exists() == true)
|
if( pSoldier->inv[i].exists() == true)
|
||||||
{
|
{
|
||||||
|
// if we are Nails and are ordered to drop our vest, refuse and complain!
|
||||||
|
if ( HandleNailsVestFetish( pSoldier, i, NOTHING ) )
|
||||||
|
continue;
|
||||||
|
|
||||||
AutoPlaceObjectInInventoryStash(&pSoldier->inv[i], pSoldier->sGridNo, pSoldier->pathing.bLevel);
|
AutoPlaceObjectInInventoryStash(&pSoldier->inv[i], pSoldier->sGridNo, pSoldier->pathing.bLevel);
|
||||||
DeleteObj(&pSoldier->inv[i]);
|
DeleteObj(&pSoldier->inv[i]);
|
||||||
}
|
}
|
||||||
fTeamPanelDirty = TRUE;
|
|
||||||
fMapPanelDirty = TRUE;
|
|
||||||
fInterfacePanelDirty = DIRTYLEVEL2;
|
|
||||||
}
|
|
||||||
for(int i = HELMETPOS; i<BODYPOSFINAL; i++)
|
|
||||||
{
|
|
||||||
if(pSoldier->inv[i].exists() == true)
|
|
||||||
{
|
|
||||||
AutoPlaceObjectInInventoryStash(&pSoldier->inv[i], pSoldier->sGridNo, pSoldier->pathing.bLevel);
|
|
||||||
DeleteObj(&pSoldier->inv[i]);
|
|
||||||
}
|
|
||||||
fTeamPanelDirty = TRUE;
|
|
||||||
fMapPanelDirty = TRUE;
|
|
||||||
fInterfacePanelDirty = DIRTYLEVEL2;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fTeamPanelDirty = TRUE;
|
||||||
|
fMapPanelDirty = TRUE;
|
||||||
|
fInterfacePanelDirty = DIRTYLEVEL2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user