--- deliantra/server/include/player.h 2006/08/29 08:01:36 1.10 +++ deliantra/server/include/player.h 2006/09/04 11:07:59 1.12 @@ -1,9 +1,4 @@ /* - * static char *rcsid_player_h = - * "$Id$"; - */ - -/* CrossFire, A Multiplayer game for X-windows Copyright (C) 2002 Mark Wedel & Crossfire Development Team @@ -28,7 +23,7 @@ #define NUM_OUTPUT_BUFS 5 typedef struct { - const char *buf; /* Actual string pointer */ + shstr buf; /* Actual string pointer */ uint32 first_update; /* First time this message was stored */ uint16 count; /* How many times we got this message */ } Output_Buf; @@ -107,7 +102,7 @@ } partylist; // memsettable part of player -struct player_memset +struct player_pod { object *ob; /* The object representing the player */ mapstruct *loading; /* When entering a map in progress of loading, not really used */ @@ -136,7 +131,7 @@ /* Try to put all the bitfields together - saves some small amount of memory */ uint32 braced:1; /* Will not move if braced, only attack */ uint32 tmp_invis:1; /* Will invis go away when we attack ? */ - const char *invis_race; /* What race invisible to? */ + shstr invis_race; /* What race invisible to? */ uint32 do_los:1; /* If true, need to call update_los() in draw(), and clear */ uint32 fire_on:1; /* Player should fire object, not move */ uint32 run_on:1; /* Player should keep moving in dir until run is off */ @@ -212,10 +207,8 @@ int stack_position; /* Current stack position, 0 for no item */ }; -typedef struct pl : player_memset, attachable +typedef struct pl : zero_initialised, attachable, player_pod { - static data_type get_dt () { return DT_PLAYER; } - struct pl *next; /* Pointer to next player, NULL if this is last */ NewSocket socket; /* Socket information for this player */ } player;