Fix a problem with MSVC and fix some typos
This commit is contained in:
parent
02b758c87b
commit
1263b55c8e
1 changed files with 8 additions and 4 deletions
|
@ -847,21 +847,25 @@ do_replay (const SGPropertyNode * arg)
|
||||||
|
|
||||||
|
|
||||||
static bool
|
static bool
|
||||||
do_decrease_visability (const SGPropertyNode * arg)
|
do_decrease_visibility (const SGPropertyNode * arg)
|
||||||
{
|
{
|
||||||
double new_value = fgGetDouble("/environment/visibility-m") * 0.9;
|
double new_value = fgGetDouble("/environment/visibility-m") * 0.9;
|
||||||
fgSetDouble("/environment/visibility-m", new_value);
|
fgSetDouble("/environment/visibility-m", new_value);
|
||||||
fgDefaultWeatherValue("visibility-m", new_value);
|
fgDefaultWeatherValue("visibility-m", new_value);
|
||||||
globals->get_subsystem("environment")->reinit();
|
globals->get_subsystem("environment")->reinit();
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool
|
static bool
|
||||||
do_increase_visability (const SGPropertyNode * arg)
|
do_increase_visibility (const SGPropertyNode * arg)
|
||||||
{
|
{
|
||||||
double new_value = fgGetDouble("/environment/visibility-m") * 1.1;
|
double new_value = fgGetDouble("/environment/visibility-m") * 1.1;
|
||||||
fgSetDouble("/environment/visibility-m", new_value);
|
fgSetDouble("/environment/visibility-m", new_value);
|
||||||
fgDefaultWeatherValue("visibility-m", new_value);
|
fgDefaultWeatherValue("visibility-m", new_value);
|
||||||
globals->get_subsystem("environment")->reinit();
|
globals->get_subsystem("environment")->reinit();
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -913,8 +917,8 @@ static struct {
|
||||||
{ "presets-commit", do_presets_commit },
|
{ "presets-commit", do_presets_commit },
|
||||||
{ "log-level", do_log_level },
|
{ "log-level", do_log_level },
|
||||||
{ "replay", do_replay },
|
{ "replay", do_replay },
|
||||||
{ "decrease-visibility", do_decrease_visability },
|
{ "decrease-visibility", do_decrease_visibility },
|
||||||
{ "increase-visibility", do_increase_visability },
|
{ "increase-visibility", do_increase_visibility },
|
||||||
{ 0, 0 } // zero-terminated
|
{ 0, 0 } // zero-terminated
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue