From f0cb4c53631fd29fd490d3b94d6786543a53ce9b Mon Sep 17 00:00:00 2001 From: sf17k Date: Mon, 15 Apr 2013 20:43:25 -0400 Subject: [PATCH] fix a crash --- Source/Skeleton.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Source/Skeleton.cpp b/Source/Skeleton.cpp index 115b1cc..35fb1f7 100644 --- a/Source/Skeleton.cpp +++ b/Source/Skeleton.cpp @@ -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; -- 2.39.5