diff options
author | nathansmithsmith <nathansmith7@mailfence.com> | 2023-09-12 21:53:32 -0600 |
---|---|---|
committer | nathansmithsmith <nathansmith7@mailfence.com> | 2023-09-12 21:53:32 -0600 |
commit | 7d4d948dfa92416c802229b1c444a44785ee2a0c (patch) | |
tree | 129fcf7141640ec8b3c7647de174755d04858ce2 /src/entities/maresciallo.c | |
parent | c759231e1e8570ffe5fdda2f1eb5d011b1c6a29f (diff) |
Guided missile worky worky
Diffstat (limited to 'src/entities/maresciallo.c')
-rw-r--r-- | src/entities/maresciallo.c | 9 |
1 files changed, 7 insertions, 2 deletions
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); } |