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
+10 -10
View File
@@ -189,7 +189,7 @@ void BobbyRayPurchaseEventCallback( UINT8 ubOrderID )
{
// Empty out the bullets put in by CreateItem(). We now sell all guns empty of bullets. This is done for BobbyR
// simply to be consistent with the dealers in Arulco, who must sell guns empty to prevent ammo cheats by players.
Object.ubGunShotsLeft = 0;
Object.ItemData.Gun.ubGunShotsLeft = 0;
}
ubItemsDelivered = 0;
@@ -220,11 +220,11 @@ void BobbyRayPurchaseEventCallback( UINT8 ubOrderID )
if (usStandardMapPos == LOST_SHIPMENT_GRIDNO)
{
// damage the item a random amount!
Object.bStatus[0] = (INT8) ( ( (70 + Random( 11 )) * (INT32) Object.bStatus[0] ) / 100 );
Object.ItemData.Generic.bStatus[0] = (INT8) ( ( (70 + Random( 11 )) * (INT32) Object.ItemData.Generic.bStatus[0] ) / 100 );
// make damn sure it can't hit 0
if (Object.bStatus[0] == 0)
if (Object.ItemData.Generic.bStatus[0] == 0)
{
Object.bStatus[0] = 1;
Object.ItemData.Generic.bStatus[0] = 1;
}
AddItemToPool( usMapPos, &Object, -1, 0, 0, 0 );
}
@@ -254,11 +254,11 @@ void BobbyRayPurchaseEventCallback( UINT8 ubOrderID )
if (usStandardMapPos == LOST_SHIPMENT_GRIDNO)
{
// damage the item a random amount!
Object.bStatus[0] = (INT8) ( ( (70 + Random( 11 )) * (INT32) Object.bStatus[0] ) / 100 );
Object.ItemData.Generic.bStatus[0] = (INT8) ( ( (70 + Random( 11 )) * (INT32) Object.ItemData.Generic.bStatus[0] ) / 100 );
// make damn sure it can't hit 0
if (Object.bStatus[0] == 0)
if (Object.ItemData.Generic.bStatus[0] == 0)
{
Object.bStatus[0] = 1;
Object.ItemData.Generic.bStatus[0] = 1;
}
memcpy( &pObject[ uiCount ], &Object, sizeof( OBJECTTYPE ) );
uiCount++;
@@ -559,7 +559,7 @@ void CheckForKingpinsMoneyMissing( BOOLEAN fFirstCheck )
// loop through all items, look for ownership
if ( gWorldItems[ uiLoop ].fExists && gWorldItems[ uiLoop ].o.usItem == MONEY )
{
uiTotalCash += gWorldItems[uiLoop].o.uiMoneyAmount;
uiTotalCash += gWorldItems[uiLoop].o.ItemData.Money.uiMoneyAmount;
}
}
@@ -1043,14 +1043,14 @@ void CheckForMissingHospitalSupplies( void )
for ( uiLoop = 0; uiLoop < guiNumWorldItems; uiLoop++ )
{
// loop through all items, look for ownership
if ( gWorldItems[ uiLoop ].fExists && gWorldItems[ uiLoop ].o.usItem == OWNERSHIP && gWorldItems[ uiLoop ].o.ubOwnerCivGroup == DOCTORS_CIV_GROUP )
if ( gWorldItems[ uiLoop ].fExists && gWorldItems[ uiLoop ].o.usItem == OWNERSHIP && gWorldItems[ uiLoop ].o.ItemData.Owner.ubOwnerCivGroup == DOCTORS_CIV_GROUP )
{
GetItemPool( gWorldItems[ uiLoop ].sGridNo, &pItemPool, 0 ) ;
while( pItemPool )
{
pObj = &( gWorldItems[ pItemPool->iItemIndex ].o );
if ( pObj->bStatus[ 0 ] > 60 )
if ( pObj->ItemData.Generic.bStatus[ 0 ] > 60 )
{
if ( Item[pObj->usItem].firstaidkit || Item[pObj->usItem].medicalkit || pObj->usItem == REGEN_BOOSTER || pObj->usItem == ADRENALINE_BOOSTER )
{