- try to see if this helps with the tween bug

This commit is contained in:
Mark Vejvoda
2011-07-19 00:47:25 +00:00
parent ae6b085d7a
commit 45db0a3290
2 changed files with 12 additions and 3 deletions

View File

@@ -263,7 +263,11 @@ void ParticleRendererGl::renderModel(GameParticleSystem *ps, ModelRenderer *mr){
//render
mr->begin(true, true, false);
float t = ps->getTween();
if(t < 0.0f || t > 1.0f) {
printf("ERROR setting tween to [%f]\n",t);
assert(t >= 0.0f && t <= 1.0f);
}
model->updateInterpolationData(t, false);
mr->render(model);
mr->end();

View File

@@ -80,8 +80,9 @@ void InterpolationData::updateVertices(float t, bool cycle) {
//assert(t>=0.0f && t<=1.0f);
if(t < 0.0f || t > 1.0f) {
throw runtime_error("t < 0.0f || t > 1.0f t = [" + floatToStr(t) + "]");
}
assert(t >= 0.f && t <= 1.f);
}
uint32 frameCount= mesh->getFrameCount();
uint32 vertexCount= mesh->getVertexCount();
@@ -137,7 +138,11 @@ void InterpolationData::updateVertices(float t, bool cycle) {
}
void InterpolationData::updateNormals(float t, bool cycle){
if(t < 0.0f || t > 1.0f) {
throw runtime_error("t < 0.0f || t > 1.0f t = [" + floatToStr(t) + "]");
assert(t>=0.0f && t<=1.0f);
}
uint32 frameCount= mesh->getFrameCount();
uint32 vertexCount= mesh->getVertexCount();