1
0
Fork 0

Nasal geodinfo: warn when scenery is not loaded

This commit is contained in:
James Turner 2020-03-13 16:46:54 +00:00
parent 8edcaa4853
commit 9389c6564f

View file

@ -1457,8 +1457,10 @@ static naRef f_geodinfo(naContext c, naRef me, int argc, naRef* args)
if (scenery == nullptr)
return naNil();
if(!scenery->get_elevation_m(geod, elev, &material))
return naNil();
if(!scenery->get_elevation_m(geod, elev, &material)) {
SG_LOG(SG_TERRAIN, SG_DEV_WARN, "Nasal geodinfo() querying location with no loaded tiles:" << geod);
return naNil();
}
naRef vec = naNewVector(c);
naVec_append(vec, naNum(elev));