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

View File

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