mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
- AP costs for reloading a GL or RL by attaching an item are taken now from weapons.xml (still buggy, allows cheating)
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@684 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
+1
-1
@@ -23,7 +23,7 @@ INT16 zVersionLabel[256] = { L"Beta v. 0.98" };
|
||||
#else
|
||||
|
||||
//RELEASE BUILD VERSION
|
||||
INT16 zVersionLabel[256] = { L"Release v1.13.679" };
|
||||
INT16 zVersionLabel[256] = { L"Release v1.13.684" };
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
+1
-1
@@ -546,7 +546,7 @@
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="libexpatMT.lib winmm.lib smackw32.lib mss32.lib fmodvc.lib"
|
||||
OutputFile="D:\games\Jagged Alliance 2 v1.13\ja2 v1.13.679_EN.exe"
|
||||
OutputFile="D:\games\Jagged Alliance 2 v1.13\ja2 v1.13.684_EN.exe"
|
||||
LinkIncremental="1"
|
||||
SuppressStartupBanner="TRUE"
|
||||
AdditionalLibraryDirectories=".\..\..\Standard Gaming Platform\"
|
||||
|
||||
@@ -4161,7 +4161,16 @@ void DeleteItemDescriptionBox( )
|
||||
if (!fFound)
|
||||
{
|
||||
// charge APs
|
||||
ubAPCost = AttachmentAPCost(gpItemDescObject->usAttachItem[ cnt ],gpItemDescObject->usItem);
|
||||
//lalien: changed to charge AP's for reloading a GL/RL
|
||||
if ( Item[ gpItemDescObject->usItem ].usItemClass == IC_LAUNCHER || Item[gpItemDescObject->usItem].cannon )
|
||||
{
|
||||
ubAPCost = GetAPsToReload( gpItemDescObject );
|
||||
}
|
||||
else
|
||||
{
|
||||
ubAPCost = AttachmentAPCost(gpItemDescObject->usAttachItem[ cnt ],gpItemDescObject->usItem);
|
||||
}
|
||||
|
||||
fAllFound = FALSE;
|
||||
break;
|
||||
}
|
||||
@@ -4178,7 +4187,7 @@ void DeleteItemDescriptionBox( )
|
||||
|
||||
//Remove
|
||||
DeleteVideoObjectFromIndex( guiItemDescBox );
|
||||
DeleteVideoObjectFromIndex( guiMapItemDescBox );
|
||||
DeleteVideoObjectFromIndex( guiMapItemDescBox );
|
||||
DeleteVideoObjectFromIndex( guiBullet );
|
||||
// Delete item graphic
|
||||
DeleteVideoObjectFromIndex( guiItemGraphic );
|
||||
|
||||
+28
-7
@@ -2586,15 +2586,15 @@ BOOLEAN PlaceObjectAtObjectIndex( OBJECTTYPE * pSourceObj, OBJECTTYPE * pTargetO
|
||||
|
||||
BOOLEAN ReloadGun( SOLDIERTYPE * pSoldier, OBJECTTYPE * pGun, OBJECTTYPE * pAmmo )
|
||||
{
|
||||
OBJECTTYPE OldAmmo;
|
||||
UINT8 ubBulletsToMove;
|
||||
INT8 bAPs;
|
||||
OBJECTTYPE OldAmmo;
|
||||
UINT8 ubBulletsToMove;
|
||||
INT8 bAPs;
|
||||
UINT16 usReloadSound;
|
||||
BOOLEAN fSameAmmoType;
|
||||
BOOLEAN fSameMagazineSize;
|
||||
BOOLEAN fReloadingWithStack;
|
||||
BOOLEAN fEmptyGun;
|
||||
INT8 bReloadType;
|
||||
INT8 bReloadType;
|
||||
UINT16 usNewAmmoItem;
|
||||
|
||||
if ( (gTacticalStatus.uiFlags & TURNBASED) && (gTacticalStatus.uiFlags & INCOMBAT) )
|
||||
@@ -3183,7 +3183,8 @@ BOOLEAN AttachObject( SOLDIERTYPE * pSoldier, OBJECTTYPE * pTargetObj, OBJECTTYP
|
||||
UINT8 ubType, ubLimit, ubAPCost;
|
||||
INT32 iCheckResult;
|
||||
INT8 bAttachInfoIndex = -1, bAttachComboMerge;
|
||||
BOOLEAN fValidLaunchable = FALSE;
|
||||
BOOLEAN fValidLaunchable = FALSE;
|
||||
BOOLEAN IsAGLorRL = FALSE;
|
||||
|
||||
|
||||
if ( pTargetObj->ubNumberOfObjects > 1 )
|
||||
@@ -3227,11 +3228,27 @@ BOOLEAN AttachObject( SOLDIERTYPE * pSoldier, OBJECTTYPE * pTargetObj, OBJECTTYP
|
||||
}
|
||||
|
||||
//lalien: added to make a GL/RL work when reloaded manually
|
||||
// the AP costs for reloading GL/RL will be taken from weapons.xml ( wrong place!!! the AP's are deducted in DeleteItemDescriptionBox() )
|
||||
if (bAttachPos != ITEM_NOT_FOUND)
|
||||
{
|
||||
if ( Item[ pTargetObj->usItem ].usItemClass == IC_LAUNCHER || Item[pTargetObj->usItem].cannon )
|
||||
{
|
||||
pTargetObj->usGunAmmoItem = pAttachment->usItem;
|
||||
//if ( (gTacticalStatus.uiFlags & TURNBASED) && (gTacticalStatus.uiFlags & INCOMBAT) )
|
||||
//{
|
||||
// INT8 bAPs = GetAPsToReloadGunWithAmmo( pTargetObj, pAttachment );
|
||||
//
|
||||
// if ( !EnoughPoints( pSoldier, bAPs, 0,TRUE ) )
|
||||
// {
|
||||
// return( FALSE );
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// DeductPoints( pSoldier, bAPs, 0 );
|
||||
// IsAGLorRL = TRUE;
|
||||
// }
|
||||
//}
|
||||
|
||||
pTargetObj->usGunAmmoItem = pAttachment->usItem;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3353,7 +3370,11 @@ BOOLEAN AttachObject( SOLDIERTYPE * pSoldier, OBJECTTYPE * pTargetObj, OBJECTTYP
|
||||
return( FALSE );
|
||||
}
|
||||
|
||||
DeductPoints( pSoldier, ubAPCost, 0 );
|
||||
//lalien: don't charge AP's for reloading a GL/RL ( wrong place!!! the AP's are deducted in DeleteItemDescriptionBox() )
|
||||
//if ( IsAGLorRL == FALSE )
|
||||
//{
|
||||
DeductPoints( pSoldier, ubAPCost, 0 );
|
||||
//}
|
||||
}
|
||||
|
||||
switch( ubType )
|
||||
|
||||
Reference in New Issue
Block a user