From ff9b7ebd64c2755a6ebb38994e99b9cf3cffecca Mon Sep 17 00:00:00 2001 From: mfranz Date: Wed, 15 Feb 2006 08:25:23 +0000 Subject: [PATCH] cleanup --- src/Input/input.cxx | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/src/Input/input.cxx b/src/Input/input.cxx index 37820e1ba..c6540efd1 100644 --- a/src/Input/input.cxx +++ b/src/Input/input.cxx @@ -324,19 +324,11 @@ FGInput::doMouseClick (int b, int updown, int x, int y) Point3D geod = sgCartToGeod(Point3D(hit[0], hit[1], hit[2])); - static SGPropertyNode_ptr lon - = fgGetNode("/sim/input/click/longitude-deg", true); - static SGPropertyNode_ptr lat - = fgGetNode("/sim/input/click/latitude-deg", true); - static SGPropertyNode_ptr elev_m - = fgGetNode("/sim/input/click/elevation-m", true); - static SGPropertyNode_ptr elev_ft - = fgGetNode("/sim/input/click/elevation-ft", true); - - lon->setDoubleValue(geod.lon() * SGD_RADIANS_TO_DEGREES); - lat->setDoubleValue(geod.lat() * SGD_RADIANS_TO_DEGREES); - elev_m->setDoubleValue(geod.elev()); - elev_ft->setDoubleValue(geod.elev() * SG_METER_TO_FEET); + SGPropertyNode *c = fgGetNode("/sim/input/click", true); + c->setDoubleValue("longitude-deg", geod.lon() * SGD_RADIANS_TO_DEGREES); + c->setDoubleValue("latitude-deg", geod.lat() * SGD_RADIANS_TO_DEGREES); + c->setDoubleValue("elevation-m", geod.elev()); + c->setDoubleValue("elevation-ft", geod.elev() * SG_METER_TO_FEET); } } }