mirror of
https://github.com/glest/glest-source.git
synced 2025-08-23 08:22:50 +02:00
- try to see if this helps with the tween bug
This commit is contained in:
@@ -263,7 +263,11 @@ void ParticleRendererGl::renderModel(GameParticleSystem *ps, ModelRenderer *mr){
|
|||||||
//render
|
//render
|
||||||
mr->begin(true, true, false);
|
mr->begin(true, true, false);
|
||||||
float t = ps->getTween();
|
float t = ps->getTween();
|
||||||
assert(t >= 0.0f && t <= 1.0f);
|
|
||||||
|
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);
|
model->updateInterpolationData(t, false);
|
||||||
mr->render(model);
|
mr->render(model);
|
||||||
mr->end();
|
mr->end();
|
||||||
|
@@ -80,8 +80,9 @@ void InterpolationData::updateVertices(float t, bool cycle) {
|
|||||||
//assert(t>=0.0f && t<=1.0f);
|
//assert(t>=0.0f && t<=1.0f);
|
||||||
if(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) + "]");
|
throw runtime_error("t < 0.0f || t > 1.0f t = [" + floatToStr(t) + "]");
|
||||||
|
|
||||||
|
assert(t >= 0.f && t <= 1.f);
|
||||||
}
|
}
|
||||||
assert(t >= 0.f && t <= 1.f);
|
|
||||||
|
|
||||||
uint32 frameCount= mesh->getFrameCount();
|
uint32 frameCount= mesh->getFrameCount();
|
||||||
uint32 vertexCount= mesh->getVertexCount();
|
uint32 vertexCount= mesh->getVertexCount();
|
||||||
@@ -137,7 +138,11 @@ void InterpolationData::updateVertices(float t, bool cycle) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void InterpolationData::updateNormals(float t, bool cycle){
|
void InterpolationData::updateNormals(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.0f && t<=1.0f);
|
||||||
|
}
|
||||||
|
|
||||||
uint32 frameCount= mesh->getFrameCount();
|
uint32 frameCount= mesh->getFrameCount();
|
||||||
uint32 vertexCount= mesh->getVertexCount();
|
uint32 vertexCount= mesh->getVertexCount();
|
||||||
|
Reference in New Issue
Block a user