… | |
… | |
95 | INTERFACE_CLASS (player) |
95 | INTERFACE_CLASS (player) |
96 | struct player : zero_initialised, attachable |
96 | struct player : zero_initialised, attachable |
97 | { |
97 | { |
98 | client *ACC (RO, ns); /* Socket information for this player */ |
98 | client *ACC (RO, ns); /* Socket information for this player */ |
99 | object *ACC (RW, ob); /* The object representing the player */ |
99 | object *ACC (RW, ob); /* The object representing the player */ |
100 | int ACC (RO, active); |
100 | object_vector_index ACC (RO, active); |
101 | |
101 | |
102 | bowtype_t ACC (RW, bowtype); /* which firemode? */ |
102 | bowtype_t ACC (RW, bowtype); /* which firemode? */ |
103 | petmode_t ACC (RW, petmode); /* which petmode? */ |
103 | petmode_t ACC (RW, petmode); /* which petmode? */ |
104 | usekeytype ACC (RW, usekeys); /* Method for finding keys for doors */ |
104 | usekeytype ACC (RW, usekeys); /* Method for finding keys for doors */ |
105 | unapplymode ACC (RW, unapply); /* Method for auto unapply */ |
105 | unapplymode ACC (RW, unapply); /* Method for auto unapply */ |
… | |
… | |
111 | sint8 ACC (RW, gen_sp); /* Bonuses to regeneration speed of sp */ |
111 | sint8 ACC (RW, gen_sp); /* Bonuses to regeneration speed of sp */ |
112 | sint8 ACC (RW, gen_sp_armour); /* Penalty to sp regen from armour */ |
112 | sint8 ACC (RW, gen_sp_armour); /* Penalty to sp regen from armour */ |
113 | sint8 ACC (RW, gen_grace); /* Bonuses to regeneration speed of grace */ |
113 | sint8 ACC (RW, gen_grace); /* Bonuses to regeneration speed of grace */ |
114 | sint16 ACC (RW, item_power); /* Total item power of objects equipped */ |
114 | sint16 ACC (RW, item_power); /* Total item power of objects equipped */ |
115 | uint8 ACC (RW, listening); /* Which priority will be used in info_all */ |
115 | uint8 ACC (RW, listening); /* Which priority will be used in info_all */ |
|
|
116 | uint8 ACC (RW, gender); /* 0 male, 1 female, others not yte defined */ |
116 | |
117 | |
117 | /* Try to put all the bitfields together - saves some small amount of memory */ |
118 | /* Try to put all the bitfields together - saves some small amount of memory */ |
118 | bool ACC (RW, braced); /* Will not move if braced, only attack */ |
119 | bool ACC (RW, braced); /* Will not move if braced, only attack */ |
119 | bool ACC (RW, tmp_invis); /* Will invis go away when we attack ? */ |
120 | bool ACC (RW, tmp_invis); /* Will invis go away when we attack ? */ |
120 | bool ACC (RW, do_los); /* If true, need to call update_los() in draw(), and clear */ |
121 | bool ACC (RW, do_los); /* If true, need to call update_los() in draw(), and clear */ |
… | |
… | |
130 | object_ptr ACC (RW, last_used); /* Pointer to object last picked or applied */ |
131 | object_ptr ACC (RW, last_used); /* Pointer to object last picked or applied */ |
131 | |
132 | |
132 | object_ptr ACC (RW, combat_ob); // which weapon/bow/skill to use for direct attacks |
133 | object_ptr ACC (RW, combat_ob); // which weapon/bow/skill to use for direct attacks |
133 | object_ptr ACC (RW, ranged_ob); // which skill/item/spell to use for ranged attacks |
134 | object_ptr ACC (RW, ranged_ob); // which skill/item/spell to use for ranged attacks |
134 | object_ptr ACC (RW, golem); // the currently controlled golem |
135 | object_ptr ACC (RW, golem); // the currently controlled golem |
|
|
136 | object_ptr ACC (RW, observe); // the object that is being observed (or 0) |
135 | |
137 | |
136 | sint16 ACC (RW, bed_x), ACC (RW, bed_y); /* x,y - coordinates of respawn (savebed) */ |
138 | sint16 ACC (RW, bed_x), ACC (RW, bed_y); /* x,y - coordinates of respawn (savebed) */ |
137 | shstr ACC (RW, savebed_map); /* map where player will respawn after death */ |
139 | shstr ACC (RW, savebed_map); /* map where player will respawn after death */ |
138 | shstr ACC (RW, maplevel); /* On which level is the player? */ |
140 | shstr ACC (RW, maplevel); /* On which level is the player? */ |
139 | char ACC (RW, spellparam)[MAX_BUF]; /* What param to add to spells */ |
141 | char ACC (RW, spellparam)[MAX_BUF]; /* What param to add to spells */ |
… | |
… | |
192 | MTH void deactivate (); |
194 | MTH void deactivate (); |
193 | |
195 | |
194 | MTH void chargen_race_done (); |
196 | MTH void chargen_race_done (); |
195 | MTH void chargen_race_next (); |
197 | MTH void chargen_race_next (); |
196 | |
198 | |
|
|
199 | MTH void set_observe (object *ob); |
|
|
200 | |
197 | ~player (); |
201 | ~player (); |
198 | |
202 | |
199 | private: |
203 | private: |
200 | void set_object (object *op); |
204 | void set_object (object *op); |
201 | player (); |
205 | player (); |
… | |
… | |
205 | |
209 | |
206 | extern playervec players; |
210 | extern playervec players; |
207 | |
211 | |
208 | #define for_all_players(var) \ |
212 | #define for_all_players(var) \ |
209 | for (unsigned _i = 0; _i < players.size (); ++_i) \ |
213 | for (unsigned _i = 0; _i < players.size (); ++_i) \ |
210 | declvar (player *, var, players [_i]) |
214 | statementvar (player *, var, players [_i]) |
211 | |
215 | |