mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
Fix for AI seeking climb point in toxic gas
Fix for civilians trying to climb the roof to seek noise Fix for punching and stabbing Transparent change: Gave names to anonymous structs in OBJECTTYPE git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@1225 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -704,27 +704,27 @@ void BuildTriggerName( OBJECTTYPE *pItem, STR16 szItemName )
|
||||
{
|
||||
if( pItem->usItem == SWITCH )
|
||||
{
|
||||
if( pItem->bFrequency == PANIC_FREQUENCY )
|
||||
if( pItem->ItemData.Trigger.BombTrigger.bFrequency == PANIC_FREQUENCY )
|
||||
swprintf( szItemName, L"Panic Trigger1" );
|
||||
else if( pItem->bFrequency == PANIC_FREQUENCY_2 )
|
||||
else if( pItem->ItemData.Trigger.BombTrigger.bFrequency == PANIC_FREQUENCY_2 )
|
||||
swprintf( szItemName, L"Panic Trigger2" );
|
||||
else if( pItem->bFrequency == PANIC_FREQUENCY_3 )
|
||||
else if( pItem->ItemData.Trigger.BombTrigger.bFrequency == PANIC_FREQUENCY_3 )
|
||||
swprintf( szItemName, L"Panic Trigger3" );
|
||||
else
|
||||
swprintf( szItemName, L"Trigger%d", pItem->bFrequency - 50 );
|
||||
swprintf( szItemName, L"Trigger%d", pItem->ItemData.Trigger.BombTrigger.bFrequency - 50 );
|
||||
}
|
||||
else
|
||||
{ //action item
|
||||
if( pItem->bDetonatorType == BOMB_PRESSURE )
|
||||
if( pItem->ItemData.Trigger.bDetonatorType == BOMB_PRESSURE )
|
||||
swprintf( szItemName, L"Pressure Action" );
|
||||
else if( pItem->bFrequency == PANIC_FREQUENCY )
|
||||
else if( pItem->ItemData.Trigger.BombTrigger.bFrequency == PANIC_FREQUENCY )
|
||||
swprintf( szItemName, L"Panic Action1" );
|
||||
else if( pItem->bFrequency == PANIC_FREQUENCY_2 )
|
||||
else if( pItem->ItemData.Trigger.BombTrigger.bFrequency == PANIC_FREQUENCY_2 )
|
||||
swprintf( szItemName, L"Panic Action2" );
|
||||
else if( pItem->bFrequency == PANIC_FREQUENCY_3 )
|
||||
else if( pItem->ItemData.Trigger.BombTrigger.bFrequency == PANIC_FREQUENCY_3 )
|
||||
swprintf( szItemName, L"Panic Action3" );
|
||||
else
|
||||
swprintf( szItemName, L"Action%d", pItem->bFrequency - 50 );
|
||||
swprintf( szItemName, L"Action%d", pItem->ItemData.Trigger.BombTrigger.bFrequency - 50 );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -818,7 +818,7 @@ void RenderSelectedItemBlownUp()
|
||||
}
|
||||
else if( Item[ gpItem->usItem ].usItemClass == IC_KEY )
|
||||
{
|
||||
swprintf( szItemName, L"%S", LockTable[ gpItem->ubKeyID ].ubEditorName );
|
||||
swprintf( szItemName, L"%S", LockTable[ gpItem->ItemData.Key.ubKeyID ].ubEditorName );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
+37
-37
@@ -844,11 +844,11 @@ void AddSelectedItemToWorld( INT16 sGridNo )
|
||||
case MONEY:
|
||||
case SILVER:
|
||||
case GOLD:
|
||||
tempObject.bStatus[0] = 100;
|
||||
tempObject.uiMoneyAmount = 100 + Random( 19901 );
|
||||
tempObject.ItemData.Money.bMoneyStatus = 100;
|
||||
tempObject.ItemData.Money.uiMoneyAmount = 100 + Random( 19901 );
|
||||
break;
|
||||
case OWNERSHIP:
|
||||
tempObject.ubOwnerProfile = NO_PROFILE;
|
||||
tempObject.ItemData.Owner.ubOwnerProfile = NO_PROFILE;
|
||||
bVisibility = BURIED;
|
||||
break;
|
||||
case SWITCH:
|
||||
@@ -857,39 +857,39 @@ void AddSelectedItemToWorld( INT16 sGridNo )
|
||||
return;
|
||||
}
|
||||
bVisibility = BURIED;
|
||||
tempObject.bStatus[0] = 100;
|
||||
tempObject.ubBombOwner = 1;
|
||||
tempObject.ItemData.Trigger.bBombStatus = 100;
|
||||
tempObject.ItemData.Trigger.ubBombOwner = 1;
|
||||
if( eInfo.sSelItemIndex < 2 )
|
||||
tempObject.bFrequency = PANIC_FREQUENCY;
|
||||
tempObject.ItemData.Trigger.BombTrigger.bFrequency = PANIC_FREQUENCY;
|
||||
else if( eInfo.sSelItemIndex < 4 )
|
||||
tempObject.bFrequency = PANIC_FREQUENCY_2;
|
||||
tempObject.ItemData.Trigger.BombTrigger.bFrequency = PANIC_FREQUENCY_2;
|
||||
else if( eInfo.sSelItemIndex < 6 )
|
||||
tempObject.bFrequency = PANIC_FREQUENCY_3;
|
||||
tempObject.ItemData.Trigger.BombTrigger.bFrequency = PANIC_FREQUENCY_3;
|
||||
else
|
||||
tempObject.bFrequency = (INT8)(FIRST_MAP_PLACED_FREQUENCY + (eInfo.sSelItemIndex-4) / 2);
|
||||
tempObject.ItemData.Trigger.BombTrigger.bFrequency = (INT8)(FIRST_MAP_PLACED_FREQUENCY + (eInfo.sSelItemIndex-4) / 2);
|
||||
usFlags |= WORLD_ITEM_ARMED_BOMB;
|
||||
break;
|
||||
case ACTION_ITEM:
|
||||
bVisibility = BURIED;
|
||||
tempObject.bStatus[0] = 100;
|
||||
tempObject.ubBombOwner = 1;
|
||||
tempObject.ItemData.Trigger.bBombStatus = 100;
|
||||
tempObject.ItemData.Trigger.ubBombOwner = 1;
|
||||
tempObject.bTrap = gbDefaultBombTrapLevel;
|
||||
if( eInfo.sSelItemIndex < PRESSURE_ACTION_ID )
|
||||
{
|
||||
tempObject.bDetonatorType = BOMB_REMOTE;
|
||||
tempObject.ItemData.Trigger.bDetonatorType = BOMB_REMOTE;
|
||||
if( eInfo.sSelItemIndex < 2 )
|
||||
tempObject.bFrequency = PANIC_FREQUENCY;
|
||||
tempObject.ItemData.Trigger.BombTrigger.bFrequency = PANIC_FREQUENCY;
|
||||
else if( eInfo.sSelItemIndex < 4 )
|
||||
tempObject.bFrequency = PANIC_FREQUENCY_2;
|
||||
tempObject.ItemData.Trigger.BombTrigger.bFrequency = PANIC_FREQUENCY_2;
|
||||
else if( eInfo.sSelItemIndex < 6 )
|
||||
tempObject.bFrequency = PANIC_FREQUENCY_3;
|
||||
tempObject.ItemData.Trigger.BombTrigger.bFrequency = PANIC_FREQUENCY_3;
|
||||
else
|
||||
tempObject.bFrequency = (INT8)(FIRST_MAP_PLACED_FREQUENCY + (eInfo.sSelItemIndex-4) / 2);
|
||||
tempObject.ItemData.Trigger.BombTrigger.bFrequency = (INT8)(FIRST_MAP_PLACED_FREQUENCY + (eInfo.sSelItemIndex-4) / 2);
|
||||
}
|
||||
else
|
||||
{
|
||||
tempObject.bDetonatorType = BOMB_PRESSURE;
|
||||
tempObject.bDelay = 0;
|
||||
tempObject.ItemData.Trigger.bDetonatorType = BOMB_PRESSURE;
|
||||
tempObject.ItemData.Trigger.BombTrigger.bDelay = 0;
|
||||
}
|
||||
ChangeActionItem( &tempObject, gbActionItemIndex );
|
||||
tempObject.fFlags |= OBJECT_ARMED_BOMB;
|
||||
@@ -916,26 +916,26 @@ void AddSelectedItemToWorld( INT16 sGridNo )
|
||||
{
|
||||
if (Random( 2 ))
|
||||
{
|
||||
pObject->ubShotsLeft[0] = Magazine[ pItem->ubClassIndex ].ubMagSize;
|
||||
pObject->ItemData.Ammo.ubShotsLeft[0] = Magazine[ pItem->ubClassIndex ].ubMagSize;
|
||||
}
|
||||
else
|
||||
{
|
||||
pObject->ubShotsLeft[0] = (UINT8) Random( Magazine[ pItem->ubClassIndex ].ubMagSize );
|
||||
pObject->ItemData.Ammo.ubShotsLeft[0] = (UINT8) Random( Magazine[ pItem->ubClassIndex ].ubMagSize );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
pObject->bStatus[0] = (INT8)(70 + Random( 26 ));
|
||||
pObject->ItemData.Generic.bStatus[0] = (INT8)(70 + Random( 26 ));
|
||||
}
|
||||
if( pItem->usItemClass & IC_GUN )
|
||||
{
|
||||
if ( pObject->usItem == ROCKET_LAUNCHER )
|
||||
{
|
||||
pObject->ubGunShotsLeft = 1;
|
||||
pObject->ItemData.Gun.ubGunShotsLeft = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
pObject->ubGunShotsLeft = (UINT8)(Random( Weapon[ pObject->usItem ].ubMagSize ));
|
||||
pObject->ItemData.Gun.ubGunShotsLeft = (UINT8)(Random( Weapon[ pObject->usItem ].ubMagSize ));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1054,9 +1054,9 @@ void DeleteSelectedItem()
|
||||
//remove the item
|
||||
if( gWorldItems[ gpItemPool->iItemIndex ].o.usItem == ACTION_ITEM )
|
||||
{
|
||||
if( gWorldItems[ gpItemPool->iItemIndex ].o.bActionValue == ACTION_ITEM_SMALL_PIT )
|
||||
if( gWorldItems[ gpItemPool->iItemIndex ].o.ItemData.Trigger.bActionValue == ACTION_ITEM_SMALL_PIT )
|
||||
Remove3X3Pit( gWorldItems[ gpItemPool->iItemIndex ].sGridNo );
|
||||
else if( gWorldItems[ gpItemPool->iItemIndex ].o.bActionValue == ACTION_ITEM_LARGE_PIT )
|
||||
else if( gWorldItems[ gpItemPool->iItemIndex ].o.ItemData.Trigger.bActionValue == ACTION_ITEM_LARGE_PIT )
|
||||
Remove5X5Pit( gWorldItems[ gpItemPool->iItemIndex ].sGridNo );
|
||||
}
|
||||
if( gpEditingItemPool == gpItemPool )
|
||||
@@ -1295,7 +1295,7 @@ void SelectNextKeyOfType( UINT8 ubKeyID )
|
||||
while( gpItemPool )
|
||||
{
|
||||
pObject = &gWorldItems[ gpItemPool->iItemIndex ].o;
|
||||
if( Item[ pObject->usItem ].usItemClass == IC_KEY && pObject->ubKeyID == ubKeyID )
|
||||
if( Item[ pObject->usItem ].usItemClass == IC_KEY && pObject->ItemData.Key.ubKeyID == ubKeyID )
|
||||
{
|
||||
SpecifyItemToEdit( pObject, gWorldItems[ gpItemPool->iItemIndex ].sGridNo );
|
||||
CenterScreenAtMapIndex( gsItemGridNo );
|
||||
@@ -1314,7 +1314,7 @@ void SelectNextKeyOfType( UINT8 ubKeyID )
|
||||
while( gpItemPool )
|
||||
{
|
||||
pObject = &gWorldItems[ gpItemPool->iItemIndex ].o;
|
||||
if( Item[ pObject->usItem ].usItemClass == IC_KEY && pObject->ubKeyID == ubKeyID )
|
||||
if( Item[ pObject->usItem ].usItemClass == IC_KEY && pObject->ItemData.Key.ubKeyID == ubKeyID )
|
||||
{
|
||||
SpecifyItemToEdit( pObject, gWorldItems[ gpItemPool->iItemIndex ].sGridNo );
|
||||
CenterScreenAtMapIndex( gsItemGridNo );
|
||||
@@ -1332,7 +1332,7 @@ void SelectNextKeyOfType( UINT8 ubKeyID )
|
||||
while( gpItemPool )
|
||||
{
|
||||
pObject = &gWorldItems[ gpItemPool->iItemIndex ].o;
|
||||
if( Item[ pObject->usItem ].usItemClass == IC_KEY && pObject->ubKeyID == ubKeyID )
|
||||
if( Item[ pObject->usItem ].usItemClass == IC_KEY && pObject->ItemData.Key.ubKeyID == ubKeyID )
|
||||
{
|
||||
SpecifyItemToEdit( pObject, gWorldItems[ gpItemPool->iItemIndex ].sGridNo );
|
||||
CenterScreenAtMapIndex( gsItemGridNo );
|
||||
@@ -1359,7 +1359,7 @@ void SelectNextTriggerWithFrequency( UINT16 usItem, INT8 bFrequency )
|
||||
while( gpItemPool )
|
||||
{
|
||||
pObject = &gWorldItems[ gpItemPool->iItemIndex ].o;
|
||||
if( pObject->usItem == usItem && pObject->bFrequency == bFrequency )
|
||||
if( pObject->usItem == usItem && pObject->ItemData.Trigger.BombTrigger.bFrequency == bFrequency )
|
||||
{
|
||||
SpecifyItemToEdit( pObject, gWorldItems[ gpItemPool->iItemIndex ].sGridNo );
|
||||
CenterScreenAtMapIndex( gsItemGridNo );
|
||||
@@ -1378,7 +1378,7 @@ void SelectNextTriggerWithFrequency( UINT16 usItem, INT8 bFrequency )
|
||||
while( gpItemPool )
|
||||
{
|
||||
pObject = &gWorldItems[ gpItemPool->iItemIndex ].o;
|
||||
if( pObject->usItem == usItem && pObject->bFrequency == bFrequency )
|
||||
if( pObject->usItem == usItem && pObject->ItemData.Trigger.BombTrigger.bFrequency == bFrequency )
|
||||
{
|
||||
SpecifyItemToEdit( pObject, gWorldItems[ gpItemPool->iItemIndex ].sGridNo );
|
||||
CenterScreenAtMapIndex( gsItemGridNo );
|
||||
@@ -1396,7 +1396,7 @@ void SelectNextTriggerWithFrequency( UINT16 usItem, INT8 bFrequency )
|
||||
while( gpItemPool )
|
||||
{
|
||||
pObject = &gWorldItems[ gpItemPool->iItemIndex ].o;
|
||||
if( pObject->usItem == usItem && pObject->bFrequency == bFrequency )
|
||||
if( pObject->usItem == usItem && pObject->ItemData.Trigger.BombTrigger.bFrequency == bFrequency )
|
||||
{
|
||||
SpecifyItemToEdit( pObject, gWorldItems[ gpItemPool->iItemIndex ].sGridNo );
|
||||
CenterScreenAtMapIndex( gsItemGridNo );
|
||||
@@ -1423,7 +1423,7 @@ void SelectNextPressureAction()
|
||||
while( gpItemPool )
|
||||
{
|
||||
pObject = &gWorldItems[ gpItemPool->iItemIndex ].o;
|
||||
if( pObject->usItem == ACTION_ITEM && pObject->bDetonatorType == BOMB_PRESSURE )
|
||||
if( pObject->usItem == ACTION_ITEM && pObject->ItemData.Trigger.bDetonatorType == BOMB_PRESSURE )
|
||||
{
|
||||
SpecifyItemToEdit( pObject, gWorldItems[ gpItemPool->iItemIndex ].sGridNo );
|
||||
CenterScreenAtMapIndex( gsItemGridNo );
|
||||
@@ -1442,7 +1442,7 @@ void SelectNextPressureAction()
|
||||
while( gpItemPool )
|
||||
{
|
||||
pObject = &gWorldItems[ gpItemPool->iItemIndex ].o;
|
||||
if( pObject->usItem == ACTION_ITEM && pObject->bDetonatorType == BOMB_PRESSURE )
|
||||
if( pObject->usItem == ACTION_ITEM && pObject->ItemData.Trigger.bDetonatorType == BOMB_PRESSURE )
|
||||
{
|
||||
SpecifyItemToEdit( pObject, gWorldItems[ gpItemPool->iItemIndex ].sGridNo );
|
||||
CenterScreenAtMapIndex( gsItemGridNo );
|
||||
@@ -1460,7 +1460,7 @@ void SelectNextPressureAction()
|
||||
while( gpItemPool )
|
||||
{
|
||||
pObject = &gWorldItems[ gpItemPool->iItemIndex ].o;
|
||||
if( pObject->usItem == ACTION_ITEM && pObject->bDetonatorType == BOMB_PRESSURE )
|
||||
if( pObject->usItem == ACTION_ITEM && pObject->ItemData.Trigger.bDetonatorType == BOMB_PRESSURE )
|
||||
{
|
||||
SpecifyItemToEdit( pObject, gWorldItems[ gpItemPool->iItemIndex ].sGridNo );
|
||||
CenterScreenAtMapIndex( gsItemGridNo );
|
||||
@@ -1508,7 +1508,7 @@ UINT16 CountNumberOfItemsWithFrequency( UINT16 usItem, INT8 bFrequency )
|
||||
while( pItemPool )
|
||||
{
|
||||
if( gWorldItems[ pItemPool->iItemIndex ].o.usItem == usItem &&
|
||||
gWorldItems[ pItemPool->iItemIndex ].o.bFrequency == bFrequency )
|
||||
gWorldItems[ pItemPool->iItemIndex ].o.ItemData.Trigger.BombTrigger.bFrequency == bFrequency )
|
||||
{
|
||||
num++;
|
||||
}
|
||||
@@ -1531,7 +1531,7 @@ UINT16 CountNumberOfPressureActionsInWorld()
|
||||
while( pItemPool )
|
||||
{
|
||||
if( gWorldItems[ pItemPool->iItemIndex ].o.usItem == ACTION_ITEM &&
|
||||
gWorldItems[ pItemPool->iItemIndex ].o.bDetonatorType == BOMB_PRESSURE )
|
||||
gWorldItems[ pItemPool->iItemIndex ].o.ItemData.Trigger.bDetonatorType == BOMB_PRESSURE )
|
||||
{
|
||||
num++;
|
||||
}
|
||||
@@ -1592,7 +1592,7 @@ UINT16 CountNumberOfKeysOfTypeInWorld( UINT8 ubKeyID )
|
||||
{
|
||||
if( Item[ gWorldItems[ pItemPool->iItemIndex ].o.usItem ].usItemClass == IC_KEY )
|
||||
{
|
||||
if( gWorldItems[ pItemPool->iItemIndex ].o.ubKeyID == ubKeyID )
|
||||
if( gWorldItems[ pItemPool->iItemIndex ].o.ItemData.Key.ubKeyID == ubKeyID )
|
||||
{
|
||||
num++;
|
||||
}
|
||||
|
||||
@@ -2767,7 +2767,7 @@ void AddNewItemToSelectedMercsInventory( BOOLEAN fCreate )
|
||||
|
||||
//randomize the status on non-ammo items.
|
||||
if( !(Item[ gpSelected->pDetailedPlacement->Inv[ gbMercSlotTypes[ gbCurrSelect ] ].usItem ].usItemClass & IC_AMMO) )
|
||||
gpSelected->pDetailedPlacement->Inv[ gbMercSlotTypes[ gbCurrSelect ] ].bStatus[0] = (INT8)(80 + Random( 21 ));
|
||||
gpSelected->pDetailedPlacement->Inv[ gbMercSlotTypes[ gbCurrSelect ] ].ItemData.Generic.bStatus[0] = (INT8)(80 + Random( 21 ));
|
||||
|
||||
if( gusMercsNewItemIndex )
|
||||
{
|
||||
|
||||
+93
-93
@@ -81,9 +81,9 @@ const STR16 GetActionItemName( OBJECTTYPE *pItem )
|
||||
{
|
||||
if( !pItem || pItem->usItem != ACTION_ITEM )
|
||||
return NULL;
|
||||
if( pItem->bActionValue != ACTION_ITEM_BLOW_UP )
|
||||
if( pItem->ItemData.Trigger.bActionValue != ACTION_ITEM_BLOW_UP )
|
||||
{
|
||||
switch( pItem->bActionValue )
|
||||
switch( pItem->ItemData.Trigger.bActionValue )
|
||||
{
|
||||
case ACTION_ITEM_OPEN_DOOR: return gszActionItemDesc[ ACTIONITEM_OPEN ];
|
||||
case ACTION_ITEM_CLOSE_DOOR: return gszActionItemDesc[ ACTIONITEM_CLOSE ];
|
||||
@@ -111,7 +111,7 @@ const STR16 GetActionItemName( OBJECTTYPE *pItem )
|
||||
default: return NULL;
|
||||
}
|
||||
}
|
||||
else switch( pItem->usBombItem )
|
||||
else switch( pItem->ItemData.Trigger.usBombItem )
|
||||
{
|
||||
case STUN_GRENADE: return gszActionItemDesc[ ACTIONITEM_STUN ];
|
||||
case SMOKE_GRENADE: return gszActionItemDesc[ ACTIONITEM_SMOKE ];
|
||||
@@ -535,7 +535,7 @@ void UpdateItemStatsPanel()
|
||||
case EDITING_TRIGGERS:
|
||||
mprintf( iScreenWidthOffset + 512, 2 * iScreenHeightOffset + 369, L"Trap Level");
|
||||
mprintf( iScreenWidthOffset + 512, 2 * iScreenHeightOffset + 389, L"Tolerance" );
|
||||
if( gpEditingItemPool && gpItem->bFrequency >= PANIC_FREQUENCY_3 && gpItem->bFrequency <= PANIC_FREQUENCY )
|
||||
if( gpEditingItemPool && gpItem->ItemData.Trigger.BombTrigger.bFrequency >= PANIC_FREQUENCY_3 && gpItem->ItemData.Trigger.BombTrigger.bFrequency <= PANIC_FREQUENCY )
|
||||
mprintf( iScreenWidthOffset + 500, 2 * iScreenHeightOffset + 407, L"Alarm Trigger" );
|
||||
break;
|
||||
}
|
||||
@@ -644,9 +644,9 @@ void SetupGunGUI()
|
||||
CHAR16 str[20];
|
||||
INT16 yp;
|
||||
memset( gfAttachment, 0, NUM_ATTACHMENT_BUTTONS );
|
||||
swprintf( str, L"%d", gpItem->bGunStatus );
|
||||
swprintf( str, L"%d", gpItem->ItemData.Gun.bGunStatus );
|
||||
AddTextInputField( iScreenWidthOffset + 485, 2 * iScreenHeightOffset + 380, 25, 15, MSYS_PRIORITY_NORMAL, str, 3, INPUTTYPE_NUMERICSTRICT );
|
||||
swprintf( str, L"%d", gpItem->ubGunShotsLeft );
|
||||
swprintf( str, L"%d", gpItem->ItemData.Gun.ubGunShotsLeft );
|
||||
AddTextInputField( iScreenWidthOffset + 485, 2 * iScreenHeightOffset + 400, 25, 15, MSYS_PRIORITY_NORMAL, str, 3, INPUTTYPE_NUMERICSTRICT );
|
||||
swprintf( str, L"%d", gpItem->bTrap );
|
||||
AddTextInputField( iScreenWidthOffset + 485, 2 * iScreenHeightOffset + 420, 25, 15, MSYS_PRIORITY_NORMAL, str, 2, INPUTTYPE_NUMERICSTRICT );
|
||||
@@ -761,7 +761,7 @@ void ExtractAndUpdateGunGUI()
|
||||
i = 20 + Random( 81 );
|
||||
else
|
||||
i = min( i, 100 );
|
||||
gpItem->bGunStatus = (INT8)i;
|
||||
gpItem->ItemData.Gun.bGunStatus = (INT8)i;
|
||||
SetInputFieldStringWithNumericStrictValue( 1, i );
|
||||
//Update the ammo
|
||||
i = GetNumericStrictValueFromField( 2 );
|
||||
@@ -769,7 +769,7 @@ void ExtractAndUpdateGunGUI()
|
||||
i = Random( 1 + Weapon[ gpItem->usItem ].ubMagSize );
|
||||
else
|
||||
i = min( i, Weapon[ gpItem->usItem ].ubMagSize );
|
||||
gpItem->ubGunShotsLeft = (UINT8)i;
|
||||
gpItem->ItemData.Gun.ubGunShotsLeft = (UINT8)i;
|
||||
SetInputFieldStringWithNumericStrictValue( 2, i );
|
||||
//Update the trap level
|
||||
i = GetNumericStrictValueFromField( 3 );
|
||||
@@ -833,7 +833,7 @@ void ExtractAndUpdateAmmoGUI()
|
||||
void SetupArmourGUI()
|
||||
{
|
||||
CHAR16 str[20];
|
||||
swprintf( str, L"%d", gpItem->bStatus[0] );
|
||||
swprintf( str, L"%d", gpItem->ItemData.Generic.bStatus[0] );
|
||||
AddTextInputField( iScreenWidthOffset + 485, 2 * iScreenHeightOffset + 380, 25, 15, MSYS_PRIORITY_NORMAL, str, 3, INPUTTYPE_NUMERICSTRICT );
|
||||
swprintf( str, L"%d", gpItem->bTrap );
|
||||
AddTextInputField( iScreenWidthOffset + 485, 2 * iScreenHeightOffset + 400, 25, 15, MSYS_PRIORITY_NORMAL, str, 2, INPUTTYPE_NUMERICSTRICT );
|
||||
@@ -875,7 +875,7 @@ void ExtractAndUpdateArmourGUI()
|
||||
i = 20 + Random( 81 );
|
||||
else
|
||||
i = min( i, 100 );
|
||||
gpItem->bStatus[0] = (INT8)i;
|
||||
gpItem->ItemData.Generic.bStatus[0] = (INT8)i;
|
||||
SetInputFieldStringWithNumericStrictValue( 1, i );
|
||||
//Update the trap level
|
||||
i = GetNumericStrictValueFromField( 2 );
|
||||
@@ -894,7 +894,7 @@ void ExtractAndUpdateArmourGUI()
|
||||
void SetupEquipGUI()
|
||||
{
|
||||
CHAR16 str[20];
|
||||
swprintf( str, L"%d", gpItem->bStatus[0] );
|
||||
swprintf( str, L"%d", gpItem->ItemData.Generic.bStatus[0] );
|
||||
AddTextInputField( iScreenWidthOffset + 485, 2 * iScreenHeightOffset + 380, 25, 15, MSYS_PRIORITY_NORMAL, str, 3, INPUTTYPE_NUMERICSTRICT );
|
||||
swprintf( str, L"%d", gpItem->bTrap );
|
||||
AddTextInputField( iScreenWidthOffset + 485, 2 * iScreenHeightOffset + 400, 25, 15, MSYS_PRIORITY_NORMAL, str, 2, INPUTTYPE_NUMERICSTRICT );
|
||||
@@ -919,7 +919,7 @@ void ExtractAndUpdateEquipGUI()
|
||||
i = 20 + Random( 81 );
|
||||
else
|
||||
i = min( i, 100 );
|
||||
gpItem->bStatus[0] = (INT8)i;
|
||||
gpItem->ItemData.Generic.bStatus[0] = (INT8)i;
|
||||
SetInputFieldStringWithNumericStrictValue( 1, i );
|
||||
//Update the trap level
|
||||
i = GetNumericStrictValueFromField( 2 );
|
||||
@@ -939,7 +939,7 @@ void SetupExplosivesGUI()
|
||||
{
|
||||
CHAR16 str[20];
|
||||
INT16 yp;
|
||||
swprintf( str, L"%d", gpItem->bStatus[0] );
|
||||
swprintf( str, L"%d", gpItem->ItemData.Generic.bStatus[0] );
|
||||
AddTextInputField( iScreenWidthOffset + 485, 2 * iScreenHeightOffset + 380, 25, 15, MSYS_PRIORITY_NORMAL, str, 3, INPUTTYPE_NUMERICSTRICT );
|
||||
swprintf( str, L"%d", gpItem->ubNumberOfObjects );
|
||||
AddTextInputField( iScreenWidthOffset + 485, 2 * iScreenHeightOffset + 400, 25, 15, MSYS_PRIORITY_NORMAL, str, 1, INPUTTYPE_NUMERICSTRICT );
|
||||
@@ -989,7 +989,7 @@ void ExtractAndUpdateExplosivesGUI()
|
||||
i = 20 + Random( 81 );
|
||||
else
|
||||
i = min( i, 100 );
|
||||
gpItem->bStatus[0] = (INT8)i;
|
||||
gpItem->ItemData.Generic.bStatus[0] = (INT8)i;
|
||||
SetInputFieldStringWithNumericStrictValue( 1, i );
|
||||
//Update the quantity
|
||||
if( Item[ gpItem->usItem ].ubPerPocket > 1 )
|
||||
@@ -1001,7 +1001,7 @@ void ExtractAndUpdateExplosivesGUI()
|
||||
i = max( 1, min( i, Item[ gpItem->usItem ].ubPerPocket ) );
|
||||
gpItem->ubNumberOfObjects = (UINT8)i;
|
||||
SetInputFieldStringWithNumericStrictValue( 2, i );
|
||||
CreateItems( gpItem->usItem, gpItem->bStatus[0], gpItem->ubNumberOfObjects, gpItem );
|
||||
CreateItems( gpItem->usItem, gpItem->ItemData.Generic.bStatus[0], gpItem->ubNumberOfObjects, gpItem );
|
||||
}
|
||||
//Update the trap level
|
||||
i = GetNumericStrictValueFromField( 3 );
|
||||
@@ -1020,7 +1020,7 @@ void ExtractAndUpdateExplosivesGUI()
|
||||
void SetupMoneyGUI()
|
||||
{
|
||||
CHAR16 str[20];
|
||||
swprintf( str, L"%d", gpItem->uiMoneyAmount );
|
||||
swprintf( str, L"%d", gpItem->ItemData.Money.uiMoneyAmount );
|
||||
AddTextInputField( iScreenWidthOffset + 485, 2 * iScreenHeightOffset + 380, 45, 15, MSYS_PRIORITY_NORMAL, str, 5, INPUTTYPE_NUMERICSTRICT );
|
||||
if( gpEditingItemPool )
|
||||
{
|
||||
@@ -1038,8 +1038,8 @@ void ExtractAndUpdateMoneyGUI()
|
||||
i = Random( 20000 );
|
||||
else
|
||||
i = max( 1, min( i, 20000 ) );
|
||||
gpItem->uiMoneyAmount = i;
|
||||
gpItem->bStatus[0] = 100;
|
||||
gpItem->ItemData.Money.uiMoneyAmount = i;
|
||||
gpItem->ItemData.Money.bMoneyStatus = 100;
|
||||
SetInputFieldStringWithNumericStrictValue( 1, i );
|
||||
if( gpEditingItemPool )
|
||||
{
|
||||
@@ -1058,10 +1058,10 @@ void RemoveMoneyGUI()
|
||||
void SetupOwnershipGUI()
|
||||
{
|
||||
CHAR16 str[20];
|
||||
swprintf( str, L"%d", gpItem->ubOwnerProfile );
|
||||
swprintf( str, L"%d", gpItem->ItemData.Owner.ubOwnerProfile );
|
||||
AddTextInputField( iScreenWidthOffset + 485, 2 * iScreenHeightOffset + 380, 25, 15, MSYS_PRIORITY_NORMAL, str, 3, INPUTTYPE_NUMERICSTRICT );
|
||||
giOwnershipGroupButton =
|
||||
CreateTextButton( gszCivGroupNames[ gpItem->ubOwnerCivGroup ], SMALLCOMPFONT, FONT_YELLOW, FONT_BLACK, BUTTON_USE_DEFAULT,
|
||||
CreateTextButton( gszCivGroupNames[ gpItem->ItemData.Owner.ubOwnerCivGroup ], SMALLCOMPFONT, FONT_YELLOW, FONT_BLACK, BUTTON_USE_DEFAULT,
|
||||
iScreenWidthOffset + 485, 2 * iScreenHeightOffset + 415, 80, 25, BUTTON_TOGGLE, MSYS_PRIORITY_NORMAL, DEFAULT_MOVE_CALLBACK, OwnershipGroupButtonCallback );
|
||||
}
|
||||
|
||||
@@ -1075,7 +1075,7 @@ void OwnershipGroupButtonCallback( GUI_BUTTON *btn, INT32 reason )
|
||||
|
||||
void SetOwnershipGroup( UINT8 ubNewGroup )
|
||||
{
|
||||
gpItem->ubOwnerCivGroup = ubNewGroup;
|
||||
gpItem->ItemData.Owner.ubOwnerCivGroup = ubNewGroup;
|
||||
SpecifyButtonText( giOwnershipGroupButton, gszCivGroupNames[ ubNewGroup ] );
|
||||
}
|
||||
|
||||
@@ -1088,7 +1088,7 @@ void ExtractAndUpdateOwnershipGUI()
|
||||
i = Random( 0 );
|
||||
else
|
||||
i = max( 0, min( i, 255 ) );
|
||||
gpItem->ubOwnerProfile = (UINT8)i;
|
||||
gpItem->ItemData.Owner.ubOwnerProfile = (UINT8)i;
|
||||
SetInputFieldStringWithNumericStrictValue( 1, i );
|
||||
}
|
||||
|
||||
@@ -1131,7 +1131,7 @@ void SetupActionItemsGUI()
|
||||
{
|
||||
CHAR16 str[4];
|
||||
STR16 pStr;
|
||||
swprintf( str, L"%d", gpItem->bStatus[0] );
|
||||
swprintf( str, L"%d", gpItem->ItemData.Generic.bStatus[0] );
|
||||
AddTextInputField( iScreenWidthOffset + 485, 2 * iScreenHeightOffset + 365, 25, 15, MSYS_PRIORITY_NORMAL, str, 3, INPUTTYPE_NUMERICSTRICT );
|
||||
swprintf( str, L"%d", gpItem->bTrap );
|
||||
AddTextInputField( iScreenWidthOffset + 485, 2 * iScreenHeightOffset + 385, 25, 15, MSYS_PRIORITY_NORMAL, str, 2, INPUTTYPE_NUMERICSTRICT );
|
||||
@@ -1155,7 +1155,7 @@ void ExtractAndUpdateActionItemsGUI()
|
||||
i = 20 + Random( 81 );
|
||||
else
|
||||
i = min( i, 100 );
|
||||
gpItem->bStatus[0] = (INT8)i;
|
||||
gpItem->ItemData.Generic.bStatus[0] = (INT8)i;
|
||||
SetInputFieldStringWithNumericStrictValue( 1, i );
|
||||
//Update the trap level
|
||||
i = GetNumericStrictValueFromField( 2 );
|
||||
@@ -1199,13 +1199,13 @@ void SetupTriggersGUI()
|
||||
CHAR16 str[4];
|
||||
swprintf( str, L"%d", gpItem->bTrap );
|
||||
AddTextInputField( iScreenWidthOffset + 485, 2 * iScreenHeightOffset + 365, 25, 15, MSYS_PRIORITY_NORMAL, str, 3, INPUTTYPE_NUMERICSTRICT );
|
||||
swprintf( str, L"%d", gpItem->ubTolerance );
|
||||
swprintf( str, L"%d", gpItem->ItemData.Trigger.Area.ubTolerance );
|
||||
AddTextInputField( iScreenWidthOffset + 485, 2 * iScreenHeightOffset + 385, 25, 15, MSYS_PRIORITY_NORMAL, str, 3, INPUTTYPE_NUMERICSTRICT );
|
||||
if( gpEditingItemPool )
|
||||
{
|
||||
swprintf( str, L"%d", 100 - gWorldItems[ gpEditingItemPool->iItemIndex ].ubNonExistChance );
|
||||
AddTextInputField( iScreenWidthOffset + 485, 2 * iScreenHeightOffset + 440, 25, 15, MSYS_PRIORITY_NORMAL, str, 3, INPUTTYPE_NUMERICSTRICT );
|
||||
if( gpItem->bFrequency <= PANIC_FREQUENCY && gpItem->bFrequency >= PANIC_FREQUENCY_3 )
|
||||
if( gpItem->ItemData.Trigger.BombTrigger.bFrequency <= PANIC_FREQUENCY && gpItem->ItemData.Trigger.BombTrigger.bFrequency >= PANIC_FREQUENCY_3 )
|
||||
{
|
||||
giAlarmTriggerButton =
|
||||
CreateCheckBoxButton( iScreenWidthOffset + 485, 2 * iScreenHeightOffset + 405, "EDITOR//smCheckBox.sti", MSYS_PRIORITY_NORMAL, AlarmTriggerCheckboxCallback );
|
||||
@@ -1227,7 +1227,7 @@ void ExtractAndUpdateTriggersGUI()
|
||||
|
||||
i = GetNumericStrictValueFromField( 2 );
|
||||
i = ( i == -1 ) ? 0 : max( 0, min( i, 99 ) );
|
||||
gpItem->ubTolerance = (UINT8)i;
|
||||
gpItem->ItemData.Trigger.Area.ubTolerance = (UINT8)i;
|
||||
SetInputFieldStringWithNumericStrictValue( 2, i );
|
||||
|
||||
if( gpEditingItemPool )
|
||||
@@ -1241,7 +1241,7 @@ void ExtractAndUpdateTriggersGUI()
|
||||
|
||||
void RemoveTriggersGUI()
|
||||
{
|
||||
if( gpEditingItemPool && gpItem->bFrequency <= PANIC_FREQUENCY && gpItem->bFrequency >= PANIC_FREQUENCY_3 )
|
||||
if( gpEditingItemPool && gpItem->ItemData.Trigger.BombTrigger.bFrequency <= PANIC_FREQUENCY && gpItem->ItemData.Trigger.BombTrigger.bFrequency >= PANIC_FREQUENCY_3 )
|
||||
{
|
||||
if( giAlarmTriggerButton != -1 )
|
||||
{
|
||||
@@ -1276,7 +1276,7 @@ void ToggleAttachment( GUI_BUTTON *btn, INT32 reason )
|
||||
{
|
||||
gfAttachment[ i ] = TRUE;
|
||||
btn->uiFlags |= BUTTON_CLICKED_ON;
|
||||
CreateItem( usAttachment, gpItem->bGunStatus, &temp );
|
||||
CreateItem( usAttachment, gpItem->ItemData.Gun.bGunStatus, &temp );
|
||||
AttachObject( NULL, gpItem, &temp );
|
||||
}
|
||||
else
|
||||
@@ -1303,7 +1303,7 @@ void ToggleCeramicPlates( GUI_BUTTON *btn, INT32 reason )
|
||||
if( gfCeramicPlates )
|
||||
{
|
||||
btn->uiFlags |= BUTTON_CLICKED_ON;
|
||||
CreateItem( CERAMIC_PLATES, gpItem->bStatus[0], &temp );
|
||||
CreateItem( CERAMIC_PLATES, gpItem->ItemData.Generic.bStatus[0], &temp );
|
||||
AttachObject( NULL, gpItem, &temp );
|
||||
}
|
||||
else
|
||||
@@ -1326,7 +1326,7 @@ void ToggleDetonator( GUI_BUTTON *btn, INT32 reason )
|
||||
{
|
||||
gfDetonator = TRUE;
|
||||
btn->uiFlags |= BUTTON_CLICKED_ON;
|
||||
CreateItem( DETONATOR, gpItem->bStatus[0], &temp );
|
||||
CreateItem( DETONATOR, gpItem->ItemData.Generic.bStatus[0], &temp );
|
||||
AttachObject( NULL, gpItem, &temp );
|
||||
}
|
||||
else
|
||||
@@ -1352,133 +1352,133 @@ void ActionItemCallback( GUI_BUTTON *btn, INT32 reason )
|
||||
void ChangeActionItem( OBJECTTYPE *pItem, INT8 bActionItemIndex )
|
||||
{
|
||||
pItem->usItem = ACTION_ITEM;
|
||||
pItem->bActionValue = ACTION_ITEM_BLOW_UP;
|
||||
pItem->ItemData.Trigger.bActionValue = ACTION_ITEM_BLOW_UP;
|
||||
switch( bActionItemIndex )
|
||||
{
|
||||
case ACTIONITEM_TRIP_KLAXON:
|
||||
pItem->usBombItem = TRIP_KLAXON;
|
||||
pItem->ItemData.Trigger.usBombItem = TRIP_KLAXON;
|
||||
break;
|
||||
case ACTIONITEM_FLARE:
|
||||
pItem->usBombItem = TRIP_FLARE;
|
||||
pItem->ItemData.Trigger.usBombItem = TRIP_FLARE;
|
||||
break;
|
||||
case ACTIONITEM_TEARGAS:
|
||||
pItem->usBombItem = TEARGAS_GRENADE;
|
||||
pItem->ItemData.Trigger.usBombItem = TEARGAS_GRENADE;
|
||||
break;
|
||||
case ACTIONITEM_STUN:
|
||||
pItem->usBombItem = STUN_GRENADE;
|
||||
pItem->ItemData.Trigger.usBombItem = STUN_GRENADE;
|
||||
break;
|
||||
case ACTIONITEM_SMOKE:
|
||||
pItem->usBombItem = SMOKE_GRENADE;
|
||||
pItem->ItemData.Trigger.usBombItem = SMOKE_GRENADE;
|
||||
break;
|
||||
case ACTIONITEM_MUSTARD:
|
||||
pItem->usBombItem = MUSTARD_GRENADE;
|
||||
pItem->ItemData.Trigger.usBombItem = MUSTARD_GRENADE;
|
||||
break;
|
||||
case ACTIONITEM_MINE:
|
||||
pItem->usBombItem = MINE;
|
||||
pItem->ItemData.Trigger.usBombItem = MINE;
|
||||
break;
|
||||
case ACTIONITEM_OPEN:
|
||||
pItem->usBombItem = NOTHING;
|
||||
pItem->bActionValue = ACTION_ITEM_OPEN_DOOR;
|
||||
pItem->ItemData.Trigger.usBombItem = NOTHING;
|
||||
pItem->ItemData.Trigger.bActionValue = ACTION_ITEM_OPEN_DOOR;
|
||||
break;
|
||||
case ACTIONITEM_CLOSE:
|
||||
pItem->usBombItem = NOTHING;
|
||||
pItem->bActionValue = ACTION_ITEM_CLOSE_DOOR;
|
||||
pItem->ItemData.Trigger.usBombItem = NOTHING;
|
||||
pItem->ItemData.Trigger.bActionValue = ACTION_ITEM_CLOSE_DOOR;
|
||||
break;
|
||||
case ACTIONITEM_UNLOCK_DOOR:
|
||||
pItem->usBombItem = NOTHING;
|
||||
pItem->bActionValue = ACTION_ITEM_UNLOCK_DOOR;
|
||||
pItem->ItemData.Trigger.usBombItem = NOTHING;
|
||||
pItem->ItemData.Trigger.bActionValue = ACTION_ITEM_UNLOCK_DOOR;
|
||||
break;
|
||||
case ACTIONITEM_TOGGLE_LOCK:
|
||||
pItem->usBombItem = NOTHING;
|
||||
pItem->bActionValue = ACTION_ITEM_TOGGLE_LOCK;
|
||||
pItem->ItemData.Trigger.usBombItem = NOTHING;
|
||||
pItem->ItemData.Trigger.bActionValue = ACTION_ITEM_TOGGLE_LOCK;
|
||||
break;
|
||||
case ACTIONITEM_UNTRAP_DOOR:
|
||||
pItem->usBombItem = NOTHING;
|
||||
pItem->bActionValue = ACTION_ITEM_UNTRAP_DOOR;
|
||||
pItem->ItemData.Trigger.usBombItem = NOTHING;
|
||||
pItem->ItemData.Trigger.bActionValue = ACTION_ITEM_UNTRAP_DOOR;
|
||||
break;
|
||||
case ACTIONITEM_TOGGLE_PRESSURE_ITEMS:
|
||||
pItem->usBombItem = NOTHING;
|
||||
pItem->bActionValue = ACTION_ITEM_TOGGLE_PRESSURE_ITEMS;
|
||||
pItem->ItemData.Trigger.usBombItem = NOTHING;
|
||||
pItem->ItemData.Trigger.bActionValue = ACTION_ITEM_TOGGLE_PRESSURE_ITEMS;
|
||||
break;
|
||||
case ACTIONITEM_SMPIT:
|
||||
pItem->usBombItem = NOTHING;
|
||||
pItem->bActionValue = ACTION_ITEM_SMALL_PIT;
|
||||
pItem->ItemData.Trigger.usBombItem = NOTHING;
|
||||
pItem->ItemData.Trigger.bActionValue = ACTION_ITEM_SMALL_PIT;
|
||||
break;
|
||||
case ACTIONITEM_LGPIT:
|
||||
pItem->usBombItem = NOTHING;
|
||||
pItem->bActionValue = ACTION_ITEM_LARGE_PIT;
|
||||
pItem->ItemData.Trigger.usBombItem = NOTHING;
|
||||
pItem->ItemData.Trigger.bActionValue = ACTION_ITEM_LARGE_PIT;
|
||||
break;
|
||||
case ACTIONITEM_TOGGLE_DOOR:
|
||||
pItem->usBombItem = NOTHING;
|
||||
pItem->bActionValue = ACTION_ITEM_TOGGLE_DOOR;
|
||||
pItem->ItemData.Trigger.usBombItem = NOTHING;
|
||||
pItem->ItemData.Trigger.bActionValue = ACTION_ITEM_TOGGLE_DOOR;
|
||||
break;
|
||||
case ACTIONITEM_TOGGLE_ACTION1:
|
||||
pItem->usBombItem = NOTHING;
|
||||
pItem->bActionValue = ACTION_ITEM_TOGGLE_ACTION1;
|
||||
pItem->ItemData.Trigger.usBombItem = NOTHING;
|
||||
pItem->ItemData.Trigger.bActionValue = ACTION_ITEM_TOGGLE_ACTION1;
|
||||
break;
|
||||
case ACTIONITEM_TOGGLE_ACTION2:
|
||||
pItem->usBombItem = NOTHING;
|
||||
pItem->bActionValue = ACTION_ITEM_TOGGLE_ACTION2;
|
||||
pItem->ItemData.Trigger.usBombItem = NOTHING;
|
||||
pItem->ItemData.Trigger.bActionValue = ACTION_ITEM_TOGGLE_ACTION2;
|
||||
break;
|
||||
case ACTIONITEM_TOGGLE_ACTION3:
|
||||
pItem->usBombItem = NOTHING;
|
||||
pItem->bActionValue = ACTION_ITEM_TOGGLE_ACTION3;
|
||||
pItem->ItemData.Trigger.usBombItem = NOTHING;
|
||||
pItem->ItemData.Trigger.bActionValue = ACTION_ITEM_TOGGLE_ACTION3;
|
||||
break;
|
||||
case ACTIONITEM_TOGGLE_ACTION4:
|
||||
pItem->usBombItem = NOTHING;
|
||||
pItem->bActionValue = ACTION_ITEM_TOGGLE_ACTION4;
|
||||
pItem->ItemData.Trigger.usBombItem = NOTHING;
|
||||
pItem->ItemData.Trigger.bActionValue = ACTION_ITEM_TOGGLE_ACTION4;
|
||||
break;
|
||||
case ACTIONITEM_ENTER_BROTHEL:
|
||||
pItem->usBombItem = NOTHING;
|
||||
pItem->bActionValue = ACTION_ITEM_ENTER_BROTHEL;
|
||||
pItem->ItemData.Trigger.usBombItem = NOTHING;
|
||||
pItem->ItemData.Trigger.bActionValue = ACTION_ITEM_ENTER_BROTHEL;
|
||||
break;
|
||||
case ACTIONITEM_EXIT_BROTHEL:
|
||||
pItem->usBombItem = NOTHING;
|
||||
pItem->bActionValue = ACTION_ITEM_EXIT_BROTHEL;
|
||||
pItem->ItemData.Trigger.usBombItem = NOTHING;
|
||||
pItem->ItemData.Trigger.bActionValue = ACTION_ITEM_EXIT_BROTHEL;
|
||||
break;
|
||||
case ACTIONITEM_KINGPIN_ALARM:
|
||||
pItem->usBombItem = NOTHING;
|
||||
pItem->bActionValue = ACTION_ITEM_KINGPIN_ALARM;
|
||||
pItem->ItemData.Trigger.usBombItem = NOTHING;
|
||||
pItem->ItemData.Trigger.bActionValue = ACTION_ITEM_KINGPIN_ALARM;
|
||||
break;
|
||||
case ACTIONITEM_SEX:
|
||||
pItem->usBombItem = NOTHING;
|
||||
pItem->bActionValue = ACTION_ITEM_SEX;
|
||||
pItem->ItemData.Trigger.usBombItem = NOTHING;
|
||||
pItem->ItemData.Trigger.bActionValue = ACTION_ITEM_SEX;
|
||||
break;
|
||||
case ACTIONITEM_REVEAL_ROOM:
|
||||
pItem->usBombItem = NOTHING;
|
||||
pItem->bActionValue = ACTION_ITEM_REVEAL_ROOM;
|
||||
pItem->ItemData.Trigger.usBombItem = NOTHING;
|
||||
pItem->ItemData.Trigger.bActionValue = ACTION_ITEM_REVEAL_ROOM;
|
||||
break;
|
||||
case ACTIONITEM_LOCAL_ALARM:
|
||||
pItem->usBombItem = NOTHING;
|
||||
pItem->bActionValue = ACTION_ITEM_LOCAL_ALARM;
|
||||
pItem->ItemData.Trigger.usBombItem = NOTHING;
|
||||
pItem->ItemData.Trigger.bActionValue = ACTION_ITEM_LOCAL_ALARM;
|
||||
break;
|
||||
case ACTIONITEM_GLOBAL_ALARM:
|
||||
pItem->usBombItem = NOTHING;
|
||||
pItem->bActionValue = ACTION_ITEM_GLOBAL_ALARM;
|
||||
pItem->ItemData.Trigger.usBombItem = NOTHING;
|
||||
pItem->ItemData.Trigger.bActionValue = ACTION_ITEM_GLOBAL_ALARM;
|
||||
break;
|
||||
case ACTIONITEM_KLAXON:
|
||||
pItem->usBombItem = NOTHING;
|
||||
pItem->bActionValue = ACTION_ITEM_KLAXON;
|
||||
pItem->ItemData.Trigger.usBombItem = NOTHING;
|
||||
pItem->ItemData.Trigger.bActionValue = ACTION_ITEM_KLAXON;
|
||||
break;
|
||||
case ACTIONITEM_SMALL:
|
||||
pItem->usBombItem = HAND_GRENADE;
|
||||
pItem->ItemData.Trigger.usBombItem = HAND_GRENADE;
|
||||
break;
|
||||
case ACTIONITEM_MEDIUM:
|
||||
pItem->usBombItem = TNT;
|
||||
pItem->ItemData.Trigger.usBombItem = TNT;
|
||||
break;
|
||||
case ACTIONITEM_LARGE:
|
||||
pItem->usBombItem = C4;
|
||||
pItem->ItemData.Trigger.usBombItem = C4;
|
||||
break;
|
||||
case ACTIONITEM_MUSEUM_ALARM:
|
||||
pItem->usBombItem = NOTHING;
|
||||
pItem->bActionValue = ACTION_ITEM_MUSEUM_ALARM;
|
||||
pItem->ItemData.Trigger.usBombItem = NOTHING;
|
||||
pItem->ItemData.Trigger.bActionValue = ACTION_ITEM_MUSEUM_ALARM;
|
||||
break;
|
||||
case ACTIONITEM_BLOODCAT_ALARM:
|
||||
pItem->usBombItem = NOTHING;
|
||||
pItem->bActionValue = ACTION_ITEM_BLOODCAT_ALARM;
|
||||
pItem->ItemData.Trigger.usBombItem = NOTHING;
|
||||
pItem->ItemData.Trigger.bActionValue = ACTION_ITEM_BLOODCAT_ALARM;
|
||||
break;
|
||||
case ACTIONITEM_BIG_TEAR_GAS:
|
||||
pItem->usBombItem = BIG_TEAR_GAS;
|
||||
pItem->ItemData.Trigger.usBombItem = BIG_TEAR_GAS;
|
||||
break;
|
||||
|
||||
}
|
||||
@@ -1494,9 +1494,9 @@ void UpdateActionItem( INT8 bActionItemIndex )
|
||||
//If the previous item was a pit, remove it before changing it
|
||||
if( gpItem->usItem == ACTION_ITEM )
|
||||
{
|
||||
if( gpItem->bActionValue == ACTION_ITEM_SMALL_PIT )
|
||||
if( gpItem->ItemData.Trigger.bActionValue == ACTION_ITEM_SMALL_PIT )
|
||||
Remove3X3Pit( gWorldItems[ gpItemPool->iItemIndex ].sGridNo );
|
||||
else if( gpItem->bActionValue == ACTION_ITEM_LARGE_PIT )
|
||||
else if( gpItem->ItemData.Trigger.bActionValue == ACTION_ITEM_LARGE_PIT )
|
||||
Remove5X5Pit( gWorldItems[ gpItemPool->iItemIndex ].sGridNo );
|
||||
}
|
||||
|
||||
@@ -1506,9 +1506,9 @@ void UpdateActionItem( INT8 bActionItemIndex )
|
||||
//If the new item is a pit, add it so we can see how it looks.
|
||||
if( gpItem->usItem == ACTION_ITEM )
|
||||
{
|
||||
if( gpItem->bActionValue == ACTION_ITEM_SMALL_PIT )
|
||||
if( gpItem->ItemData.Trigger.bActionValue == ACTION_ITEM_SMALL_PIT )
|
||||
Add3X3Pit( gWorldItems[ gpItemPool->iItemIndex ].sGridNo );
|
||||
else if( gpItem->bActionValue == ACTION_ITEM_LARGE_PIT )
|
||||
else if( gpItem->ItemData.Trigger.bActionValue == ACTION_ITEM_LARGE_PIT )
|
||||
Add5X5Pit( gWorldItems[ gpItemPool->iItemIndex ].sGridNo );
|
||||
}
|
||||
}
|
||||
|
||||
+11
-11
@@ -715,21 +715,21 @@ void RenderItemDetails()
|
||||
gubSummaryItemMode == ITEMMODE_REAL && !(gpWorldItemsSummaryArray[ i ].usFlags & WORLD_ITEM_SCIFI_ONLY) )
|
||||
{
|
||||
pItem = &gpWorldItemsSummaryArray[ i ].o;
|
||||
if( !pItem->bFrequency )
|
||||
if( !pItem->ItemData.Trigger.BombTrigger.bFrequency )
|
||||
bFreqIndex = 7;
|
||||
else if( pItem->bFrequency == PANIC_FREQUENCY )
|
||||
else if( pItem->ItemData.Trigger.BombTrigger.bFrequency == PANIC_FREQUENCY )
|
||||
bFreqIndex = 0;
|
||||
else if( pItem->bFrequency == PANIC_FREQUENCY_2 )
|
||||
else if( pItem->ItemData.Trigger.BombTrigger.bFrequency == PANIC_FREQUENCY_2 )
|
||||
bFreqIndex = 1;
|
||||
else if( pItem->bFrequency == PANIC_FREQUENCY_3 )
|
||||
else if( pItem->ItemData.Trigger.BombTrigger.bFrequency == PANIC_FREQUENCY_3 )
|
||||
bFreqIndex = 2;
|
||||
else if( pItem->bFrequency == FIRST_MAP_PLACED_FREQUENCY + 1 )
|
||||
else if( pItem->ItemData.Trigger.BombTrigger.bFrequency == FIRST_MAP_PLACED_FREQUENCY + 1 )
|
||||
bFreqIndex = 3;
|
||||
else if( pItem->bFrequency == FIRST_MAP_PLACED_FREQUENCY + 2 )
|
||||
else if( pItem->ItemData.Trigger.BombTrigger.bFrequency == FIRST_MAP_PLACED_FREQUENCY + 2 )
|
||||
bFreqIndex = 4;
|
||||
else if( pItem->bFrequency == FIRST_MAP_PLACED_FREQUENCY + 3 )
|
||||
else if( pItem->ItemData.Trigger.BombTrigger.bFrequency == FIRST_MAP_PLACED_FREQUENCY + 3 )
|
||||
bFreqIndex = 5;
|
||||
else if( pItem->bFrequency == FIRST_MAP_PLACED_FREQUENCY + 4 )
|
||||
else if( pItem->ItemData.Trigger.BombTrigger.bFrequency == FIRST_MAP_PLACED_FREQUENCY + 4 )
|
||||
bFreqIndex = 6;
|
||||
else
|
||||
continue;
|
||||
@@ -754,7 +754,7 @@ void RenderItemDetails()
|
||||
{
|
||||
pItem = &gpWorldItemsSummaryArray[ i ].o;
|
||||
uiExistChance += (100 - gpWorldItemsSummaryArray[ i ].ubNonExistChance) * pItem->ubNumberOfObjects;
|
||||
uiStatus += pItem->bStatus[0];
|
||||
uiStatus += pItem->ItemData.Generic.bStatus[0];
|
||||
uiQuantity += pItem->ubNumberOfObjects;
|
||||
}
|
||||
}
|
||||
@@ -862,7 +862,7 @@ void RenderItemDetails()
|
||||
{
|
||||
pItem = &gpPEnemyItemsSummaryArray[ i ];
|
||||
uiExistChance += 100 * pItem->ubNumberOfObjects;
|
||||
uiStatus += pItem->bStatus[0];
|
||||
uiStatus += pItem->ItemData.Generic.bStatus[0];
|
||||
uiQuantity += pItem->ubNumberOfObjects;
|
||||
}
|
||||
}
|
||||
@@ -934,7 +934,7 @@ void RenderItemDetails()
|
||||
{
|
||||
pItem = &gpNEnemyItemsSummaryArray[ i ];
|
||||
uiExistChance += 100 * pItem->ubNumberOfObjects;
|
||||
uiStatus += pItem->bStatus[0];
|
||||
uiStatus += pItem->ItemData.Generic.bStatus[0];
|
||||
uiQuantity += pItem->ubNumberOfObjects;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user