From a0251b32569389072f0abb6ea49b445ae35c8897 Mon Sep 17 00:00:00 2001 From: ehofman Date: Wed, 3 Mar 2004 19:48:28 +0000 Subject: [PATCH] Some small fixes --- simgear/scene/material/mat.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/simgear/scene/material/mat.cxx b/simgear/scene/material/mat.cxx index cd863d0e..76bb3820 100644 --- a/simgear/scene/material/mat.cxx +++ b/simgear/scene/material/mat.cxx @@ -209,9 +209,11 @@ SGMaterial::get_state (int n) } if ( _current_ptr >= _status.size()) - _current_ptr = 0; + ((SGMaterial *)this)->_current_ptr = 0; - return (n >= 0) ? _status[n].state : _status[_current_ptr++].state; + ssgSimpleState *st = (n >= 0) ? _status[n].state : _status[_current_ptr].state; + ((SGMaterial *)this)->_current_ptr += 1; + return st; } -- 2.39.5