mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
Added new weapon jam code from SpaceViking (think that's who wrote it).
Updated the text files and moved a static phrase into the language specific files. git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@2207 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
+3
-3
@@ -13,12 +13,12 @@
|
||||
#ifdef JA2EDITOR
|
||||
|
||||
//MAP EDITOR BUILD VERSION
|
||||
CHAR16 zVersionLabel[256] = { L"Map Editor v1.13.2196" };
|
||||
CHAR16 zVersionLabel[256] = { L"Map Editor v1.13.2207" };
|
||||
|
||||
#elif defined JA2BETAVERSION
|
||||
|
||||
//BETA/TEST BUILD VERSION
|
||||
CHAR16 zVersionLabel[256] = { L"Debug v1.13.2196" };
|
||||
CHAR16 zVersionLabel[256] = { L"Debug v1.13.2207" };
|
||||
|
||||
#elif defined CRIPPLED_VERSION
|
||||
|
||||
@@ -28,7 +28,7 @@ CHAR16 zVersionLabel[256] = { L"Beta v. 0.98" };
|
||||
#else
|
||||
|
||||
//RELEASE BUILD VERSION
|
||||
CHAR16 zVersionLabel[256] = { L"Release v1.13.2196" };
|
||||
CHAR16 zVersionLabel[256] = { L"Release v1.13.2207" };
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -7936,7 +7936,7 @@ void SOLDIERTYPE::BeginSoldierClimbUpRoof( void )
|
||||
|
||||
//CHRISL: Disable climbing up to a roof while wearing a backpack
|
||||
if((UsingNewInventorySystem() == true) && this->inv[BPACKPOCKPOS].exists() == true) {
|
||||
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, L"Cannot climb while wearing a backpack" );
|
||||
ScreenMsg( FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, NewInvMessage[NIV_NO_CLIMB] );
|
||||
return;
|
||||
}
|
||||
INT8 bNewDirection;
|
||||
|
||||
+105
-89
@@ -1149,95 +1149,111 @@ void AdjustImpactByHitLocation( INT32 iImpact, UINT8 ubHitLocation, INT32 * piNe
|
||||
//rain
|
||||
extern INT8 gbCurrentRainIntensity;
|
||||
//end rain
|
||||
BOOLEAN CheckForGunJam( SOLDIERTYPE * pSoldier )
|
||||
{
|
||||
OBJECTTYPE * pObj;
|
||||
INT32 iChance, iResult;
|
||||
|
||||
// should jams apply to enemies?
|
||||
if (pSoldier->flags.uiStatusFlags & SOLDIER_PC)
|
||||
{
|
||||
if ( Item[pSoldier->usAttackingWeapon].usItemClass == IC_GUN && !EXPLOSIVE_GUN( pSoldier->usAttackingWeapon ) )
|
||||
{
|
||||
pObj = &(pSoldier->inv[pSoldier->ubAttackingHand]);
|
||||
if ((*pObj)[0]->data.gun.bGunAmmoStatus > 0)
|
||||
{
|
||||
// gun might jam, figure out the chance
|
||||
//iChance = (80 - (*pObj)[0]->data.gun.bGunStatus);
|
||||
|
||||
//rain
|
||||
iChance = (80 - (*pObj)[0]->data.gun.bGunStatus) + gGameExternalOptions.ubWeaponReliabilityReductionPerRainIntensity * gbCurrentRainIntensity;
|
||||
//end rain
|
||||
|
||||
|
||||
// CJC: removed reliability from formula...
|
||||
|
||||
// jams can happen to unreliable guns "earlier" than normal or reliable ones.
|
||||
//iChance = iChance - Item[pObj->usItem].bReliability * 2;
|
||||
|
||||
// decrease the chance of a jam by 20% per point of reliability;
|
||||
// increased by 20% per negative point...
|
||||
//iChance = iChance * (10 - Item[pObj->usItem].bReliability * 2) / 10;
|
||||
|
||||
//rain
|
||||
// iChance = iChance * (10 - Item[pObj->usItem].bReliability * 2) / 10; // Madd: took it back out
|
||||
//end rain
|
||||
|
||||
if (pSoldier->bDoBurst > 1)
|
||||
{
|
||||
// if at bullet in a burst after the first, higher chance
|
||||
iChance -= PreRandom( 80 );
|
||||
}
|
||||
else
|
||||
{
|
||||
iChance -= PreRandom( 100 );
|
||||
}
|
||||
|
||||
#ifdef TESTGUNJAM
|
||||
if ( 1 )
|
||||
#else
|
||||
if ((INT32) PreRandom( 100 ) < iChance || gfNextFireJam )
|
||||
#endif
|
||||
{
|
||||
gfNextFireJam = FALSE;
|
||||
|
||||
// jam! negate the gun ammo status.
|
||||
(*pObj)[0]->data.gun.bGunAmmoStatus *= -1;
|
||||
|
||||
// Deduct AMMO!
|
||||
DeductAmmo( pSoldier, pSoldier->ubAttackingHand );
|
||||
|
||||
TacticalCharacterDialogue( pSoldier, QUOTE_JAMMED_GUN );
|
||||
return( TRUE );
|
||||
}
|
||||
}
|
||||
else if ((*pObj)[0]->data.gun.bGunAmmoStatus < 0)
|
||||
{
|
||||
// try to unjam gun
|
||||
iResult = SkillCheck( pSoldier, UNJAM_GUN_CHECK, (INT8) ((Item[pObj->usItem].bReliability + Item[(*pObj)[0]->data.gun.usGunAmmoItem].bReliability)* 4) );
|
||||
if (iResult > 0)
|
||||
{
|
||||
// yay! unjammed the gun
|
||||
(*pObj)[0]->data.gun.bGunAmmoStatus *= -1;
|
||||
|
||||
// MECHANICAL/DEXTERITY GAIN: Unjammed a gun
|
||||
StatChange( pSoldier, MECHANAMT, 5, FALSE );
|
||||
StatChange( pSoldier, DEXTAMT, 5, FALSE );
|
||||
|
||||
DirtyMercPanelInterface( pSoldier, DIRTYLEVEL2 );
|
||||
|
||||
// We unjammed gun, return appropriate value!
|
||||
return( 255 );
|
||||
}
|
||||
else
|
||||
{
|
||||
return( TRUE );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return( FALSE );
|
||||
}
|
||||
BOOLEAN CheckForGunJam( SOLDIERTYPE * pSoldier )
|
||||
{
|
||||
OBJECTTYPE * pObj;
|
||||
// INT32 iChance, iResult;
|
||||
|
||||
// should jams apply to enemies?
|
||||
if (pSoldier->uiStatusFlags & SOLDIER_PC)
|
||||
{
|
||||
if ( Item[pSoldier->usAttackingWeapon].usItemClass == IC_GUN && !EXPLOSIVE_GUN( pSoldier->usAttackingWeapon ) )
|
||||
{
|
||||
pObj = &(pSoldier->inv[pSoldier->ubAttackingHand]);
|
||||
if (pObj->ItemData.Gun.bGunAmmoStatus > 0)
|
||||
{
|
||||
// Algorithm for jamming
|
||||
int maxJamChance = 50; // Externalize this?
|
||||
int reliability = Item[pObj->usItem].bReliability;
|
||||
int condition = pObj->ItemData.Gun.bGunStatus;
|
||||
int invertedBaseJamChance = condition + (reliability * 2) -
|
||||
gGameExternalOptions.ubWeaponReliabilityReductionPerRainIntensity * gbCurrentRainIntensity;
|
||||
if (invertedBaseJamChance < 0)
|
||||
invertedBaseJamChance = 0;
|
||||
else if (invertedBaseJamChance > 100)
|
||||
invertedBaseJamChance = 100;
|
||||
int jamChance = 100 - (int)sqrt((double)invertedBaseJamChance * ((75.0-(int)(pSoldier->bDoBurst>1)*15) + (double)invertedBaseJamChance / 2.0));
|
||||
if (jamChance < 0)
|
||||
jamChance = 0;
|
||||
else if (jamChance > maxJamChance - reliability)
|
||||
jamChance = maxJamChance - reliability;
|
||||
|
||||
/* Old jam code
|
||||
// gun might jam, figure out the chance
|
||||
//iChance = (80 - pObj->bGunStatus);
|
||||
|
||||
//rain
|
||||
iChance = (80 - pObj->ItemData.Gun.bGunStatus) + gGameExternalOptions.ubWeaponReliabilityReductionPerRainIntensity * gbCurrentRainIntensity;
|
||||
//end rain
|
||||
|
||||
// CJC: removed reliability from formula...
|
||||
|
||||
// jams can happen to unreliable guns "earlier" than normal or reliable ones.
|
||||
//iChance = iChance - Item[pObj->usItem].bReliability * 2;
|
||||
|
||||
// decrease the chance of a jam by 20% per point of reliability;
|
||||
// increased by 20% per negative point...
|
||||
//iChance = iChance * (10 - Item[pObj->usItem].bReliability * 2) / 10;
|
||||
|
||||
//rain
|
||||
// iChance = iChance * (10 - Item[pObj->usItem].bReliability * 2) / 10; // Madd: took it back out
|
||||
//end rain
|
||||
|
||||
if (pSoldier->bDoBurst > 1)
|
||||
{
|
||||
// if at bullet in a burst after the first, higher chance
|
||||
iChance -= PreRandom( 80 );
|
||||
}
|
||||
else
|
||||
{
|
||||
iChance -= PreRandom( 100 );
|
||||
}
|
||||
*/
|
||||
#ifdef TESTGUNJAM
|
||||
if ( 1 )
|
||||
#else
|
||||
if ((INT32) PreRandom( 100 ) < jamChance || gfNextFireJam )
|
||||
#endif
|
||||
{
|
||||
gfNextFireJam = FALSE;
|
||||
|
||||
// jam! negate the gun ammo status.
|
||||
pObj->ItemData.Gun.bGunAmmoStatus *= -1;
|
||||
|
||||
// Deduct AMMO!
|
||||
DeductAmmo( pSoldier, pSoldier->ubAttackingHand );
|
||||
|
||||
TacticalCharacterDialogue( pSoldier, QUOTE_JAMMED_GUN );
|
||||
return( TRUE );
|
||||
}
|
||||
}
|
||||
else if (pObj->ItemData.Gun.bGunAmmoStatus < 0)
|
||||
{
|
||||
// try to unjam gun
|
||||
int iResult = SkillCheck( pSoldier, UNJAM_GUN_CHECK, (INT8) ((Item[pObj->usItem].bReliability + Item[pObj->ItemData.Gun.usGunAmmoItem].bReliability)* 4) );
|
||||
if (iResult > 0)
|
||||
{
|
||||
// yay! unjammed the gun
|
||||
pObj->ItemData.Gun.bGunAmmoStatus *= -1;
|
||||
|
||||
// MECHANICAL/DEXTERITY GAIN: Unjammed a gun
|
||||
StatChange( pSoldier, MECHANAMT, 5, FALSE );
|
||||
StatChange( pSoldier, DEXTAMT, 5, FALSE );
|
||||
|
||||
DirtyMercPanelInterface( pSoldier, DIRTYLEVEL2 );
|
||||
|
||||
// We unjammed gun, return appropriate value!
|
||||
return( 255 );
|
||||
}
|
||||
else
|
||||
{
|
||||
return( TRUE );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return( FALSE );
|
||||
}
|
||||
|
||||
|
||||
BOOLEAN OKFireWeapon( SOLDIERTYPE *pSoldier )
|
||||
|
||||
@@ -1581,6 +1581,7 @@ enum
|
||||
NIV_ZIPPER_NO_MOVE,
|
||||
NIV_SELL_ALL,
|
||||
NIV_DELETE_ALL,
|
||||
NIV_NO_CLIMB,
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -4286,6 +4286,7 @@ STR16 NewInvMessage[] =
|
||||
L"Kan niet me bewegen terwijl actieve rugzakritssluiting",
|
||||
L"Bent zeker u u wilt alle sectorpunten verkopen?",
|
||||
L"Bent zeker u u wilt alle sectorpunten schr?",
|
||||
L"Kan beklimmen niet terwijl het dragen van een rugzak",
|
||||
};
|
||||
|
||||
// WANNE - MP: Multiplayer messages
|
||||
|
||||
@@ -4282,6 +4282,7 @@ STR16 NewInvMessage[] =
|
||||
L"Can not move while backpack zipper active",
|
||||
L"Are you sure you want to sell all sector items?",
|
||||
L"Are you sure you want to delete all sector items?",
|
||||
L"Cannot climb while wearing a backpack",
|
||||
};
|
||||
|
||||
// WANNE - MP: Multiplayer messages
|
||||
|
||||
@@ -4267,6 +4267,7 @@ STR16 NewInvMessage[] =
|
||||
L"Ne peut pas se déplacer alors que la tirette de baluchon active",
|
||||
L"Êtes vous sûr vous voulez vendre tous les articles de secteur?",
|
||||
L"Êtes vous sûr vous voulez supprimer tous les articles de secteur?",
|
||||
L"Ne peut pas s'élever tout en utilisant un sac à dos",
|
||||
};
|
||||
|
||||
// WANNE - MP: Multiplayer messages
|
||||
|
||||
@@ -4073,6 +4073,7 @@ STR16 NewInvMessage[] =
|
||||
L"Bewegung nicht möglich, während Reißverschluss des Rucksacks offen ist",
|
||||
L"Sind Sie sicher, dass Sie alle Gegenstände im Sektor verkaufen wollen?",
|
||||
L"Sind Sie sicher, dass Sie alle Gegenstände im Sektor löschen wollen?",
|
||||
L"Kann nicht beim Tragen eines Rucksacks klettern",
|
||||
};
|
||||
|
||||
// WANNE - MP: Multiplayer messages
|
||||
|
||||
@@ -4264,6 +4264,7 @@ STR16 NewInvMessage[] =
|
||||
L"Non può muoversi mentre la chiusura lampo del fagotto attiva",
|
||||
L"Siete sicuri voi desiderate vendere tutti gli articoli del settore?",
|
||||
L"Siete sicuri voi desiderate cancellare tutti gli articoli del settore?",
|
||||
L"Non può arrampicarsi mentre portano uno zaino",
|
||||
};
|
||||
|
||||
// WANNE - MP: Multiplayer messages
|
||||
|
||||
@@ -4260,6 +4260,7 @@ STR16 NewInvMessage[] =
|
||||
L"Can not move while backpack zipper active",
|
||||
L"Are you sure you want to sell all sector items?",
|
||||
L"Are you sure you want to delete all sector items?",
|
||||
L"Cannot climb while wearing a backpack",
|
||||
};
|
||||
|
||||
// WANNE - MP: Multiplayer messages
|
||||
|
||||
@@ -3387,7 +3387,7 @@ STR16 zSaveLoadText[] =
|
||||
L"Нормальный",
|
||||
L"Большой",
|
||||
L"Огромный",
|
||||
L"Все, включая эксклюзив",
|
||||
L"Все и сразу",
|
||||
|
||||
L"Новый инвентарь, используемый в этом релизе, не работает при разрешении экрана 640х480. Измените разрешение и загрузите игру заново.",
|
||||
L"Новый инвентарь не работает, если выбрана по умолчанию игровая папка 'Data'.",
|
||||
@@ -3609,7 +3609,7 @@ STR16 gzGIOScreenText[] =
|
||||
L"Нормальный",
|
||||
L"Большой",
|
||||
L"Огромный",
|
||||
L"Все, включая эксклюзив",
|
||||
L"Все и сразу",
|
||||
L"Режим инвентаря",
|
||||
L"Классический",
|
||||
L"Новый вариант",
|
||||
@@ -3762,10 +3762,10 @@ STR16 pMessageStrings[] =
|
||||
L"Достигнут чит-уровень два.",
|
||||
|
||||
//Toggling various stealth modes
|
||||
L"Отряд перешел в режим скрытности.",
|
||||
L"Отряд перешел в обычный режим.",
|
||||
L"%s теперь в режиме скрытности.",
|
||||
L"%s теперь в обычном режиме.",
|
||||
L"Отряд идет тихим шагом.",
|
||||
L"Отряд идет обычным шагом.",
|
||||
L"%s идет тихим шагом.",
|
||||
L"%s идет обычным шагом.",
|
||||
|
||||
//Wireframes are shown through buildings to reveal doors and windows that can't otherwise be seen in
|
||||
//an isometric engine. You can toggle this mode freely in the game.
|
||||
@@ -4274,6 +4274,7 @@ STR16 NewInvMessage[] =
|
||||
L"Вы не можете передвигаться с открытым рюкзаком.",
|
||||
L"Вы уверены что находитесь в здравом уме и отвечаете за свои действия? И вы в самом деле хотите продать весь хлам этого сектора голодающему населению Арулько?",
|
||||
L"Вы уверены что находитесь в здравом уме и отвечаете за свои действия? И вы в самом деле хотите выбросить весь хлам, валяющийся в этом секторе?",
|
||||
L"Тяжеловато будет взбираться с полным рюкзаком на крышу. Может снимем?",
|
||||
};
|
||||
|
||||
// WANNE - MP: Multiplayer messages
|
||||
|
||||
@@ -4280,6 +4280,7 @@ STR16 NewInvMessage[] =
|
||||
L"Can not move while backpack zipper active",
|
||||
L"Are you sure you want to sell all sector items?",
|
||||
L"Are you sure you want to delete all sector items?",
|
||||
L"Cannot climb while wearing a backpack",
|
||||
};
|
||||
|
||||
// WANNE - MP: Multiplayer messages
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="8,00"
|
||||
Version="8.00"
|
||||
Name="ja2_2005Express"
|
||||
ProjectGUID="{F44669E7-74AC-444B-B75F-F16F4B9F0265}"
|
||||
RootNamespace="ja2_2005Express"
|
||||
@@ -145,7 +145,7 @@
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="Winmm.lib .\Multiplayer\raknet\RakNetLibStatic.lib ws2_32.lib"
|
||||
OutputFile="$(OutDir)\ja2_release_2169_ru.exe"
|
||||
OutputFile="$(OutDir)\ja2_release_2207_en.exe"
|
||||
LinkIncremental="1"
|
||||
GenerateDebugInformation="true"
|
||||
GenerateMapFile="true"
|
||||
|
||||
Reference in New Issue
Block a user