}
}
-//void Boar::draw(drawTarget _target) const
-//{
-// switch (_target)
-// {
-// case DRAW_ModelMotionBlur:
-// //upload new->old model
-// Shader::getShader(SH_ACTIVE)->setUniformLocation("uCur2OldModel", oldModelMat * glm::inverse(modelMat));
-// case DRAW_Model:
-// default:
-// if (alive)
-// texture->useTexture();
-// else
-// texture_dead->useTexture();
-//
-// if (timeresistant)
-// Shader::getShader(SH_ACTIVE)->setUniformLocation("uAddGlow", true);
-// model->drawModel(modelMat, dr_Model, vec4(0.9f, 0.f, 0.f, 1.f), currentAnimation, AnimationTime);
-// if (timeresistant)
-// Shader::getShader(SH_ACTIVE)->setUniformLocation("uAddGlow", false);
-// break;
-// case DRAW_Wire:
-// if (alive)
-// texture->useTexture();
-// else
-// texture_dead->useTexture();
-// model->drawModel(modelMat, dr_WireT, vec4(0.9f, 0.f, 0.f, 1.f), currentAnimation, AnimationTime);
-// break;
-// case DRAW_Coll:
-// if (collision != nullptr)
-// collision->drawModel(modelMat, dr_WireC, vec4(0.9f, 0.f, 0.f, 1.f), currentAnimation, AnimationTime);
-// break;
-// }
-// /* Draw Object*/
-//
-//}
+void Boar::draw(drawTarget _target) const
+{
+ switch (_target)
+ {
+ case DRAW_ModelMotionBlur:
+ //upload new->old model
+ Shader::getShader(SH_ACTIVE)->setUniformLocation("uCur2OldModel", oldModelMat * glm::inverse(modelMat));
+ case DRAW_Model:
+ default:
+ if (alive)
+ texture->useTexture();
+ else
+ texture_dead->useTexture();
+
+ if (timeresistant)
+ Shader::getShader(SH_ACTIVE)->setUniformLocation("uAddGlow", true);
+ model->drawModel(modelMat, dr_Model, vec4(0.9f, 0.f, 0.f, 1.f), currentAnimation, AnimationTime);
+ if (timeresistant)
+ Shader::getShader(SH_ACTIVE)->setUniformLocation("uAddGlow", false);
+ break;
+ case DRAW_Wire:
+ if (alive)
+ texture->useTexture();
+ else
+ texture_dead->useTexture();
+ model->drawModel(modelMat, dr_WireT, vec4(0.9f, 0.f, 0.f, 1.f), currentAnimation, AnimationTime);
+ break;
+ case DRAW_Coll:
+ if (collision != nullptr)
+ collision->drawModel(modelMat, dr_WireC, vec4(0.9f, 0.f, 0.f, 1.f), currentAnimation, AnimationTime);
+ break;
+ }
+ /* Draw Object*/
+
+}
void Boar::collides(SceneObject * _other, btPersistentManifold * _contactManifold, float _deltaT)
{
}
- if (normal[1] <= .3f && pdist<0 && pdist > -1)
+ if (normal[1] <= .4f && pdist<0 && pdist > -1)
{
_other->move(-pdist * (float).5 * vec3(normal[0], 0.f, normal[2]));
_other->move_delta = 0;