]> git.pond.sub.org Git - empserver/commitdiff
(VIS, SANCT, NORM, GOD, CAP, MONEY): Move from nat.h to player.h.
authorMarkus Armbruster <armbru@pond.sub.org>
Fri, 27 Jul 2007 17:50:09 +0000 (17:50 +0000)
committerMarkus Armbruster <armbru@pond.sub.org>
Fri, 27 Jul 2007 17:50:09 +0000 (17:50 +0000)
(PS_LOGIN): Unused, remove.

include/nat.h
include/player.h
src/lib/player/empmod.c

index 4adf6add33165b2bda3659d881eedea631b790be..ba56f2c991665bf874ee50124e4fb04e8e91d28b 100644 (file)
@@ -109,14 +109,6 @@ struct natstr {
     long nat_flags;            /* nation flags */
 };
 
-       /* nstat values */
-#define VIS            bit(0)
-#define SANCT          (bit(1) | VIS)
-#define NORM           (bit(2) | VIS)
-#define GOD            (bit(3) | NORM | VIS)
-#define        CAP             bit(6)
-#define        MONEY           bit(7)
-
        /* nation relation codes */
 #define        AT_WAR          0
 #define SITZKRIEG       1
index ec432e66e376724e2ff41d24da45ed374744d631..39ee2121432e01142fd81640e4c771fdeda915d4 100644 (file)
 #include "queue.h"
 #include "types.h"
 
+       /* nstat values */
+#define VIS            bit(0)
+#define SANCT          (bit(1) | VIS)
+#define NORM           (bit(2) | VIS)
+#define GOD            (bit(3) | NORM | VIS)
+#define        CAP             bit(6)
+#define        MONEY           bit(7)
+
 struct player {
     struct emp_qelem queue;
     empth_t *proc;
@@ -57,7 +65,7 @@ struct player {
     char combuf[1024];         /* command input buffer, UTF-8 */
     char *argp[128];           /* arguments, ASCII */
     char *condarg;             /* conditional, ASCII */
-    time_t lasttime;
+    time_t lasttime;           /* when to debit minleft again */
     int ncomstat;
     int minleft;
     int btused;
@@ -67,7 +75,7 @@ struct player {
     int simulation;            /* e.g. budget command */
     double dolcost;
     int broke;
-    time_t curup;              /* used in calc of minutes used */
+    time_t curup;              /* when last input was received */
     int aborted;
     int curid;                 /* for pr, cur. line's id, -1 none */
     char *map;                 /* pointer to in-mem map */
@@ -75,9 +83,8 @@ struct player {
 };
 
 #define PS_INIT                0
-#define PS_LOGIN       1
-#define PS_PLAYING     2
-#define PS_SHUTDOWN    3
+#define PS_PLAYING     1
+#define PS_SHUTDOWN    2
 
 /* player flags */
 enum {
index ef75bad3f947d5ccfcd676e6b6372fb22e068bb0..190854a20e5f40e9d3b95154c915791a4e5f61a7 100644 (file)
@@ -38,7 +38,7 @@
 #include <config.h>
 
 #include "com.h"
-#include "nat.h"
+#include "player.h"
 #include "prototypes.h"
 
 struct cmndstr player_coms[] = {