aboutsummaryrefslogtreecommitdiff
path: root/src/levels/level3.c
diff options
context:
space:
mode:
authornathansmithsmith <thenathansmithsmith@gmail.com>2023-12-04 10:54:15 -0700
committernathansmithsmith <thenathansmithsmith@gmail.com>2023-12-04 10:54:15 -0700
commita14e6109a5096b23f9a27bcd2010c23e9ca1753f (patch)
treee54690d0b2628d0e50f582c00659350c11e5023a /src/levels/level3.c
parent8bd37d4fe75a43deab8d6f24b481c23d7f965c5a (diff)
Started level 4
Diffstat (limited to 'src/levels/level3.c')
-rw-r--r--src/levels/level3.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/levels/level3.c b/src/levels/level3.c
index 4d688fc..bd1f559 100644
--- a/src/levels/level3.c
+++ b/src/levels/level3.c
@@ -37,19 +37,15 @@ bool updateLevel3(Game * game, Levels * levels) {
Level3 * data = (Level3*)levels->data;
bool levelDone = false;
- Vector3 groups[] = {
- (Vector3){0.0, 0.0, 800.0},
- (Vector3){0.0, 0.0, -800.0}
- };
-
switch (data->stage) {
case 0:
if (game->world.entitiesCount == 1) {
Vector3 playerPosition = getEntityFromWorld(game->world, 0)->position;
Vector3 spacing = (Vector3){0.0, 15.0, 15.0};
- for (i = 0; i < sizeof(groups) / sizeof(Vector3); ++i)
- addSoldatoGroupWithLeader(game, ENTITY_CAPORALE, 3, Vector3Add(groups[i], playerPosition), spacing);
+ addSoldatoGroupWithLeader(game, ENTITY_CAPORALE, 3, Vector3Add((Vector3){0.0, 0.0, 800.0}, playerPosition), spacing);
+ spacing = Vector3Negate(spacing);
+ addSoldatoGroupWithLeader(game, ENTITY_CAPORALE, 3, Vector3Add((Vector3){0.0, 0.0, -800.0}, playerPosition), spacing);
data->stage = 1;
}