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