aboutsummaryrefslogtreecommitdiffstats
path: root/src/world.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/world.c')
-rw-r--r--src/world.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/world.c b/src/world.c
index 1d0aa10..828aaa3 100644
--- a/src/world.c
+++ b/src/world.c
@@ -482,6 +482,9 @@ Seed generateWorldUtilityPoles(World* world, Seed seed, int start, int end)
Entity entity = createEntity(UTILITY_POLE, Vector3Zero());
seed = putEntityInRandomPlace(world, seed, &entity);
world->entities[index] = entity;
+
+ world->utilityPoleTransforms[index - start] = MatrixTranslate(
+ entity.position.x, entity.position.y, entity.position.z);
}
return seed;
@@ -614,6 +617,11 @@ void updateWorld(World* world, Game* game)
updateEntity(&world->entities[index], game);
}
+ DrawMeshInstanced(game->assets.models[UTILITY_POLE_MODEL].meshes[0],
+ game->assets.models[UTILITY_POLE_MODEL].materials[0],
+ world->utilityPoleTransforms,
+ WORLD_UTILITY_POLE_COUNT);
+
// Draw BVH leafs.
#ifdef FT_DEBUG_MODE
if (IsKeyPressed(KEY_RIGHT))