mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
- New feature: Remove attachments and unload all weapons in sector (Shift+F)
- Fix for grenade launchers (allow reloading with valid ammunition only) - Fix for stacking items in sector git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@855 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -434,6 +434,10 @@ void LoadGameExternalOptions()
|
||||
// Soldier tool tips
|
||||
gGameExternalOptions.gfAllowSoldierToolTips = iniReader.ReadBoolean("JA2 Tactical Settings","ALLOW_SOLDIER_TOOL_TIPS",0);
|
||||
|
||||
// Unload weapons & remove attachments
|
||||
gGameExternalOptions.gfShiftFUnloadWeapons = iniReader.ReadBoolean("JA2 Tactical Settings","SHIFT_F_UNLOAD_WEAPONS",1);
|
||||
gGameExternalOptions.gfShiftFRemoveAttachments = iniReader.ReadBoolean("JA2 Tactical Settings","SHIFT_F_REMOVE_ATTACHMENTS",1);
|
||||
|
||||
//################# Rain Settings ##################
|
||||
|
||||
// Rain settings
|
||||
|
||||
@@ -251,6 +251,9 @@ typedef struct
|
||||
UINT32 ubVisDistDecreasePerRainIntensity;
|
||||
BOOLEAN gfAllowLimitedVision;
|
||||
|
||||
BOOLEAN gfShiftFUnloadWeapons;
|
||||
BOOLEAN gfShiftFRemoveAttachments;
|
||||
|
||||
// Rain settings
|
||||
BOOLEAN gfAllowRain;
|
||||
UINT32 gusRainChancePerDay;
|
||||
|
||||
+2
-2
@@ -23,12 +23,12 @@ INT16 zVersionLabel[256] = { L"Beta v. 0.98" };
|
||||
#else
|
||||
|
||||
//RELEASE BUILD VERSION
|
||||
wchar_t zVersionLabel[256] = { L"Release v1.13.839" };
|
||||
wchar_t zVersionLabel[256] = { L"Release v1.13.844" };
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
INT8 czVersionNumber[16] = { "Build 07.04.07" }; //YY.MM.DD
|
||||
INT8 czVersionNumber[16] = { "Build 07.04.19" }; //YY.MM.DD
|
||||
wchar_t zTrackingNumber[16] = { L"Z" };
|
||||
|
||||
|
||||
|
||||
+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.830_RU.exe"
|
||||
OutputFile="D:\games\Jagged Alliance 2 v1.13\JA2 v1.13.844_EN.exe"
|
||||
LinkIncremental="1"
|
||||
SuppressStartupBanner="TRUE"
|
||||
AdditionalLibraryDirectories=".\..\..\Standard Gaming Platform\"
|
||||
|
||||
+5
-2
@@ -3252,8 +3252,11 @@ BOOLEAN AttachObject( SOLDIERTYPE * pSoldier, OBJECTTYPE * pTargetObj, OBJECTTYP
|
||||
// IsAGLorRL = TRUE;
|
||||
// }
|
||||
//}
|
||||
|
||||
pTargetObj->usGunAmmoItem = pAttachment->usItem;
|
||||
|
||||
if ( fValidLaunchable )
|
||||
{
|
||||
pTargetObj->usGunAmmoItem = pAttachment->usItem;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+5
-5
@@ -2167,11 +2167,11 @@ INT16 MinAPsToThrow( SOLDIERTYPE *pSoldier, INT16 sGridNo, UINT8 ubAddTurningCos
|
||||
|
||||
// Is it the same as he's facing?
|
||||
if ( ubDirection != pSoldier->bDirection )
|
||||
{
|
||||
//Lalien: disabled it again
|
||||
//AXP 25.03.2007: Reenabled look cost
|
||||
//iAPCost += GetAPsToLook( pSoldier );
|
||||
}
|
||||
{
|
||||
//Lalien: disabled it again
|
||||
//AXP 25.03.2007: Reenabled look cost
|
||||
//iAPCost += GetAPsToLook( pSoldier );
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@@ -227,7 +227,7 @@ UINT8 gubCheatLevel = STARTING_CHEAT_LEVEL;
|
||||
extern void StackObjs( OBJECTTYPE * pSourceObj, OBJECTTYPE * pTargetObj, UINT8 ubNumberToCopy );
|
||||
extern BOOLEAN CompatibleAmmoForGun( OBJECTTYPE *pTryObject, OBJECTTYPE *pTestObject );
|
||||
extern void DetermineWhichAssignmentMenusCanBeShown( void );
|
||||
extern void DetermineWhichMilitiaControlMenusCanBeShown( void ); //lal
|
||||
extern void DetermineWhichMilitiaControlMenusCanBeShown( void ); //lalien
|
||||
|
||||
void GetTBMouseButtonInput( UINT32 *puiNewEvent )
|
||||
{
|
||||
@@ -2555,6 +2555,65 @@ void GetKeyboardInput( UINT32 *puiNewEvent )
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
|
||||
case 'F':
|
||||
if ( !(gTacticalStatus.fEnemyInSector) )
|
||||
{
|
||||
HandleAllReachAbleItemsInTheSector( gWorldSectorX, gWorldSectorY, gbWorldSectorZ );
|
||||
|
||||
for ( UINT32 uiLoop = 0; uiLoop < guiNumWorldItems; uiLoop++ ) //for all items in sector
|
||||
{
|
||||
if ( (gWorldItems[ uiLoop ].fExists) && (gWorldItems[ uiLoop ].usFlags & WORLD_ITEM_REACHABLE) )//item exists and is reachable
|
||||
{
|
||||
if (( Item[ gWorldItems[ uiLoop ].o.usItem ].usItemClass == IC_GUN ) && (gGameExternalOptions.gfShiftFUnloadWeapons == TRUE) )//item is a gun and unloading is allowed
|
||||
{
|
||||
//Remove magazine
|
||||
if ( (gWorldItems[ uiLoop ].o.usGunAmmoItem != NONE) && (gWorldItems[ uiLoop ].o.ubGunShotsLeft > 0) )
|
||||
{
|
||||
OBJECTTYPE newObj; //Create object
|
||||
CreateItem(gWorldItems[ uiLoop ].o.usGunAmmoItem, 100, &newObj);
|
||||
newObj.ubShotsLeft[0] = gWorldItems[ uiLoop ].o.ubGunShotsLeft;
|
||||
gWorldItems[ uiLoop ].o.ubGunShotsLeft = 0;
|
||||
gWorldItems[ uiLoop ].o.usGunAmmoItem = NONE;
|
||||
|
||||
// put it on the ground
|
||||
AddItemToPool( gWorldItems[ uiLoop ].sGridNo, &newObj, 1, gWorldItems[ uiLoop ].ubLevel, 0 , -1 );
|
||||
}
|
||||
}
|
||||
|
||||
//remove attachments
|
||||
if ( gGameExternalOptions.gfShiftFRemoveAttachments == TRUE )
|
||||
{
|
||||
for (int bAttachPos = MAX_ATTACHMENTS-1; bAttachPos >= 0; bAttachPos--)
|
||||
{
|
||||
if (gWorldItems[ uiLoop ].o.usAttachItem[ bAttachPos ] != NOTHING)
|
||||
{
|
||||
if ( !Item[ gWorldItems[ uiLoop ].o.usAttachItem[ bAttachPos ] ].inseparable )
|
||||
{
|
||||
OBJECTTYPE newObj;
|
||||
if (RemoveAttachment( &(gWorldItems[ uiLoop ].o), bAttachPos, &newObj ))
|
||||
{
|
||||
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, TacticalStr[ ATTACHMENT_REMOVED ] );
|
||||
}
|
||||
// put it on the ground
|
||||
AddItemToPool( gWorldItems[ uiLoop ].sGridNo, &newObj, 1, gWorldItems[ uiLoop ].ubLevel, 0 , -1 );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
case 'D':
|
||||
if ( gGameSettings.fOptions[TOPTION_DROP_ALL] )
|
||||
{
|
||||
@@ -3277,6 +3336,8 @@ void GetKeyboardInput( UINT32 *puiNewEvent )
|
||||
case 'S':
|
||||
if (! ( gTacticalStatus.fEnemyInSector ) )
|
||||
{
|
||||
HandleAllReachAbleItemsInTheSector( gWorldSectorX, gWorldSectorY, gbWorldSectorZ );
|
||||
|
||||
for ( UINT32 uiLoop = 0; uiLoop < guiNumWorldItems; uiLoop++ )
|
||||
{
|
||||
if ( ( gWorldItems[ uiLoop ].fExists) && (gWorldItems[ uiLoop ].usFlags & WORLD_ITEM_REACHABLE) )//item exists and is reachable
|
||||
@@ -3305,6 +3366,8 @@ void GetKeyboardInput( UINT32 *puiNewEvent )
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//HandleAllReachAbleItemsInTheSector( gWorldSectorX, gWorldSectorY, gbWorldSectorZ );
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
@@ -247,8 +247,8 @@ BOOLEAN LoadItemInfo(UINT16 ubIndex, STR16 pNameString, STR16 pInfoString )
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef POLISH
|
||||
switch( pNameString[ i ] )
|
||||
#ifdef POLISH
|
||||
switch( pNameString[ i ] )
|
||||
{
|
||||
case 260: pInfoString[ i ] = 165; break;
|
||||
case 262: pInfoString[ i ] = 198; break;
|
||||
@@ -271,10 +271,10 @@ BOOLEAN LoadItemInfo(UINT16 ubIndex, STR16 pNameString, STR16 pInfoString )
|
||||
case 380: pInfoString[ i ] = 191; break;
|
||||
case 378: pInfoString[ i ] = 376; break;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef RUSSIAN
|
||||
#ifdef RUSSIAN
|
||||
if ((unsigned char)Item[ubIndex].szItemDesc [j] == 208) //d0
|
||||
{
|
||||
// This character determines the special character
|
||||
@@ -372,8 +372,7 @@ BOOLEAN LoadItemInfo(UINT16 ubIndex, STR16 pNameString, STR16 pInfoString )
|
||||
// }
|
||||
//}
|
||||
#endif
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
pInfoString[i] ='\0';
|
||||
|
||||
@@ -549,6 +549,7 @@ enum
|
||||
DOOR_IS_BUSY,
|
||||
VEHICLE_VITAL_STATS_POPUPTEXT,
|
||||
NO_LOS_TO_TALK_TARGET,
|
||||
ATTACHMENT_REMOVED,
|
||||
};
|
||||
|
||||
enum{
|
||||
|
||||
@@ -1406,6 +1406,7 @@ wchar_t TacticalStr[][ MED_STRING_LENGTH ] =
|
||||
L"Iemand anders probeert deze deur te gebruiken.", // L"Somebody else is trying to use this door.",
|
||||
L"Gezondheid: %d/%d\nBrandstof: %d/%d", //L"Health: %d/%d\nFuel: %d/%d",
|
||||
L"%s kan %s niet zien.", // Cannot see person trying to talk to
|
||||
L"Attachment removed",
|
||||
};
|
||||
|
||||
//Varying helptext explains (for the "Go to Sector/Map" checkbox) what will happen given different circumstances in the "exiting sector" interface.
|
||||
|
||||
@@ -1406,7 +1406,8 @@ wchar_t TacticalStr[][ MED_STRING_LENGTH ] =
|
||||
L"Lock destroyed",
|
||||
L"Somebody else is trying to use this door.",
|
||||
L"Health: %d/%d\nFuel: %d/%d",
|
||||
L"%s cannot see %s.", // Cannot see person trying to talk to
|
||||
L"%s cannot see %s.", // Cannot see person trying to talk to
|
||||
L"Attachment removed",
|
||||
};
|
||||
|
||||
//Varying helptext explains (for the "Go to Sector/Map" checkbox) what will happen given different circumstances in the "exiting sector" interface.
|
||||
|
||||
@@ -1395,7 +1395,8 @@ wchar_t TacticalStr[][ MED_STRING_LENGTH ] =
|
||||
L"Verrou détruit",
|
||||
L"Quelqu'un d'autre veut essayer sur cette porte.",
|
||||
L"Etat : %d/%d\nCarburant : %d/%d",
|
||||
L"%s ne peut pas voir %s.", // Cannot see person trying to talk to
|
||||
L"%s ne peut pas voir %s.", // Cannot see person trying to talk to
|
||||
L"Attachment removed",
|
||||
};
|
||||
|
||||
//Varying helptext explains (for the "Go to Sector/Map" checkbox) what will happen given different circumstances in the "exiting sector" interface.
|
||||
|
||||
@@ -1370,6 +1370,7 @@ wchar_t TacticalStr[][ MED_STRING_LENGTH ] =
|
||||
L"Noch jemand an der Tür.",
|
||||
L"Gesundh.: %d/%d\nTank: %d/%d",
|
||||
L"%s kann %s nicht sehen.", // Cannot see person trying to talk to
|
||||
L"Attachment removed",
|
||||
};
|
||||
|
||||
//Varying helptext explains (for the "Go to Sector/Map" checkbox) what will happen given different circumstances in the "exiting sector" interface.
|
||||
|
||||
@@ -1389,7 +1389,8 @@ wchar_t TacticalStr[][ MED_STRING_LENGTH ] =
|
||||
L"Serratura distrutta",
|
||||
L"Qualcun altro sta provando a utilizzare questa porta.",
|
||||
L"Salute: %d/%d\nCarburante: %d/%d",
|
||||
L"%s non riesce a vedere %s.", // Cannot see person trying to talk to
|
||||
L"%s non riesce a vedere %s.", // Cannot see person trying to talk to
|
||||
L"Attachment removed",
|
||||
};
|
||||
|
||||
//Varying helptext explains (for the "Go to Sector/Map" checkbox) what will happen given different circumstances in the "exiting sector" interface.
|
||||
|
||||
@@ -1389,7 +1389,8 @@ wchar_t TacticalStr[][ MED_STRING_LENGTH ] =
|
||||
L"Zamek zosta³ zniszczony",
|
||||
L"Ktoœ inny majstruje przy tych drzwiach.",
|
||||
L"Stan: %d/%d\nPaliwo: %d/%d",
|
||||
L"%s nie widzi - %s.", // Cannot see person trying to talk to
|
||||
L"%s nie widzi - %s.", // Cannot see person trying to talk to
|
||||
L"Attachment removed",
|
||||
};
|
||||
|
||||
//Varying helptext explains (for the "Go to Sector/Map" checkbox) what will happen given different circumstances in the "exiting sector" interface.
|
||||
|
||||
@@ -1397,7 +1397,8 @@ wchar_t TacticalStr[][ MED_STRING_LENGTH ] =
|
||||
L"Çàìîê ðàçðóøåí",
|
||||
L"Êòî-òî åùå ïûòàåòñÿ âîñïîëüçîâ.ýòîé äâåðüþ.",
|
||||
L"Çäîðîâüå: %d/%d\nÁåíç: %d/%d",
|
||||
L"%s íå âèäèò %s.", // Cannot see person trying to talk to
|
||||
L"%s íå âèäèò %s.", // Cannot see person trying to talk to
|
||||
L"Attachment removed",
|
||||
};
|
||||
|
||||
//Varying helptext explains (for the "Go to Sector/Map" checkbox) what will happen given different circumstances in the "exiting sector" interface.
|
||||
|
||||
Reference in New Issue
Block a user