1
0
Fork 0

Look for protocols in aircraft paths

Modified from patch by Slawek Mikula
This commit is contained in:
James Turner 2019-12-17 22:34:19 +00:00
parent fad9f7068f
commit c48c1a06e8

View file

@ -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);