Add —disable-hold-short option for MP
Allow explicit disabling of the hold-short behaviour when it causes problems.
This commit is contained in:
parent
b8f28d54c6
commit
b1395a86ba
2 changed files with 5 additions and 4 deletions
|
@ -21,9 +21,7 @@
|
|||
// $Id$
|
||||
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
#include <config.h>
|
||||
|
||||
#include <simgear/compiler.h>
|
||||
#include <simgear/structure/exception.hxx>
|
||||
|
@ -1720,6 +1718,7 @@ struct OptionDesc {
|
|||
{"notrim", false, OPTION_BOOL, "/sim/presets/trim", false, "", 0 },
|
||||
{"on-ground", false, OPTION_BOOL, "/sim/presets/onground", true, "", 0 },
|
||||
{"in-air", false, OPTION_BOOL, "/sim/presets/onground", false, "", 0 },
|
||||
{"disable-hold-short", false, OPTION_BOOL, "/sim/presets/mp-hold-short-override", true, "", 0 },
|
||||
{"fog-disable", false, OPTION_STRING, "/sim/rendering/fog", false, "disabled", 0 },
|
||||
{"fog-fastest", false, OPTION_STRING, "/sim/rendering/fog", false, "fastest", 0 },
|
||||
{"fog-nicest", false, OPTION_STRING, "/sim/rendering/fog", false, "nicest", 0 },
|
||||
|
|
|
@ -180,7 +180,9 @@ std::tuple<SGGeod, double> runwayStartPos(FGRunwayRef runway)
|
|||
double startOffset = fgGetDouble("/sim/airport/runways/start-offset-m", 5.0);
|
||||
SGGeod pos = runway->pointOnCenterline(startOffset);
|
||||
|
||||
if (FGIO::isMultiplayerRequested() && (fabs(offsetNm) <0.1)) {
|
||||
const bool overrideHoldShort = fgGetBool("/sim/presets/mp-hold-short-override", false);
|
||||
|
||||
if (!overrideHoldShort && FGIO::isMultiplayerRequested() && (fabs(offsetNm) <0.1)) {
|
||||
SG_LOG( SG_GENERAL, SG_WARN, "Requested to start on " << runway->airport()->ident() << "/" <<
|
||||
runway->ident() << ", MP is enabled so computing hold short position to avoid runway incursion");
|
||||
|
||||
|
|
Loading…
Reference in a new issue