]> git.jsancho.org Git - lugaru.git/commitdiff
fix a crash
authorsf17k <sf171k@gmail.com>
Tue, 16 Apr 2013 00:43:25 +0000 (20:43 -0400)
committersf17k <sf171k@gmail.com>
Tue, 16 Apr 2013 00:43:25 +0000 (20:43 -0400)
Source/Skeleton.cpp

index 115b1ccbf7006a34343f9be1fd08d814cfc1b808..35fb1f795d6fb054c988d6e242a919c38378f8fd 100644 (file)
@@ -343,7 +343,10 @@ float Skeleton::DoConstraints(XYZ *coords, float *scale)
 
                     if (tutoriallevel != 1 || id == 0)
                         if (findLengthfast(&bounceness) > 8000 && breaking) {
-                            objects.model[k].MakeDecal(breakdecal, DoRotation(temp - objects.position[k], 0, -objects.yaw[k], 0), .4, .5, Random() % 360);
+                            // FIXME: this crashes because k is not initialized!
+                            // to reproduce, type 'wolfie' in console and play a while
+                            // I'll just comment it out for now
+                            //objects.model[k].MakeDecal(breakdecal, DoRotation(temp - objects.position[k], 0, -objects.yaw[k], 0), .4, .5, Random() % 360);
                             Sprite::MakeSprite(cloudsprite, joints[i].position * (*scale) + *coords, joints[i].velocity * .06, 1, 1, 1, 4, .2);
                             breaking = false;
                             camerashake += .6;