]> git.pond.sub.org Git - empserver/blobdiff - include/plane.h
Extend the common header of struct empobj to include uid
[empserver] / include / plane.h
index a0bb2f96bac545ad12daeeb907f7364a7deb6ee4..f072ba785abd8d5e79061b4b0b72e20f39c74978 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  Empire - A multi-player, client/server Internet based war game.
- *  Copyright (C) 1986-2006, Dave Pare, Jeff Bailey, Thomas Ruschak,
+ *  Copyright (C) 1986-2008, Dave Pare, Jeff Bailey, Thomas Ruschak,
  *                           Ken Stevens, Steve McClure
  *
  *  This program is free software; you can redistribute it and/or modify
 #ifndef PLANE_H
 #define PLANE_H
 
+#include <time.h>
 #include "queue.h"
-#include "sect.h"
+#include "types.h"
 
 #define PLN_TYPE_MAX   46
 #define        PLANE_MINEFF    10
 
 struct plnstr {
-    /* initial part must match struct genitem */
+    /* initial part must match struct empobj */
     short ef_type;
-    natid pln_own;             /* owning country */
     short pln_uid;             /* plane unit id */
+    natid pln_own;             /* owning country */
     coord pln_x;               /* plane x-y */
     coord pln_y;
     signed char pln_type;      /* index in plchr[] */
@@ -59,7 +60,7 @@ struct plnstr {
     coord pln_opy;             /* Op sector coords */
     short pln_mission;         /* mission code */
     short pln_radius;          /* mission radius */
-    /* end of part matching struct genitem */
+    /* end of part matching struct empobj */
     unsigned char pln_range;   /* total distance, not radius */
     unsigned char pln_range_max; /* max range for this plane */
     short pln_ship;            /* pointer to carrier */
@@ -72,7 +73,7 @@ struct plnstr {
     signed char pln_harden;    /* for missiles */
     signed char pln_nuketype;  /* type of nuclear armament (if any) */
     signed char pln_flags;     /* State of the plane */
-    time_t pln_access;         /* Last time mob was updated (MOB_ACCESS) */
+    short pln_access;          /* Last tick mob was updated (MOB_ACCESS) */
     time_t pln_timestamp;      /* Last time this plane was touched */
     float pln_theta;           /* position in orbital sine wave */
 };
@@ -136,7 +137,7 @@ struct plist {
 
 #define getplane(n, p) ef_read(EF_PLANE, (n), (p))
 #define putplane(n, p) ef_write(EF_PLANE, (n), (p))
-#define getplanep(n) (struct plnstr *)ef_ptr(EF_PLANE, (n))
+#define getplanep(n) ((struct plnstr *)ef_ptr(EF_PLANE, (n)))
 
 extern struct plchrstr plchr[PLN_TYPE_MAX + 2];
 
@@ -157,7 +158,7 @@ struct shiplist {
 /* src/lib/subs/aircombat.c */
 extern void ac_combat_headers(natid, natid);
 extern void ac_airtoair(struct emp_qelem *, struct emp_qelem *);
-extern int ac_flak_dam(int);
+extern int ac_flak_dam(int, int, int);
 extern void ac_encounter(struct emp_qelem *, struct emp_qelem *, coord,
                         coord, char *, int, int,
                         struct emp_qelem *, struct emp_qelem *);