mirror of
https://github.com/1dot13/source.git
synced 2026-09-02 14:36:06 +02:00
- fixed Ctrl+M not moving items from/to the roof
- fixed Ctrl+S, Ctrl+F, Ctrl+M, Ctrl+R affect not visible items git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@1078 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -2579,7 +2579,7 @@ void GetKeyboardInput( UINT32 *puiNewEvent )
|
||||
|
||||
for ( UINT32 uiLoop = 0; uiLoop < guiNumWorldItems; uiLoop++ ) //for all items in sector
|
||||
{
|
||||
if ( (gWorldItems[ uiLoop ].fExists) && (gWorldItems[ uiLoop ].usFlags & WORLD_ITEM_REACHABLE) )//item exists and is reachable
|
||||
if ( (gWorldItems[ uiLoop ].bVisible == TRUE) && (gWorldItems[ uiLoop ].fExists) && (gWorldItems[ uiLoop ].usFlags & WORLD_ITEM_REACHABLE) && !(gWorldItems[ uiLoop ].usFlags & WORLD_ITEM_ARMED_BOMB) )//item exists, is reachable, is visible and is not trapped
|
||||
{
|
||||
if (( Item[ gWorldItems[ uiLoop ].o.usItem ].usItemClass == IC_GUN ) && (gGameExternalOptions.gfShiftFUnloadWeapons == TRUE) )//item is a gun and unloading is allowed
|
||||
{
|
||||
@@ -2980,12 +2980,13 @@ void GetKeyboardInput( UINT32 *puiNewEvent )
|
||||
|
||||
for ( UINT32 uiLoop = 0; uiLoop < guiNumWorldItems; uiLoop++ ) //for all items in sector
|
||||
{
|
||||
if ( (gWorldItems[ uiLoop ].fExists) && (gWorldItems[ uiLoop ].usFlags & WORLD_ITEM_REACHABLE) && (gWorldItems[ uiLoop ].sGridNo != pSoldier->sGridNo) )//item exists and is reachable
|
||||
if ( (gWorldItems[ uiLoop ].bVisible == TRUE) && (gWorldItems[ uiLoop ].fExists) && (gWorldItems[ uiLoop ].usFlags & WORLD_ITEM_REACHABLE) && !(gWorldItems[ uiLoop ].usFlags & WORLD_ITEM_ARMED_BOMB) && (gWorldItems[ uiLoop ].sGridNo != pSoldier->sGridNo) )//item exists and is reachable and is not already on soldiers tile
|
||||
{
|
||||
MoveItemPools(gWorldItems[ uiLoop ].sGridNo, pSoldier->sGridNo);
|
||||
NotifySoldiersToLookforItems( );
|
||||
MoveItemPools(gWorldItems[ uiLoop ].sGridNo, pSoldier->sGridNo, gWorldItems[ uiLoop ].ubLevel, pSoldier->bLevel);
|
||||
}
|
||||
}
|
||||
|
||||
NotifySoldiersToLookforItems( );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3304,7 +3305,7 @@ void GetKeyboardInput( UINT32 *puiNewEvent )
|
||||
// Search for ammo in sector
|
||||
for ( UINT32 uiLoop = 0; uiLoop < guiNumWorldItems; uiLoop++ )
|
||||
{
|
||||
if ( (gWorldItems[ uiLoop ].fExists) && (gWorldItems[ uiLoop ].usFlags & WORLD_ITEM_REACHABLE) )//item exists
|
||||
if ( (gWorldItems[ uiLoop ].bVisible == TRUE) && (gWorldItems[ uiLoop ].fExists) && (gWorldItems[ uiLoop ].usFlags & WORLD_ITEM_REACHABLE) && !(gWorldItems[ uiLoop ].usFlags & WORLD_ITEM_ARMED_BOMB) )//item exists, is reachable, is visible and is not trapped
|
||||
{
|
||||
if ( ( Item[ gWorldItems[ uiLoop ].o.usItem ].usItemClass & IC_AMMO ) ) // the item is ammo
|
||||
{
|
||||
@@ -3449,7 +3450,7 @@ void GetKeyboardInput( UINT32 *puiNewEvent )
|
||||
|
||||
for ( UINT32 uiLoop = 0; uiLoop < guiNumWorldItems; uiLoop++ )
|
||||
{
|
||||
if ( ( gWorldItems[ uiLoop ].fExists) && (gWorldItems[ uiLoop ].usFlags & WORLD_ITEM_REACHABLE) )//item exists and is reachable
|
||||
if ( (gWorldItems[ uiLoop ].bVisible == TRUE) && (gWorldItems[ uiLoop ].fExists) && (gWorldItems[ uiLoop ].usFlags & WORLD_ITEM_REACHABLE) && !(gWorldItems[ uiLoop ].usFlags & WORLD_ITEM_ARMED_BOMB) )//item exists, is reachable, is visible and is not trapped
|
||||
{
|
||||
//find out how many items can be put in a big slot
|
||||
INT8 ubSlotLimit = ItemSlotLimit( gWorldItems[ uiLoop ].o.usItem, BIGPOCK1POS );
|
||||
|
||||
Reference in New Issue
Block a user