When letting the variable "quadruped"( in App.cpp, which tells whether or not to create a quadruped) depend on another variable, the biped simulation wouldn't work. This was independent of the value of quadruped.
As long as there was a branch where it could be set to true, the biped would fail, even if the branch path wasn't taken.
Think I fixed it for now. But I don't know what the actual error was.
The error seem to occur on line 339 to 344:
if (quadruped)
{
lLegHeight = scale_0.4f;
footHeight = scale_0.05f;
footLen = scale*0.2f;
}
lLegHeight was being written to (it seemed) even if "quadruped" was false. I can not explain it other that that the error must've been somewhere else and will show up again when I least expect it... :(
This is probably an error caused by something like wrong operator usage(like == instead of = or + instead of += for instance). But I cannot find anything using static code analysis.
Probably cause could be something writing outside an array. GOOD LUCK finding this...
Like a loop iterating too far, so the array is indexed out of bounds.
When letting the variable "quadruped"( in App.cpp, which tells whether or not to create a quadruped) depend on another variable, the biped simulation wouldn't work. This was independent of the value of quadruped. As long as there was a branch where it could be set to true, the biped would fail, even if the branch path wasn't taken.
Think I fixed it for now. But I don't know what the actual error was. The error seem to occur on line 339 to 344: if (quadruped) { lLegHeight = scale_0.4f; footHeight = scale_0.05f; footLen = scale*0.2f; } lLegHeight was being written to (it seemed) even if "quadruped" was false. I can not explain it other that that the error must've been somewhere else and will show up again when I least expect it... :(
This is probably an error caused by something like wrong operator usage(like == instead of = or + instead of += for instance). But I cannot find anything using static code analysis.