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