This commit is contained in:
Claudel-D-Roy 2023-12-13 14:06:11 -05:00
parent c801877a0c
commit d8cbc27ca9

View File

@ -125,9 +125,9 @@ void RemotePlayer::Render(TextureAtlas& atlas, Shader& shader, Transformation tr
bool isLeft = side.y > 0;
time += elapsedTime;
if (time >= 100)
if (time >= 500)
{
time -= 100;
time -= 500;
if (!current.states.shooting)
Shooting = false;
else
@ -144,7 +144,6 @@ void RemotePlayer::Render(TextureAtlas& atlas, Shader& shader, Transformation tr
else
index = 9;
std::cout << "face" << std::endl;
}
else if (current.states.jumpshot) {
if (Shooting)
@ -157,6 +156,8 @@ void RemotePlayer::Render(TextureAtlas& atlas, Shader& shader, Transformation tr
else if (!current.states.jumping && !current.states.shooting && !current.states.jumpshot)
index = 0;
}
else if (angle >= 0.25 && isLeft) //Frontleft
{
@ -166,7 +167,6 @@ void RemotePlayer::Render(TextureAtlas& atlas, Shader& shader, Transformation tr
else
index = 10;
std::cout << "Frontleft" << std::endl;
}
else if (current.states.jumpshot) {
if (Shooting)
@ -178,6 +178,7 @@ void RemotePlayer::Render(TextureAtlas& atlas, Shader& shader, Transformation tr
index = 26;
else if (!current.states.jumping && !current.states.shooting && !current.states.jumpshot)
index = 1;
}
else if (angle >= -0.25 && isLeft) //ProfileLeft
@ -188,8 +189,6 @@ void RemotePlayer::Render(TextureAtlas& atlas, Shader& shader, Transformation tr
else
index = 12;
std::cout << "ProfileLeft" << std::endl;
}
else if (current.states.jumpshot ) {
if (Shooting)
@ -201,6 +200,7 @@ void RemotePlayer::Render(TextureAtlas& atlas, Shader& shader, Transformation tr
index = 28;
else if (!current.states.jumping && !current.states.shooting && !current.states.jumpshot)
index = 3;
}
else if (angle >= -0.75 && isLeft) //BackLeft
@ -211,7 +211,6 @@ void RemotePlayer::Render(TextureAtlas& atlas, Shader& shader, Transformation tr
else
index = 14;
std::cout << "BackLeft" << std::endl;
}
else if (current.states.jumpshot) {
if (Shooting)
@ -223,6 +222,8 @@ void RemotePlayer::Render(TextureAtlas& atlas, Shader& shader, Transformation tr
index = 30;
else if (!current.states.jumping && !current.states.shooting && !current.states.jumpshot)
index = 5;
}
else if (angle < -0.75) //Dos - side négatif
{
@ -232,7 +233,6 @@ void RemotePlayer::Render(TextureAtlas& atlas, Shader& shader, Transformation tr
else
index = 16;
std::cout << "Dos" << std::endl;
}
else if (current.states.jumpshot) {
if (Shooting)
@ -244,6 +244,7 @@ void RemotePlayer::Render(TextureAtlas& atlas, Shader& shader, Transformation tr
index = 32;
else if (!current.states.jumping && !current.states.shooting && !current.states.jumpshot)
index = 7;
}
else if (angle >= 0.25 && !isLeft) //FrontRight
@ -253,8 +254,6 @@ void RemotePlayer::Render(TextureAtlas& atlas, Shader& shader, Transformation tr
index = 19;
else
index = 11;
std::cout << "FrontRight" << std::endl;
}
else if (current.states.jumpshot) {
if (Shooting)
@ -267,6 +266,7 @@ void RemotePlayer::Render(TextureAtlas& atlas, Shader& shader, Transformation tr
else if (!current.states.jumping && !current.states.shooting && !current.states.jumpshot)
index = 2;
}
else if (angle >= -0.25 && !isLeft) //ProfileRight
{
@ -275,8 +275,6 @@ void RemotePlayer::Render(TextureAtlas& atlas, Shader& shader, Transformation tr
index = 21;
else
index = 13;
std::cout << "ProfileRight" << std::endl;
}
else if (current.states.jumpshot) {
if (Shooting)
@ -289,6 +287,7 @@ void RemotePlayer::Render(TextureAtlas& atlas, Shader& shader, Transformation tr
else if (!current.states.jumping && !current.states.shooting && !current.states.jumpshot)
index = 4;
}
else if (angle >= -0.75 && !isLeft) //BackRight
{
@ -298,9 +297,6 @@ void RemotePlayer::Render(TextureAtlas& atlas, Shader& shader, Transformation tr
else
index = 15;
std::cout << "BackRight" << std::endl;
}
else if (current.states.jumpshot) {
if (Shooting)
@ -313,6 +309,7 @@ void RemotePlayer::Render(TextureAtlas& atlas, Shader& shader, Transformation tr
else if (!current.states.jumping && !current.states.shooting && !current.states.jumpshot)
index = 6;
}