From f6dc479873edc98704dcf1ffb116ba5da03805b2 Mon Sep 17 00:00:00 2001 From: nathansmithsmith Date: Wed, 26 Jul 2023 03:03:20 -0600 Subject: Better soldato following --- src/entity.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/entity.h') 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; -- cgit v1.2.3