Skip to content

Commit 8d5d83c

Browse files
committed
make force fire an option
until we make it configurable
1 parent f51b0ab commit 8d5d83c

6 files changed

Lines changed: 10 additions & 3 deletions

File tree

bin/data/Language/en-GB.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1345,3 +1345,6 @@ en-GB:
13451345
STR_PREFERRED_SFX_FORMAT_DESC: "Chooses the preferred sound effects format to use when multiple ones are available."
13461346
STR_PREFERRED_FORMAT_AUTO: "Auto"
13471347
STR_CURRENT_FORMAT: "Current: {0}"
1348+
STR_MELEE_ACCURACY: "MELEE ACCURACY"
1349+
STR_FORCE_FIRE: "Alternate Fire Method"
1350+
STR_FORCE_FIRE_DESC: "Enables forcing your soldiers to take a shot, regardless of line of fire rules, when holding CTRL"

bin/data/Language/en-US.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1345,3 +1345,6 @@ en-US:
13451345
STR_PREFERRED_SFX_FORMAT_DESC: "Chooses the preferred sound effects format to use when multiple ones are available."
13461346
STR_PREFERRED_FORMAT_AUTO: "Auto"
13471347
STR_CURRENT_FORMAT: "Current: {0}"
1348+
STR_MELEE_ACCURACY: "MELEE ACCURACY"
1349+
STR_FORCE_FIRE: "Alternate Fire Method"
1350+
STR_FORCE_FIRE_DESC: "Enables forcing your soldiers to take a shot, regardless of line of fire rules, when holding CTRL"

src/Battlescape/Projectile.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ int Projectile::calculateTrajectory(double accuracy, Position originVoxel)
103103
!_trajectory.empty() &&
104104
_action.actor->getFaction() == FACTION_PLAYER &&
105105
_action.autoShotCounter == 1 &&
106-
(SDL_GetModState() & KMOD_CTRL) == 0 &&
106+
((SDL_GetModState() & KMOD_CTRL) == 0 || !Options::forceFire) &&
107107
_save->getBattleGame()->getPanicHandled() &&
108108
_action.type != BA_LAUNCH)
109109
{

src/Battlescape/ProjectileFlyBState.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ void ProjectileFlyBState::init()
191191
return;
192192
}
193193

194-
if (_action.type == BA_LAUNCH || ((SDL_GetModState() & KMOD_CTRL) != 0 && _parent->getSave()->getSide() == FACTION_PLAYER) || !_parent->getPanicHandled())
194+
if (_action.type == BA_LAUNCH || (Options::forceFire && (SDL_GetModState() & KMOD_CTRL) != 0 && _parent->getSave()->getSide() == FACTION_PLAYER) || !_parent->getPanicHandled())
195195
{
196196
// target nothing, targets the middle of the tile
197197
_targetVoxel = Position(_action.target.x*16 + 8, _action.target.y*16 + 8, _action.target.z*24 + 12);

src/Engine/Options.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,7 @@ void create()
163163
_info.push_back(OptionInfo("weaponSelfDestruction", &weaponSelfDestruction, false, "STR_WEAPONSELFDESTRUCTION", "STR_BATTLESCAPE"));
164164
_info.push_back(OptionInfo("allowPsionicCapture", &allowPsionicCapture, false, "STR_ALLOWPSIONICCAPTURE", "STR_BATTLESCAPE"));
165165
_info.push_back(OptionInfo("strafe", &strafe, false, "STR_STRAFE", "STR_BATTLESCAPE"));
166+
_info.push_back(OptionInfo("forceFire", &forceFire, true, "STR_FORCE_FIRE", "STR_BATTLESCAPE"));
166167
_info.push_back(OptionInfo("skipNextTurnScreen", &skipNextTurnScreen, false, "STR_SKIPNEXTTURNSCREEN", "STR_BATTLESCAPE"));
167168
_info.push_back(OptionInfo("TFTDDamage", &TFTDDamage, false, "STR_TFTDDAMAGE", "STR_BATTLESCAPE"));
168169
_info.push_back(OptionInfo("noAlienPanicMessages", &noAlienPanicMessages, false, "STR_NOALIENPANICMESSAGES", "STR_BATTLESCAPE"));

src/Engine/Options.inc.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ OPT ScrollType battleEdgeScroll;
2828
OPT PathPreview battleNewPreviewPath;
2929
OPT int battleScrollSpeed, battleDragScrollButton, battleFireSpeed, battleXcomSpeed, battleAlienSpeed, battleExplosionHeight, battlescapeScale;
3030
OPT bool traceAI, sneakyAI, battleInstantGrenade, battleNotifyDeath, battleTooltips, battleHairBleach, battleAutoEnd,
31-
strafe, showMoreStatsInInventoryView, allowPsionicCapture, skipNextTurnScreen, disableAutoEquip,
31+
strafe, forceFire, showMoreStatsInInventoryView, allowPsionicCapture, skipNextTurnScreen, disableAutoEquip,
3232
battleUFOExtenderAccuracy, battleConfirmFireMode, battleSmoothCamera, TFTDDamage, noAlienPanicMessages, alienBleeding;
3333
OPT SDLKey keyBattleLeft, keyBattleRight, keyBattleUp, keyBattleDown, keyBattleLevelUp, keyBattleLevelDown, keyBattleCenterUnit, keyBattlePrevUnit, keyBattleNextUnit, keyBattleDeselectUnit,
3434
keyBattleUseLeftHand, keyBattleUseRightHand, keyBattleInventory, keyBattleMap, keyBattleOptions, keyBattleEndTurn, keyBattleAbort, keyBattleStats, keyBattleKneel,

0 commit comments

Comments
 (0)