From bd5560605d31a0e1fccefee854789bb1df2a4fc6 Mon Sep 17 00:00:00 2001 From: david Date: Sun, 17 Nov 2002 00:30:40 +0000 Subject: [PATCH] Patch from Jim Wilson to fix model offsets: Here's a patch to fix the offsets bug. The problem was the transform was just getting added to a local instance rather than being returned by the function. --- src/Model/model.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Model/model.cxx b/src/Model/model.cxx index ef18cf36e..00773806e 100644 --- a/src/Model/model.cxx +++ b/src/Model/model.cxx @@ -284,8 +284,8 @@ fgLoad3DModel (const string &path) } // Set up the alignment node - ssgTransform * align = new ssgTransform; - align->addKid(model); + ssgTransform * alignmainmodel = new ssgTransform; + alignmainmodel->addKid(model); sgMat4 res_matrix; make_offsets_matrix(&res_matrix, props.getFloatValue("/offsets/heading-deg", 0.0), @@ -294,7 +294,7 @@ fgLoad3DModel (const string &path) props.getFloatValue("/offsets/x-m", 0.0), props.getFloatValue("/offsets/y-m", 0.0), props.getFloatValue("/offsets/z-m", 0.0)); - align->setTransform(res_matrix); + alignmainmodel->setTransform(res_matrix); // Load panels unsigned int i; @@ -336,7 +336,7 @@ fgLoad3DModel (const string &path) model->addKid(align); } - return model; + return alignmainmodel; } -- 2.39.5