mirror of
https://github.com/1dot13/source.git
synced 2026-08-19 14:20:30 +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:
@@ -3050,18 +3050,19 @@ BOOLEAN RemoveItemFromPool( INT16 sGridNo, INT32 iItemIndex, UINT8 ubLevel )
|
||||
return( FALSE );
|
||||
}
|
||||
|
||||
BOOLEAN MoveItemPools( INT16 sStartPos, INT16 sEndPos )
|
||||
BOOLEAN MoveItemPools( INT16 sStartPos, INT16 sEndPos, INT8 bStartLevel, INT8 bEndLevel )
|
||||
{
|
||||
// note, only works between locations on the ground
|
||||
ITEM_POOL *pItemPool;
|
||||
WORLDITEM TempWorldItem;
|
||||
|
||||
// While there is an existing pool
|
||||
while( GetItemPool( sStartPos, &pItemPool, 0 ) )
|
||||
while( GetItemPool( sStartPos, &pItemPool, bStartLevel ) )
|
||||
{
|
||||
memcpy( &TempWorldItem, &(gWorldItems[ pItemPool->iItemIndex ]), sizeof( WORLDITEM ) );
|
||||
RemoveItemFromPool( sStartPos, pItemPool->iItemIndex, 0 );
|
||||
AddItemToPool( sEndPos, &(TempWorldItem.o), -1, TempWorldItem.ubLevel, TempWorldItem.usFlags, TempWorldItem.bRenderZHeightAboveLevel );
|
||||
RemoveItemFromPool( sStartPos, pItemPool->iItemIndex, bStartLevel );
|
||||
//AddItemToPool( sEndPos, &(TempWorldItem.o), -1, TempWorldItem.ubLevel, TempWorldItem.usFlags, TempWorldItem.bRenderZHeightAboveLevel );
|
||||
AddItemToPool( sEndPos, &(TempWorldItem.o), -1, bEndLevel, TempWorldItem.usFlags, TempWorldItem.bRenderZHeightAboveLevel );
|
||||
}
|
||||
return( TRUE );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user