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:
Overhaul
2007-08-18 19:03:20 +00:00
parent 29b883f59d
commit fccef1faea
60 changed files with 921 additions and 887 deletions
+93 -93
View File
@@ -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 );
}
}