- bug fix: invisible enemies

- bug fix: manual reload for two weapons
- bug fix: barrel extender falls off while none is attached


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@382 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
lalien
2006-07-31 19:53:58 +00:00
parent bba67c2082
commit 7a9ea3dbe4
6 changed files with 106 additions and 39 deletions
+2 -2
View File
@@ -23,12 +23,12 @@ INT16 zVersionLabel[256] = { L"Beta v. 0.98" };
#else
//RELEASE BUILD VERSION
INT16 zVersionLabel[256] = { L"Release v1.13.377" };
INT16 zVersionLabel[256] = { L"Release v1.13.382" };
#endif
INT8 czVersionNumber[16] = { "Build 06.07.28" };
INT8 czVersionNumber[16] = { "Build 06.07.31" };
INT16 zTrackingNumber[16] = { L"Z" };
+2 -2
View File
@@ -43,7 +43,7 @@
<Tool
Name="VCLinkerTool"
AdditionalDependencies="libexpatMT.lib mss32.lib winmm.lib smackw32.lib fmodvc.lib"
OutputFile="C:\Games\Jagged Alliance 2 v1.13\ja2_debug_v1.13.368_2006_07_25.exe"
OutputFile="C:\Games\Jagged Alliance 2 v1.13\ja2_debug_v1.13.382_2006_07_31.exe"
LinkIncremental="2"
SuppressStartupBanner="TRUE"
AdditionalLibraryDirectories=".\..\..\Standard Gaming Platform\"
@@ -546,7 +546,7 @@
<Tool
Name="VCLinkerTool"
AdditionalDependencies="libexpatMT.lib winmm.lib smackw32.lib mss32.lib fmodvc.lib"
OutputFile="C:\Games\Jagged Alliance 2 v1.13\ja2_release_v1.13.368_2006_07_25.exe"
OutputFile="C:\Games\Jagged Alliance 2 v1.13\ja2_release_v1.13.382_2006_07_31.exe"
LinkIncremental="1"
SuppressStartupBanner="TRUE"
AdditionalLibraryDirectories=".\..\..\Standard Gaming Platform\"
+32 -3
View File
@@ -2922,9 +2922,9 @@ INT8 FindAmmoToReload( SOLDIERTYPE * pSoldier, INT8 bWeaponIn, INT8 bExcludeSlot
BOOLEAN AutoReload( SOLDIERTYPE * pSoldier )
{
OBJECTTYPE * pObj;
INT8 bSlot, bAPCost;
BOOLEAN fRet;
OBJECTTYPE *pObj, *pObj2;
INT8 bSlot, bAPCost;
BOOLEAN fRet;
CHECKF( pSoldier );
pObj = &(pSoldier->inv[HANDPOS]);
@@ -2938,8 +2938,37 @@ BOOLEAN AutoReload( SOLDIERTYPE * pSoldier )
PlayJA2Sample( Weapon[ Item[pObj->usItem].ubClassIndex ].ManualReloadSound, RATE_11025, SoundVolume( HIGHVOLUME, pSoldier->sGridNo ), 1, SoundDir( pSoldier->sGridNo ) );
if ( IsValidSecondHandShot( pSoldier ) )
{
pObj2 = &(pSoldier->inv[SECONDHANDPOS]);
if (pObj2->ubGunShotsLeft && !(pObj2->ubGunState & GS_CARTRIDGE_IN_CHAMBER) )
{
pObj2->ubGunState |= GS_CARTRIDGE_IN_CHAMBER;
PlayJA2Sample( Weapon[ Item[pObj2->usItem].ubClassIndex ].ManualReloadSound, RATE_11025, SoundVolume( HIGHVOLUME, pSoldier->sGridNo ), 1, SoundDir( pSoldier->sGridNo ) );
}
}
return TRUE;
}
else
{
if ( IsValidSecondHandShot( pSoldier ) )
{
pObj2 = &(pSoldier->inv[SECONDHANDPOS]);
if (pObj2->ubGunShotsLeft && !(pObj2->ubGunState & GS_CARTRIDGE_IN_CHAMBER) )
{
pObj2->ubGunState |= GS_CARTRIDGE_IN_CHAMBER;
DeductPoints(pSoldier, Weapon[Item[(pObj2)->usItem].ubClassIndex].APsToReloadManually, 0);
PlayJA2Sample( Weapon[ Item[pObj2->usItem].ubClassIndex ].ManualReloadSound, RATE_11025, SoundVolume( HIGHVOLUME, pSoldier->sGridNo ), 1, SoundDir( pSoldier->sGridNo ) );
return TRUE;
}
}
}
//</SB>
if (Item[pObj->usItem].usItemClass == IC_GUN || Item[pObj->usItem].usItemClass == IC_LAUNCHER)
+30 -29
View File
@@ -1658,9 +1658,9 @@ BOOLEAN ExecuteOverhead( )
if ( ( GetJA2Clock( ) - guiWaitingForAllMercsToExitTimer ) > 2500 )
{
// OK, set num waiting to 0
#ifdef JA2BETAVERSION
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_DEBUG, L"Waiting too long for Mercs to exit...forcing entry." );
#endif
#ifdef JA2BETAVERSION
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_DEBUG, L"Waiting too long for Mercs to exit...forcing entry." );
#endif
gbNumMercsUntilWaitingOver = 0;
// Reset all waitng codes
@@ -1674,6 +1674,7 @@ BOOLEAN ExecuteOverhead( )
}
}
}
if ( gbNumMercsUntilWaitingOver == 0 )
{
@@ -1684,36 +1685,36 @@ BOOLEAN ExecuteOverhead( )
// OK cheif, do something here....
switch( gubWaitingForAllMercsToExitCode )
{
case WAIT_FOR_MERCS_TO_WALKOFF_SCREEN:
case WAIT_FOR_MERCS_TO_WALKOFF_SCREEN:
if ( ( gTacticalStatus.ubCurrentTeam == gbPlayerNum ) )
{
guiPendingOverrideEvent = LU_ENDUILOCK;
HandleTacticalUI( );
}
AllMercsHaveWalkedOffSector( );
break;
if ( ( gTacticalStatus.ubCurrentTeam == gbPlayerNum ) )
{
guiPendingOverrideEvent = LU_ENDUILOCK;
HandleTacticalUI( );
}
AllMercsHaveWalkedOffSector( );
break;
case WAIT_FOR_MERCS_TO_WALKON_SCREEN:
case WAIT_FOR_MERCS_TO_WALKON_SCREEN:
// OK, unset UI
if ( ( gTacticalStatus.ubCurrentTeam == gbPlayerNum ) )
{
guiPendingOverrideEvent = LU_ENDUILOCK;
HandleTacticalUI( );
}
break;
// OK, unset UI
if ( ( gTacticalStatus.ubCurrentTeam == gbPlayerNum ) )
{
guiPendingOverrideEvent = LU_ENDUILOCK;
HandleTacticalUI( );
}
break;
case WAIT_FOR_MERCS_TO_WALK_TO_GRIDNO:
case WAIT_FOR_MERCS_TO_WALK_TO_GRIDNO:
// OK, unset UI
if ( ( gTacticalStatus.ubCurrentTeam == gbPlayerNum ) )
{
guiPendingOverrideEvent = LU_ENDUILOCK;
HandleTacticalUI( );
}
AllMercsWalkedToExitGrid( );
break;
// OK, unset UI
if ( ( gTacticalStatus.ubCurrentTeam == gbPlayerNum ) )
{
guiPendingOverrideEvent = LU_ENDUILOCK;
HandleTacticalUI( );
}
AllMercsWalkedToExitGrid( );
break;
}
@@ -1723,8 +1724,8 @@ BOOLEAN ExecuteOverhead( )
gubWaitingForAllMercsToExitCode = 0;
}
}
}
// reset these AI-related global variables to 0 to ensure they don't interfere with the UI
gubNPCAPBudget = 0;
gubNPCDistLimit = 0;
+8 -2
View File
@@ -1606,10 +1606,16 @@ BOOLEAN UseGun( SOLDIERTYPE *pSoldier , INT16 sTargetGridNo )
OBJECTTYPE * pInHand;
pInHand = &(pSoldier->inv[pSoldier->ubAttackingHand]);
UINT32 item;
item = FindRangeBonusAttachment(pInHand);
bAttachPos = FindAttachment( pInHand, item );
//item = FindRangeBonusAttachment(pInHand);
//bAttachPos = FindAttachment( pInHand, item );
// lalien: search for barrel extender not for any item with range bonus. (else barrel extender will fall off even when none is attached)
bAttachPos = FindAttachment( pInHand, GUN_BARREL_EXTENDER );
if ( bAttachPos != ITEM_NOT_FOUND )
{
item = Item[pInHand->usAttachItem[bAttachPos]].uiIndex;
// reduce status and see if it falls off
pInHand->bAttachStatus[ bAttachPos ] -= (INT8) Random( 2 );
+32 -1
View File
@@ -1871,7 +1871,7 @@ INT8 TryToReload( SOLDIERTYPE * pSoldier )
{
INT8 bSlot;
WEAPONTYPE *pWeapon;
OBJECTTYPE *pObj;
OBJECTTYPE *pObj, *pObj2;
pWeapon = &(Weapon[pSoldier->inv[HANDPOS].usItem]);
bSlot = FindAmmo( pSoldier, pWeapon->ubCalibre, pWeapon->ubMagSize, NO_SLOT );
@@ -1894,8 +1894,39 @@ INT8 TryToReload( SOLDIERTYPE * pSoldier )
DeductPoints(pSoldier, Weapon[Item[(pObj)->usItem].ubClassIndex].APsToReloadManually, 0);
PlayJA2Sample( Weapon[ Item[pObj->usItem].ubClassIndex ].ManualReloadSound, RATE_11025, SoundVolume( HIGHVOLUME, pSoldier->sGridNo ), 1, SoundDir( pSoldier->sGridNo ) );
if ( IsValidSecondHandShot( pSoldier ) )
{
pObj2 = &(pSoldier->inv[SECONDHANDPOS]);
if (pObj2->ubGunShotsLeft && !(pObj2->ubGunState & GS_CARTRIDGE_IN_CHAMBER) )
{
pObj2->ubGunState |= GS_CARTRIDGE_IN_CHAMBER;
PlayJA2Sample( Weapon[ Item[pObj2->usItem].ubClassIndex ].ManualReloadSound, RATE_11025, SoundVolume( HIGHVOLUME, pSoldier->sGridNo ), 1, SoundDir( pSoldier->sGridNo ) );
}
}
return TRUE;
}
else
{
if ( IsValidSecondHandShot( pSoldier ) )
{
pObj2 = &(pSoldier->inv[SECONDHANDPOS]);
if (pObj2->ubGunShotsLeft && !(pObj2->ubGunState & GS_CARTRIDGE_IN_CHAMBER) )
{
pObj2->ubGunState |= GS_CARTRIDGE_IN_CHAMBER;
DeductPoints(pSoldier, Weapon[Item[(pObj2)->usItem].ubClassIndex].APsToReloadManually, 0);
PlayJA2Sample( Weapon[ Item[pObj2->usItem].ubClassIndex ].ManualReloadSound, RATE_11025, SoundVolume( HIGHVOLUME, pSoldier->sGridNo ), 1, SoundDir( pSoldier->sGridNo ) );
return TRUE;
}
}
}
//</SB>
if (bSlot != NO_SLOT && ReloadGun( pSoldier, &(pSoldier->inv[HANDPOS]), &(pSoldier->inv[bSlot]) ))