aboutsummaryrefslogtreecommitdiff
path: root/src/entity.h
diff options
context:
space:
mode:
authornathansmithsmith <nathansmith7@mailfence.com>2023-07-26 03:03:20 -0600
committernathansmithsmith <nathansmith7@mailfence.com>2023-07-26 03:03:20 -0600
commitf6dc479873edc98704dcf1ffb116ba5da03805b2 (patch)
tree6da0020b31e86c400e2b8227567c60e59fa4961c /src/entity.h
parent36f6241dc874c95d7494cf739b7947e7a9541b51 (diff)
Better soldato following
Diffstat (limited to 'src/entity.h')
-rw-r--r--src/entity.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/entity.h b/src/entity.h
index 6246fdd..5faa413 100644
--- a/src/entity.h
+++ b/src/entity.h
@@ -72,6 +72,15 @@ typedef struct EntityCollision {
EntityFingerprint fromFingerprint;
} EntityCollision;
+// Used for hanlding the soldato follower and leader thing.
+typedef struct EntityFollow {
+ EntityId leaderId;
+ EntityFingerprint leaderFingerprint;
+
+ EntityId followerId;
+ EntityFingerprint followerFingerprint;
+} EntityFollow;
+
// Health stuff.
#define ENTITY_MIN_HEALTH 0.0
#define ENTITY_MAX_HEALTH 1.0
@@ -105,6 +114,8 @@ typedef struct Entity {
EntityUpdateCb updateCb;
EntityDrawCb drawCb;
+ EntityFollow follow;
+
// Health is a percent from 1.0 to 0.0.
float health;