From 5c9d6063a4ffa32024df2d796e287bed852dc3fd Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Sat, 25 Jan 2014 10:18:04 +0100 Subject: [PATCH] unit: Fix comments on struct ulist member use 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 --- include/unit.h | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/include/unit.h b/include/unit.h index 87730155..28ab3f9b 100644 --- a/include/unit.h +++ b/include/unit.h @@ -28,7 +28,7 @@ * * Known contributors to this file: * Ron Koenderink, 2006-2007 - * Markus Armbruster, 2006-2013 + * Markus Armbruster, 2006-2014 */ #ifndef UNIT_H @@ -38,12 +38,14 @@ 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);