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.52 by root, Mon Apr 30 05:54:14 2007 UTC vs.
Revision 1.58 by root, Sat May 26 15:44:05 2007 UTC

83 83
84 sint64 ACC (RW, total_exp); 84 sint64 ACC (RW, total_exp);
85 uint32 ACC (RW, kills); 85 uint32 ACC (RW, kills);
86}; 86};
87 87
88// used for pet monster logic etc.
89static bool
90same_party (partylist *a, partylist *b)
91{
92 return a == b && a;
93}
94
88INTERFACE_CLASS (player) 95INTERFACE_CLASS (player)
89struct player : zero_initialised, attachable 96struct player : zero_initialised, attachable
90{ 97{
91 client *ACC (RO, ns); /* Socket information for this player */ 98 client *ACC (RO, ns); /* Socket information for this player */
92 object *ACC (RW, ob); /* The object representing the player */ 99 object *ACC (RW, ob); /* The object representing the player */
111 bool ACC (RW, braced); /* Will not move if braced, only attack */ 118 bool ACC (RW, braced); /* Will not move if braced, only attack */
112 bool ACC (RW, tmp_invis); /* Will invis go away when we attack ? */ 119 bool ACC (RW, tmp_invis); /* Will invis go away when we attack ? */
113 bool ACC (RW, do_los); /* If true, need to call update_los() in draw(), and clear */ 120 bool ACC (RW, do_los); /* If true, need to call update_los() in draw(), and clear */
114 bool ACC (RW, fire_on); /* Player should fire object, not move */ 121 bool ACC (RW, fire_on); /* Player should fire object, not move */
115 bool ACC (RW, run_on); /* Player should keep moving in dir until run is off */ 122 bool ACC (RW, run_on); /* Player should keep moving in dir until run is off */
116 bool ACC (RW, has_hit); /* If set, weapon_sp instead of speed will count */
117 bool ACC (RW, peaceful); /* If set, won't attack friendly creatures */ 123 bool ACC (RW, peaceful); /* If set, won't attack friendly creatures */
118 bool ACC (RW, hidden); /* If True, player (DM) is hidden from view */ 124 bool ACC (RW, hidden); /* If True, player (DM) is hidden from view */
119 125
120 float ACC (RW, weapon_sp); /* Penalties to speed when fighting w speed >ws/10 */ 126 float ACC (RW, weapon_sp); /* Penalties to speed when fighting w speed >ws/10 */
127 float ACC (RW, weapon_sp_left); // same as speed_left, but for attacks
121 living ACC (RO, orig_stats); /* Permanent real stats of player */ 128 living ACC (RO, orig_stats); /* Permanent real stats of player */
122 object_ptr last_skill_ob[NUM_SKILLS]; /* the exp object */ 129 object_ptr last_skill_ob[NUM_SKILLS]; /* the exp object */
123 object_ptr ACC (RW, last_used); /* Pointer to object last picked or applied */ 130 object_ptr ACC (RW, last_used); /* Pointer to object last picked or applied */
124 131
125 object_ptr ACC (RW, combat_skill); // which skill to use for direct attacks
126 object_ptr ACC (RW, combat_ob); // which weapon to use 132 object_ptr ACC (RW, combat_ob); // which weapon/bow/skill to use for direct attacks
127 object_ptr ACC (RW, ranged_skill); // which skill to use for ranged attacks 133 object_ptr ACC (RW, ranged_ob); // which skill/item/spell to use for ranged attacks
128 object_ptr ACC (RW, ranged_ob); // bow/spell
129 object_ptr ACC (RW, golem); // the currently controlled golem 134 object_ptr ACC (RW, golem); // the currently controlled golem
130 135
131 sint16 ACC (RW, bed_x), ACC (RW, bed_y); /* x,y - coordinates of respawn (savebed) */ 136 sint16 ACC (RW, bed_x), ACC (RW, bed_y); /* x,y - coordinates of respawn (savebed) */
132 shstr ACC (RW, savebed_map); /* map where player will respawn after death */ 137 shstr ACC (RW, savebed_map); /* map where player will respawn after death */
133 shstr ACC (RW, maplevel); /* On which level is the player? */ 138 shstr ACC (RW, maplevel); /* On which level is the player? */
178 183
179 // wether the player can "see" this mapspace or not, decided by los 184 // wether the player can "see" this mapspace or not, decided by los
180 // 0 - nothing see, 100 - fully visible 185 // 0 - nothing see, 100 - fully visible
181 MTH sint8 visibility_at (maptile *map, int x, int y) const; 186 MTH sint8 visibility_at (maptile *map, int x, int y) const;
182 187
183 MTH void set_skill (object *skill, object *ob = 0);
184
185 MTH void connect (client *ns); 188 MTH void connect (client *ns);
186 MTH void disconnect (); 189 MTH void disconnect ();
187 190
188 MTH void activate (); 191 MTH void activate ();
189 MTH void deactivate (); 192 MTH void deactivate ();
190
191 // enters the initial map, after login or creation
192 MTH void enter_map ();
193 193
194 MTH void chargen_race_done (); 194 MTH void chargen_race_done ();
195 MTH void chargen_race_next (); 195 MTH void chargen_race_next ();
196 196
197 ~player (); 197 ~player ();

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines