]> git.mxchange.org Git - simgear.git/commitdiff
Some small fixes
authorehofman <ehofman>
Wed, 3 Mar 2004 19:48:28 +0000 (19:48 +0000)
committerehofman <ehofman>
Wed, 3 Mar 2004 19:48:28 +0000 (19:48 +0000)
simgear/scene/material/mat.cxx

index cd863d0ed76e761bbfd0e24514f910899ce7dfe8..76bb3820cedc6e6362eca49dfd505a5b96c644bf 100644 (file)
@@ -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;
 }