This commit is contained in:
Claudel-D-Roy 2023-12-13 16:10:21 -05:00
parent 136f589975
commit 5a3ce00cb2

View File

@ -130,14 +130,9 @@ void RemotePlayer::Render(TextureAtlas& atlas, Shader& shader, Transformation tr
time -= 0.05;
Shooting = !Shooting;
/*if (!current.states.shooting)
Shooting = false;
else
Shooting = true;*/
}
std::cout << Shooting << std::endl;
//std::cout << time << std::endl;
//std::cout << "shooting : " << current.states.shooting << " jumping : " << current.states.jumping << " jumpshot : " << current.states.jumpshot << " running : " << current.states.running << " still : " << current.states.still << " dead : " << current.states.dead << " hit : " << current.states.hit << std::endl;
std::cout << "shooting : " << current.states.shooting << " jumping : " << current.states.jumping << " jumpshot : " << current.states.jumpshot << " running : " << current.states.running << " still : " << current.states.still << " dead : " << current.states.dead << " hit : " << current.states.hit << std::endl;
if (angle >= 0.75) //Face - side positif
{
@ -321,9 +316,23 @@ void RemotePlayer::Render(TextureAtlas& atlas, Shader& shader, Transformation tr
atlas.TextureIndexToCoord(index, u, v, w, h);
glEnable(GL_BLEND);
if (current.states.hit)
{
glBlendFunc(GL_CONSTANT_COLOR, GL_ONE_MINUS_CONSTANT_COLOR);
glBlendColor(1.f, 0.f, 0.f, 1.f);
}
else {
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
}
glBlendEquation(GL_FUNC_ADD);
glLoadMatrixf(tran.GetMatrix().GetInternalValues());
glBegin(GL_QUADS);
glTexCoord2f(u, v); glVertex3f(v1.x, v1.y, v1.z);