]> git.pond.sub.org Git - empserver/commitdiff
unit: Fix comments on struct ulist member use
authorMarkus Armbruster <armbru@pond.sub.org>
Sat, 25 Jan 2014 09:18:04 +0000 (10:18 +0100)
committerMarkus Armbruster <armbru@pond.sub.org>
Wed, 14 Jan 2015 18:08:46 +0000 (19:08 +0100)
Members x, y, eff, supplied are not "LAND only", they're used only by
ground combat.  They're not used by march.

In ground combat, member mobil is not how much the land unit has left,
it's how much it still needs to be charged.

Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
include/unit.h

index 87730155a6a9555a0a526d235676d0dccea47fd4..28ab3f9b30da649ba64ffa6b13199dd4bc308479 100644 (file)
@@ -28,7 +28,7 @@
  *
  *  Known contributors to this file:
  *     Ron Koenderink, 2006-2007
- *     Markus Armbruster, 2006-2013
+ *     Markus Armbruster, 2006-2014
  */
 
 #ifndef UNIT_H
 
 struct ulist {
     struct emp_qelem queue;    /* list of units */
-    double mobil;              /* how much mobility the unit has left */
+    double mobil;              /* moving: how much the unit has left
+                                  ground combat: how much to charge */
     struct empobj_chr *chrp;   /* pointer to characteristics unit */
     union empobj_storage unit; /* unit */
-    coord x, y;                        /* x,y it came from LAND only */
-    int eff;                   /* LAND only */
-    int supplied;              /* LAND only */
+    /* Rest used only by ground combat (attsub.c) */
+    coord x, y;                        /* x,y it came from */
+    int eff;                   /* initial efficiency */
+    int supplied;
 };
 
 extern void unit_cargo_init(void);