mirror of
https://github.com/1dot13/source.git
synced 2026-09-09 14:46:05 +02:00
- Fix: crash when handling flashing items
- Fix: bad argument git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8433 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -89,7 +89,7 @@
|
|||||||
#define NUM_ITEM_FLASH_SLOTS 50
|
#define NUM_ITEM_FLASH_SLOTS 50
|
||||||
#define MIN_LOB_RANGE 6
|
#define MIN_LOB_RANGE 6
|
||||||
|
|
||||||
// directory for fortification plans (locaed in Profiles sub-folder)
|
// directory for fortification plans (located in Profiles sub-folder)
|
||||||
#define FORTIFICATIONPLAN_DIRECTORY "FortificationPlan\\"
|
#define FORTIFICATIONPLAN_DIRECTORY "FortificationPlan\\"
|
||||||
|
|
||||||
ITEM_POOL_LOCATOR FlashItemSlots[ NUM_ITEM_FLASH_SLOTS ];
|
ITEM_POOL_LOCATOR FlashItemSlots[ NUM_ITEM_FLASH_SLOTS ];
|
||||||
@@ -4352,7 +4352,7 @@ BOOLEAN RemoveFlashItemSlot( ITEM_POOL *pItemPool )
|
|||||||
|
|
||||||
CHECKF( pItemPool != NULL );
|
CHECKF( pItemPool != NULL );
|
||||||
|
|
||||||
for( uiCount=0; uiCount < guiNumFlashItemSlots; uiCount++)
|
for( uiCount=0; uiCount < guiNumFlashItemSlots; ++uiCount)
|
||||||
{
|
{
|
||||||
if ( FlashItemSlots[ uiCount ].fAllocated )
|
if ( FlashItemSlots[ uiCount ].fAllocated )
|
||||||
{
|
{
|
||||||
@@ -4387,7 +4387,7 @@ void HandleFlashingItems( )
|
|||||||
{
|
{
|
||||||
RESETCOUNTER( CYCLERENDERITEMCOLOR );
|
RESETCOUNTER( CYCLERENDERITEMCOLOR );
|
||||||
|
|
||||||
for ( cnt = 0; cnt < guiNumFlashItemSlots; cnt++ )
|
for ( cnt = 0; cnt < guiNumFlashItemSlots; ++cnt )
|
||||||
{
|
{
|
||||||
pLocator = &( FlashItemSlots[ cnt ] );
|
pLocator = &( FlashItemSlots[ cnt ] );
|
||||||
|
|
||||||
@@ -4414,9 +4414,7 @@ void HandleFlashingItems( )
|
|||||||
|
|
||||||
// Update radio locator
|
// Update radio locator
|
||||||
{
|
{
|
||||||
UINT32 uiClock;
|
UINT32 uiClock = GetJA2Clock( );
|
||||||
|
|
||||||
uiClock = GetJA2Clock( );
|
|
||||||
|
|
||||||
// Update frame values!
|
// Update frame values!
|
||||||
if ( ( uiClock - pLocator->uiLastFrameUpdate ) > 80 )
|
if ( ( uiClock - pLocator->uiLastFrameUpdate ) > 80 )
|
||||||
@@ -4436,7 +4434,8 @@ void HandleFlashingItems( )
|
|||||||
// UPDATE FLASH COLOR VALUE
|
// UPDATE FLASH COLOR VALUE
|
||||||
pItemPool->bFlashColor--;
|
pItemPool->bFlashColor--;
|
||||||
|
|
||||||
if ( pItemPool->ubLevel == 0 )
|
// Flugente: as someone commented out the changes to uiFlags, this part serves no purpose, so I'm commenting it out
|
||||||
|
/*if ( pItemPool->ubLevel == 0 )
|
||||||
{
|
{
|
||||||
pObject = gpWorldLevelData[ pItemPool->sGridNo ].pStructHead;
|
pObject = gpWorldLevelData[ pItemPool->sGridNo ].pStructHead;
|
||||||
}
|
}
|
||||||
@@ -4463,7 +4462,7 @@ void HandleFlashingItems( )
|
|||||||
}
|
}
|
||||||
|
|
||||||
pObject = pObject->pNext;
|
pObject = pObject->pNext;
|
||||||
}
|
}*/
|
||||||
|
|
||||||
if ( pItemPool->bFlashColor == 1 )
|
if ( pItemPool->bFlashColor == 1 )
|
||||||
{
|
{
|
||||||
@@ -4479,9 +4478,7 @@ void HandleFlashingItems( )
|
|||||||
}
|
}
|
||||||
|
|
||||||
RecountFlashItemSlots( );
|
RecountFlashItemSlots( );
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -4491,7 +4488,7 @@ void RenderTopmostFlashingItems( )
|
|||||||
ITEM_POOL *pItemPool;
|
ITEM_POOL *pItemPool;
|
||||||
ITEM_POOL_LOCATOR *pLocator;
|
ITEM_POOL_LOCATOR *pLocator;
|
||||||
|
|
||||||
for ( cnt = 0; cnt < guiNumFlashItemSlots; cnt++ )
|
for ( cnt = 0; cnt < guiNumFlashItemSlots; ++cnt )
|
||||||
{
|
{
|
||||||
pLocator = &( FlashItemSlots[ cnt ] );
|
pLocator = &( FlashItemSlots[ cnt ] );
|
||||||
|
|
||||||
@@ -4546,12 +4543,10 @@ void RenderTopmostFlashingItems( )
|
|||||||
BltVideoObjectFromIndex( FRAME_BUFFER, guiRADIO, pLocator->bRadioFrame, sXPos, sYPos, VO_BLT_SRCTRANSPARENCY, NULL );
|
BltVideoObjectFromIndex( FRAME_BUFFER, guiRADIO, pLocator->bRadioFrame, sXPos, sYPos, VO_BLT_SRCTRANSPARENCY, NULL );
|
||||||
|
|
||||||
DrawItemPoolList( pItemPool, pItemPool->sGridNo , ITEMLIST_DISPLAY, pItemPool->bRenderZHeightAboveLevel, sXPos, sYPos );
|
DrawItemPoolList( pItemPool, pItemPool->sGridNo , ITEMLIST_DISPLAY, pItemPool->bRenderZHeightAboveLevel, sXPos, sYPos );
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -5492,7 +5487,7 @@ void TacticalFunctionSelectionMessageBoxCallBack( UINT8 ubExitValue )
|
|||||||
break;
|
break;
|
||||||
case 7:
|
case 7:
|
||||||
// test our disguise
|
// test our disguise
|
||||||
if ( gpTempSoldier->usSoldierFlagMask & (SOLDIER_COVERT_CIV|SOLDIER_COVERT_SOLDIER) )
|
if (gpTempSoldier->usSoldierFlagMask & (SOLDIER_COVERT_CIV | SOLDIER_COVERT_SOLDIER))
|
||||||
gpTempSoldier->SpySelfTest();
|
gpTempSoldier->SpySelfTest();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|||||||
@@ -2964,7 +2964,7 @@ BOOLEAN HandleAtNewGridNo( SOLDIERTYPE *pSoldier, BOOLEAN *pfKeepMoving )
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef LUA_OVERHEAD
|
#ifdef LUA_OVERHEAD
|
||||||
LetLuaMyCustomHandleAtNewGridNo(NULL,pSoldier->ubProfile, 0);
|
LetLuaMyCustomHandleAtNewGridNo(0,pSoldier->ubProfile, 0);
|
||||||
#else
|
#else
|
||||||
//----------------Lua------------------------
|
//----------------Lua------------------------
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user