ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/include/player.h
(Generate patch)

Comparing deliantra/server/include/player.h (file contents):
Revision 1.43 by root, Sun Jan 7 02:39:14 2007 UTC vs.
Revision 1.46 by root, Mon Jan 29 16:11:48 2007 UTC

1/* 1/*
2 CrossFire, A Multiplayer game for X-windows 2 * CrossFire, A Multiplayer game for X-windows
3 3 *
4 Copyright (C) 2005, 2006, 2007 Marc Lehmann & Crossfire+ Development Team 4 * Copyright (C) 2005, 2006, 2007 Marc Lehmann & Crossfire+ Development Team
5 Copyright (C) 2002 Mark Wedel & Crossfire Development Team 5 * Copyright (C) 2002 Mark Wedel & Crossfire Development Team
6 Copyright (C) 1992 Frank Tore Johansen 6 * Copyright (C) 1992 Frank Tore Johansen
7 7 *
8 This program is free software; you can redistribute it and/or modify 8 * This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by 9 * it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2 of the License, or 10 * the Free Software Foundation; either version 2 of the License, or
11 (at your option) any later version. 11 * (at your option) any later version.
12 12 *
13 This program is distributed in the hope that it will be useful, 13 * This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details. 16 * GNU General Public License for more details.
17 17 *
18 You should have received a copy of the GNU General Public License 18 * You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software 19 * along with this program; if not, write to the Free Software
20 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 20 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 21 *
22 The authors can be reached via e-mail at crossfire@schmorp.de 22 * The authors can be reached via e-mail at crossfire@schmorp.de
23*/ 23 */
24 24
25#define NUM_OUTPUT_BUFS 5 25#define NUM_OUTPUT_BUFS 5
26struct Output_Buf 26struct Output_Buf
27{ 27{
28 shstr buf; /* Actual string pointer */ 28 shstr buf; /* Actual string pointer */
132 sint8 ACC (RW, gen_sp); /* Bonuses to regeneration speed of sp */ 132 sint8 ACC (RW, gen_sp); /* Bonuses to regeneration speed of sp */
133 sint8 ACC (RW, gen_sp_armour); /* Penalty to sp regen from armour */ 133 sint8 ACC (RW, gen_sp_armour); /* Penalty to sp regen from armour */
134 sint8 ACC (RW, gen_grace); /* Bonuses to regeneration speed of grace */ 134 sint8 ACC (RW, gen_grace); /* Bonuses to regeneration speed of grace */
135 sint16 ACC (RW, item_power); /* Total item power of objects equipped */ 135 sint16 ACC (RW, item_power); /* Total item power of objects equipped */
136 uint8 ACC (RW, listening); /* Which priority will be used in info_all */ 136 uint8 ACC (RW, listening); /* Which priority will be used in info_all */
137 sint8 ACC (RW, last_level); /* Last level we sent to client */
138 137
139 /* Try to put all the bitfields together - saves some small amount of memory */ 138 /* Try to put all the bitfields together - saves some small amount of memory */
140 bool ACC (RW, braced); /* Will not move if braced, only attack */ 139 bool ACC (RW, braced); /* Will not move if braced, only attack */
141 bool ACC (RW, tmp_invis); /* Will invis go away when we attack ? */ 140 bool ACC (RW, tmp_invis); /* Will invis go away when we attack ? */
142 bool ACC (RW, do_los); /* If true, need to call update_los() in draw(), and clear */ 141 bool ACC (RW, do_los); /* If true, need to call update_los() in draw(), and clear */
144 bool ACC (RW, run_on); /* Player should keep moving in dir until run is off */ 143 bool ACC (RW, run_on); /* Player should keep moving in dir until run is off */
145 bool ACC (RW, has_hit); /* If set, weapon_sp instead of speed will count */ 144 bool ACC (RW, has_hit); /* If set, weapon_sp instead of speed will count */
146 bool ACC (RW, peaceful); /* If set, won't attack friendly creatures */ 145 bool ACC (RW, peaceful); /* If set, won't attack friendly creatures */
147 bool ACC (RW, hidden); /* If True, player (DM) is hidden from view */ 146 bool ACC (RW, hidden); /* If True, player (DM) is hidden from view */
148 147
149 object_ptr last_skill_ob[NUM_SKILLS]; /* the exp object */
150 sint64 last_skill_exp[NUM_SKILLS]; /* shadow register. if != exp. obj update client */
151
152 float ACC (RW, weapon_sp); /* Penalties to speed when fighting w speed >ws/10 */ 148 float ACC (RW, weapon_sp); /* Penalties to speed when fighting w speed >ws/10 */
153 float ACC (RW, last_weapon_sp); /* if diff than weapon_sp, update client */
154 uint16 ACC (RW, last_flags); /* fire/run on flags for last tick */
155 sint32 ACC (RW, last_weight); /* Last weight as sent to client; -1 means do not send weight */
156 sint32 ACC (RW, last_weight_limit); /* Last weight limit transmitted to client */
157 uint32 ACC (RW, last_path_attuned); /* Last spell attunment sent to client */
158 uint32 ACC (RW, last_path_repelled); /* Last spell repelled sent to client */
159 uint32 ACC (RW, last_path_denied); /* Last spell denied sent to client */
160 living ACC (RO, orig_stats); /* Permanent real stats of player */ 149 living ACC (RO, orig_stats); /* Permanent real stats of player */
161 living ACC (RO, last_stats); /* Last stats as sent to client */ 150 object_ptr last_skill_ob[NUM_SKILLS]; /* the exp object */
162 float ACC (RW, last_speed); /* Last speed as sent to client */
163 sint16 ACC (RW, last_resist[NROFATTACKS]); /* last resist values sent to client */
164 object_ptr ACC (RW, last_used); /* Pointer to object last picked or applied */ 151 object_ptr ACC (RW, last_used); /* Pointer to object last picked or applied */
165 152
166 sint16 ACC (RW, bed_x), ACC (RW, bed_y); /* x,y - coordinates of respawn (savebed) */ 153 sint16 ACC (RW, bed_x), ACC (RW, bed_y); /* x,y - coordinates of respawn (savebed) */
167 shstr ACC (RW, savebed_map); /* map where player will respawn after death */ 154 shstr ACC (RW, savebed_map); /* map where player will respawn after death */
168 shstr ACC (RW, maplevel); /* On which level is the player? */ 155 shstr ACC (RW, maplevel); /* On which level is the player? */
179 char ACC (RW, killer)[64]; /* Who killed this player. */ 166 char ACC (RW, killer)[64]; /* Who killed this player. */
180 167
181 char write_buf[MAX_BUF]; /* Holds arbitrary input from client */ /* should go */ 168 char write_buf[MAX_BUF]; /* Holds arbitrary input from client */ /* should go */
182 char ACC (RW, password)[16]; /* 2 (seed) + 11 (crypted) + 1 (EOS) + 2 (safety) = 16 */ 169 char ACC (RW, password)[16]; /* 2 (seed) + 11 (crypted) + 1 (EOS) + 2 (safety) = 16 */
183 170
184 time_t ACC (RW, last_save_time);
185 uint32 ACC (RW, last_save_tick);
186 partylist *ACC (RW, party); /* Party this player is part of */ 171 partylist *ACC (RW, party); /* Party this player is part of */
187 partylist *ACC (RW, party_to_join); /* used when player wants to join a party */ 172 partylist *ACC (RW, party_to_join); /* used when player wants to join a party */
188 /* but we will have to get password first */ 173 /* but we will have to get password first */
189 /* so we have to remember which party to */ 174 /* so we have to remember which party to */
190 /* join */ 175 /* join */
212 MTH bool save_pl (const char *path); 197 MTH bool save_pl (const char *path);
213 198
214 void do_destroy (); 199 void do_destroy ();
215 void gather_callbacks (AV *&callbacks, event_type event) const; 200 void gather_callbacks (AV *&callbacks, event_type event) const;
216 201
202 // wether the player can "see" this mapspace or not, decided by los
203 // 0 - nothing see, 100 - fully visible
204 MTH sint8 visibility_at (maptile *map, int x, int y) const;
205
217 MTH void connect (client *ns); 206 MTH void connect (client *ns);
218 MTH void disconnect (); 207 MTH void disconnect ();
219 208
220 MTH void activate (); 209 MTH void activate ();
221 MTH void deactivate (); 210 MTH void deactivate ();

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines