This commit is contained in:
Claudel-D-Roy 2023-12-06 17:02:36 -05:00
parent 57bfacf942
commit 18f08feb68

View File

@ -126,8 +126,13 @@ void RemotePlayer::Render(TextureAtlas& atlas, Shader& shader, Transformation tr
time += elapsedTime; time += elapsedTime;
if (time >= 200) if (time >= 200)
{ {
time -= 200; time -= 200;
Shooting = !Shooting; if (!current.states.shooting)
Shooting = false;
else {
Shooting = !Shooting;
}
} }
@ -135,6 +140,7 @@ void RemotePlayer::Render(TextureAtlas& atlas, Shader& shader, Transformation tr
if (angle >= 0.75) //Face //side positif if (angle >= 0.75) //Face //side positif
{ {
if(current.states.shooting){ if(current.states.shooting){
if (Shooting) if (Shooting)
index = 17; index = 17;
@ -152,10 +158,13 @@ void RemotePlayer::Render(TextureAtlas& atlas, Shader& shader, Transformation tr
else if (current.states.running && current.states.still) else if (current.states.running && current.states.still)
index = 0; index = 0;
} }
else if (angle >= 0.25 && isLeft) //Frontleft else if (angle >= 0.25 && isLeft) //Frontleft
{ {
if (current.states.shooting) { if (current.states.shooting) {
if (Shooting) if (Shooting)
index = 18; index = 18;
@ -176,6 +185,8 @@ void RemotePlayer::Render(TextureAtlas& atlas, Shader& shader, Transformation tr
} }
else if (angle >= -0.25 && isLeft) //ProfileLeft else if (angle >= -0.25 && isLeft) //ProfileLeft
{ {
if (current.states.shooting) { if (current.states.shooting) {
if (Shooting) if (Shooting)
index = 20; index = 20;
@ -196,6 +207,8 @@ void RemotePlayer::Render(TextureAtlas& atlas, Shader& shader, Transformation tr
} }
else if (angle >= -0.75 && isLeft) //BackLeft else if (angle >= -0.75 && isLeft) //BackLeft
{ {
if (current.states.shooting) { if (current.states.shooting) {
if (Shooting) if (Shooting)
index = 22; index = 22;
@ -215,6 +228,8 @@ void RemotePlayer::Render(TextureAtlas& atlas, Shader& shader, Transformation tr
} }
else if (angle < -0.75) //Dos //side négatif else if (angle < -0.75) //Dos //side négatif
{ {
if (current.states.shooting) { if (current.states.shooting) {
if (Shooting) if (Shooting)
index = 24; index = 24;
@ -236,6 +251,7 @@ void RemotePlayer::Render(TextureAtlas& atlas, Shader& shader, Transformation tr
else if (angle >= 0.25 && !isLeft) //FrontRight else if (angle >= 0.25 && !isLeft) //FrontRight
{ {
if (current.states.shooting) { if (current.states.shooting) {
if (Shooting) if (Shooting)
index = 19; index = 19;
@ -256,6 +272,8 @@ void RemotePlayer::Render(TextureAtlas& atlas, Shader& shader, Transformation tr
} }
else if (angle >= -0.25 && !isLeft) //ProfileRight else if (angle >= -0.25 && !isLeft) //ProfileRight
{ {
if (current.states.shooting) { if (current.states.shooting) {
if (Shooting) if (Shooting)
index = 21; index = 21;
@ -276,6 +294,8 @@ void RemotePlayer::Render(TextureAtlas& atlas, Shader& shader, Transformation tr
} }
else if (angle >= -0.75 && !isLeft) //BackRight else if (angle >= -0.75 && !isLeft) //BackRight
{ {
if (current.states.shooting) { if (current.states.shooting) {
if (Shooting) if (Shooting)
index = 23; index = 23;