Skip to content

Commit

Permalink
v2.7.1: Pequena correção na geração de inimigos
Browse files Browse the repository at this point in the history
  • Loading branch information
ErFer7 committed May 25, 2021
1 parent 5b428d0 commit 3ce877e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Main.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Sobreviva - Jogo de Testes - V 2.7 - ErFer7
// Sobreviva - Jogo de Testes - V 2.7.1 - ErFer7
// Use "gcc Source.c Main.c -o Survive -O2 -s -DNDEBUG" para compilar.

/***
Expand Down
6 changes: 3 additions & 3 deletions Source.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,14 @@ void GameInit(unsigned int t)
// Versão
Text version = {

.content = "v2.7",
.content = "v2.7.1",
.color = 7,
.position = {1, 1},
.update = 0};

CalculateAlignedPosition(&version.position[0],
&version.position[1],
4,
6,
1,
TOP_LEFT);

Expand Down Expand Up @@ -1182,7 +1182,7 @@ void UpdatePhysics()
distanceFromPlayer = sqrtf(powf((enemySpawnX - targetPositionX), 2.0f) +
powf((enemySpawnY - targetPositionY), 2.0f));

} while (objectPtrInEnemyPosition->type != EMPTY && distanceFromPlayer > 20.0f);
} while (objectPtrInEnemyPosition->type != EMPTY || distanceFromPlayer < 20.0f);

Object enemy = {idCount++,
254,
Expand Down

0 comments on commit 3ce877e

Please sign in to comment.