From 7d4d948dfa92416c802229b1c444a44785ee2a0c Mon Sep 17 00:00:00 2001 From: nathansmithsmith Date: Tue, 12 Sep 2023 21:53:32 -0600 Subject: Guided missile worky worky --- src/entities/maresciallo.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/entities/maresciallo.c') diff --git a/src/entities/maresciallo.c b/src/entities/maresciallo.c index 34d3377..52c5d96 100644 --- a/src/entities/maresciallo.c +++ b/src/entities/maresciallo.c @@ -105,6 +105,11 @@ void updateGunMaresciallo(Game * game, Entity * entity) { Bullet bullet = createBulletFromEntity(*entity, MARESCIALLO_BULLET_DAMAGE); BulletHitInfo hit = shootBulletAtEntity(player, bullet); + // Testing missile. + Entity missile = createEntity(ENTITY_GUIDED_MISSILE, game); + missile.position = entity->position; + scheduleEntityToAdd(&game->world, missile); + data->timeSinceLastBulletShot = t; } @@ -123,14 +128,14 @@ void updateMaresciallo(Game * game, Entity * entity) { circlePlayerMaresciallo(game, entity); } + updateGunMaresciallo(game, entity); + entityCheckTransformedCollisionModel(entity); } void drawMaresciallo(Game * game, Entity * entity) { entityDraw(entity); - updateGunMaresciallo(game, entity); - // Entity * player = getEntityFromWorld(game->world, 0); // DrawLine3D(entity->position, player->position, BLUE); } -- cgit v1.2.3