From 37ad617bda4061b5cb02c18da47ef3edc35f2be1 Mon Sep 17 00:00:00 2001 From: MaddMugsy Date: Sat, 3 Jun 2006 17:10:10 +0000 Subject: [PATCH] -added option to choose whether extra aim levels apply to rifles only git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@161 3b4a5df2-a311-0410-b5c6-a8a6f20db521 --- GameSettings.cpp | 3 ++- GameSettings.h | 1 + GameVersion.cpp | 2 +- Tactical/Items.cpp | 6 +++++- Utils/_EnglishText.cpp | 4 +++- Utils/_GermanText.cpp | 6 ++++++ Utils/_RussianText.cpp | 6 ++++++ 7 files changed, 24 insertions(+), 4 deletions(-) diff --git a/GameSettings.cpp b/GameSettings.cpp index a32a89a3..ff46d574 100644 --- a/GameSettings.cpp +++ b/GameSettings.cpp @@ -244,8 +244,9 @@ void InitGameSettings() gGameSettings.fOptions[ TOPTION_CTH_CURSOR ] = TRUE; //Madd: gGameSettings.fOptions[ TOPTION_GL_BURST_CURSOR ] = TRUE; - gGameSettings.fOptions[ TOPTION_GL_HIGH_ANGLE ] = FALSE; gGameSettings.fOptions[ TOPTION_DROP_ALL ] = FALSE; + gGameSettings.fOptions[ TOPTION_GL_HIGH_ANGLE ] = FALSE; + gGameSettings.fOptions[ TOPTION_AIM_LEVEL_RESTRICTION ] = TRUE; // JA2Gold gGameSettings.fOptions[ TOPTION_MERC_CASTS_LIGHT ] = TRUE; diff --git a/GameSettings.h b/GameSettings.h index f9e32c91..74185550 100644 --- a/GameSettings.h +++ b/GameSettings.h @@ -44,6 +44,7 @@ enum TOPTION_GL_BURST_CURSOR, TOPTION_DROP_ALL, TOPTION_GL_HIGH_ANGLE, + TOPTION_AIM_LEVEL_RESTRICTION, NUM_GAME_OPTIONS, //Toggle up this will be able to be Toggled by the player //These options will NOT be toggable by the Player diff --git a/GameVersion.cpp b/GameVersion.cpp index 226a8f25..95a2f323 100644 --- a/GameVersion.cpp +++ b/GameVersion.cpp @@ -23,7 +23,7 @@ INT16 zVersionLabel[256] = { L"Beta v. 0.98" }; #else //RELEASE BUILD VERSION - INT16 zVersionLabel[256] = { L"Release v1.13.156" }; + INT16 zVersionLabel[256] = { L"Release v1.13.161" }; #endif diff --git a/Tactical/Items.cpp b/Tactical/Items.cpp index a6788093..47f19831 100644 --- a/Tactical/Items.cpp +++ b/Tactical/Items.cpp @@ -7120,8 +7120,12 @@ UINT8 AllowedAimingLevels(SOLDIERTYPE * pSoldier) { UINT8 aimLevels = 4; OBJECTTYPE obj = pSoldier->inv[pSoldier->ubAttackingHand]; + BOOLEAN allowed = TRUE; - if ( ( Weapon[obj.usItem].ubWeaponType == GUN_RIFLE || Weapon[obj.usItem].ubWeaponType == GUN_SN_RIFLE ) && IsScoped( &obj ) ) + if ( gGameSettings.fOptions[TOPTION_AIM_LEVEL_RESTRICTION] && Weapon[obj.usItem].ubWeaponType != GUN_RIFLE && Weapon[obj.usItem].ubWeaponType != GUN_SN_RIFLE ) + allowed = FALSE; + + if ( allowed && IsScoped( &obj ) ) { if ( GetMinRangeForAimBonus(&obj) >= (UINT8)(gGameExternalOptions.ubStraightSightRange * 0.3) ) // >= 30% of sight range (~4 tiles by default) { diff --git a/Utils/_EnglishText.cpp b/Utils/_EnglishText.cpp index 1178203c..b9595c03 100644 --- a/Utils/_EnglishText.cpp +++ b/Utils/_EnglishText.cpp @@ -3415,6 +3415,7 @@ STR16 zOptionsToggleText[] = L"GL Burst Uses Burst Cursor", L"Enemies Drop All Items", L"High Angle Grenade Launching", + L"Restrict Extra Aim Levels to Rifles", }; //This is the help text associated with the above toggles. @@ -3483,7 +3484,8 @@ STR16 zOptionsScreenHelpText[] = L"When ON, the chance to hit is shown on the cursor.", L"GL Burst uses burst cursor.", L"Enemies drop all items on death.", - L"Grenade launchers fire grenades at more vertical angles.", + L"Grenade launchers fire grenades at higher angles.", + L"Aim levels beyond 4 are restricted to rifles and sniper rifles.", }; diff --git a/Utils/_GermanText.cpp b/Utils/_GermanText.cpp index 22993eb4..185efa4c 100644 --- a/Utils/_GermanText.cpp +++ b/Utils/_GermanText.cpp @@ -3218,6 +3218,8 @@ STR16 zOptionsToggleText[] = L"Trefferchance anzeigen", L"GL Burst verwendet Burst- Cursor", L"Gegner lassen alles fallen", + L"High Angle Grenade Launching", + L"Restrict Extra Aim Levels to Rifles", }; //This is the help text associated with the above toggles. @@ -3286,6 +3288,8 @@ STR16 zOptionsScreenHelpText[] = L"Die Trefferchance wird über dem Cursor als Balken angezeigt", L"GL Burst verwendet Burst- Cursor.", L"Gegner lassen bei ihrem Ableben alle Gegenstände zurück.", + L"Grenade launchers fire grenades at higher angles.", + L"Aim levels beyond 4 are restricted to rifles and sniper rifles.", }; STR16 gzGIOScreenText[] = @@ -3488,6 +3492,8 @@ STR16 pMessageStrings[] = L"Paket in Drassen angekommen.", L"%s kommt am %d. um ca. %s am Zielort an (Sektor %s).", //first %s is mercs name(OK), next is the sector location and name where they will be arriving in, lastely is the day an the time of arrival !!!7 It should be like this: first one is merc (OK), next is day of arrival (OK) , next is time of the day for ex. 07:00 (not OK, now it is still sector), next should be sector (not OK, now it is still time of the day) L"Logbuch aktualisiert.", + L"Grenade Launchers - Fire at standard angles", + L"Grenade Launchers - Fire at high angles", #ifdef JA2BETAVERSION L"Spiel erfolgreich in Slot End Turn Auto Save gespeichert.", #endif diff --git a/Utils/_RussianText.cpp b/Utils/_RussianText.cpp index 5d0acfeb..4b1f1841 100644 --- a/Utils/_RussianText.cpp +++ b/Utils/_RussianText.cpp @@ -3403,6 +3403,8 @@ STR16 zOptionsToggleText[] = L"Show Chance to Hit on the cursor", L"GL Burst Uses Burst Cursor", L"Enemies Drop All Items", + L"High Angle Grenade Launching", + L"Restrict Extra Aim Levels to Rifles", }; //This is the help text associated with the above toggles. @@ -3471,6 +3473,8 @@ STR16 zOptionsScreenHelpText[] = L"When ON, the chance to hit is shown on the cursor.", L"GL Burst uses burst cursor.", L"Enemy drop all items, when he is dead.", + L"Grenade launchers fire grenades at higher angles.", + L"Aim levels beyond 4 are restricted to rifles and sniper rifles.", }; @@ -3679,6 +3683,8 @@ STR16 pMessageStrings[] = L"Grenade Bursts - Using Trajectory Cursor (Spread fire disabled)", L"Drop All Enabled", L"Drop All Disabled", + L"Grenade Launchers - Fire at standard angles", + L"Grenade Launchers - Fire at high angles", #ifdef JA2BETAVERSION L"Èãðà ñîõðàíåíà â ÿ÷åéêó àâòî-ñîõðàíåíèÿ.", #endif