Look for protocols in aircraft paths
Modified from patch by Slawek Mikula
This commit is contained in:
parent
fad9f7068f
commit
c48c1a06e8
1 changed files with 8 additions and 7 deletions
|
@ -753,13 +753,14 @@ bool FGGeneric::close() {
|
||||||
void
|
void
|
||||||
FGGeneric::reinit()
|
FGGeneric::reinit()
|
||||||
{
|
{
|
||||||
SGPath path( globals->get_fg_root() );
|
SGPath path = globals->resolve_maybe_aircraft_path("Protocol/" + file_name);
|
||||||
path.append("Protocol");
|
if (!path.exists()) {
|
||||||
path.append(file_name.c_str());
|
SG_LOG(SG_NETWORK, SG_WARN, "Couldn't find protocol file for '" << file_name << "'");
|
||||||
|
return;
|
||||||
SG_LOG(SG_NETWORK, SG_INFO, "Reading communication protocol from "
|
}
|
||||||
<< path);
|
|
||||||
|
SG_LOG(SG_NETWORK, SG_INFO, "Reading communication protocol from " << path);
|
||||||
|
|
||||||
SGPropertyNode root;
|
SGPropertyNode root;
|
||||||
try {
|
try {
|
||||||
readProperties(path, &root);
|
readProperties(path, &root);
|
||||||
|
|
Loading…
Reference in a new issue