summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/protocol.h9
-rw-r--r--include/zombie_chunk.h10
2 files changed, 18 insertions, 1 deletions
diff --git a/include/protocol.h b/include/protocol.h
index e0c47c6..732ea86 100644
--- a/include/protocol.h
+++ b/include/protocol.h
@@ -14,6 +14,7 @@ typedef enum t_network_message_type
MESSAGE_USER_MOVED,
MESSAGE_USER_LOOK,
MESSAGE_USER_THROW,
+ MESSAGE_ZOMBIE_CHUNK_LIST,
MESSAGE_ZOMBIE_LIST,
MESSAGE_USER_SHOOT,
MESSAGE_BULLET_LIST,
@@ -66,6 +67,13 @@ typedef struct t_protocol_zombie_list
zombie zombies[SERVER_MAX_ZOMBIES];
} protocol_zombie_list;
+#include "zombie_chunk.h"
+typedef struct t_protocol_zombie_chunk_list
+{
+ network_message_type type;
+ zombie_chunk zombie_chunks[MAX_ZOMBIE_CHUNKS];
+} protocol_zombie_chunk_list;
+
#include "drops.h"
typedef struct t_protocol_drop_list
{
@@ -150,6 +158,7 @@ network_message create_protocol_user_look(u32 id, float gunx, float guny);
network_message create_protocol_user_shoot(u32 id, float dirx, float diry);
network_message create_protocol_user_throw(u32 id, float dirx, float diry, throwable_type type);
network_message create_protocol_zombie_list();
+network_message create_protocol_zombie_chunk_list();
network_message create_protocol_bullets_list();
network_message create_protocol_drop_list();
network_message create_protocol_throwables_list();
diff --git a/include/zombie_chunk.h b/include/zombie_chunk.h
index f0ad5b1..d774026 100644
--- a/include/zombie_chunk.h
+++ b/include/zombie_chunk.h
@@ -5,6 +5,13 @@
#include "objects.h"
+typedef enum t_zombie_chunk_type
+{
+ CHUNK_FOOT,
+ CHUNK_HAND,
+ CHUNK_SPLATTER,
+} zombie_chunk_type;
+
typedef struct t_zombie_chunk {
bool active;
vec3f start_position;
@@ -12,7 +19,8 @@ typedef struct t_zombie_chunk {
vec3f target_position;
float duration;
vec2f direction;
- image* img;
+ zombie_chunk_type type;
+ int random_chunk;
float rotation;
float rotation_speed;
} zombie_chunk;