aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authornathansmithsmith <thenathansmithsmith@gmail.com>2023-12-04 14:45:52 -0700
committernathansmithsmith <thenathansmithsmith@gmail.com>2023-12-04 14:45:52 -0700
commit19089d8214538c6049dbbdf7f0df4ebee215c959 (patch)
tree93b81405f2dff9e7073b22f74b110a8c03e048d8 /src
parent3da57634be30691f23915296024baebca3b6297f (diff)
Added part of level 6
Diffstat (limited to 'src')
-rw-r--r--src/entities/guidedMissile.c6
-rw-r--r--src/entities/maresciallo.c4
-rw-r--r--src/entities/maresciallo.h4
-rw-r--r--src/levels/level6.c12
4 files changed, 17 insertions, 9 deletions
diff --git a/src/entities/guidedMissile.c b/src/entities/guidedMissile.c
index 1c1749b..1ab53c9 100644
--- a/src/entities/guidedMissile.c
+++ b/src/entities/guidedMissile.c
@@ -56,10 +56,8 @@ void updateGuidedMissile(Game * game, Entity * entity) {
guidedMissileGoBoomBoom(game, entity);
// Death countdown.
- if (GetTime() - data->birthDay >= GUIDED_MISSILE_DEATH_DAY) {
+ if (GetTime() - data->birthDay >= GUIDED_MISSILE_DEATH_DAY)
guidedMissileGoBoomBoom(game, entity);
- puts("Me is fucking dead!!!!");
- }
entityCheckTransformedCollisionModel(entity);
}
@@ -80,6 +78,4 @@ void guidedMissileGoBoomBoom(Game * game, Entity * entity) {
// Remove its self from the world. I have thought of doing the same for years ):
entity->health = 0.0;
-
- printf("This fucker died %f damage\n", damage);
}
diff --git a/src/entities/maresciallo.c b/src/entities/maresciallo.c
index 4b6ce03..a98919b 100644
--- a/src/entities/maresciallo.c
+++ b/src/entities/maresciallo.c
@@ -11,6 +11,8 @@ void initMaresciallo(Entity * entity, Game * game) {
entity->transformedCollisionModel = entityCreateCollisionModel(*entity->model);
setEntityRadius(entity);
+ entity->health = 0.75;
+
// Allocate data.
entity->data = KF_MALLOC(sizeof(Maresciallo));
@@ -25,7 +27,7 @@ void initMaresciallo(Entity * entity, Game * game) {
data->timeSinceLastMissileShot = GetTime();
PIDConfig flyToPointPID = (PIDConfig){
- .kP = 1.1,
+ .kP = 1.5,
.kI = 0.0,
.kD = 0.0,
.angleMode = false,
diff --git a/src/entities/maresciallo.h b/src/entities/maresciallo.h
index 2d46eeb..b165a2f 100644
--- a/src/entities/maresciallo.h
+++ b/src/entities/maresciallo.h
@@ -4,8 +4,8 @@
#ifndef MARESCIALLO_H
#define MARESCIALLO_H
-#define MARESCIALLO_CIRCLE_AT_DIS 800.0 // 200.0
-#define MARESCIALLO_COME_BACK_AT_DIS 850.0
+#define MARESCIALLO_CIRCLE_AT_DIS 1000.0 // 200.0
+#define MARESCIALLO_COME_BACK_AT_DIS 1050.0
#define MARESCIALLO_ROTATION_SPEED 20.0
#define MARESCIALLO_CIRCLE_PLAYER_SPEED 0.5
diff --git a/src/levels/level6.c b/src/levels/level6.c
index 08e4a55..37397ea 100644
--- a/src/levels/level6.c
+++ b/src/levels/level6.c
@@ -5,7 +5,17 @@
void initLevel6(Game * game, Levels * levels) {
// Add player.
- addEntryToWorld(&game->world, game, (WorldEntry){ENTITY_ANTIFA, (Vector3){0.0, 0.0, 0.0}, QuaternionIdentity()});
+ WorldEntry entries[] = {
+ (WorldEntry){ENTITY_ANTIFA, (Vector3){0.0, 0.0, 0.0}, QuaternionIdentity()},
+ (WorldEntry){ENTITY_MARESCIALLO, (Vector3){0.0, 0.0, 1000.0}, QuaternionIdentity()}
+ };
+
+ addEntriesToWorld(
+ &game->world,
+ game,
+ entries,
+ sizeof(entries) / sizeof(WorldEntry)
+ );
}
void closelevel6(Levels * levels) {