… | |
… | |
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. |
|
|
89 | static bool |
|
|
90 | same_party (partylist *a, partylist *b) |
|
|
91 | { |
|
|
92 | return a == b && a; |
|
|
93 | } |
|
|
94 | |
88 | INTERFACE_CLASS (player) |
95 | INTERFACE_CLASS (player) |
89 | struct player : zero_initialised, attachable |
96 | struct 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 */ |
… | |
… | |
120 | float ACC (RW, weapon_sp); /* Penalties to speed when fighting w speed >ws/10 */ |
127 | float ACC (RW, weapon_sp); /* Penalties to speed when fighting w speed >ws/10 */ |
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? */ |
… | |
… | |
163 | /* the player can see. For maps smaller than */ |
168 | /* the player can see. For maps smaller than */ |
164 | /* MAP_CLIENT_.., the upper left is used */ |
169 | /* MAP_CLIENT_.., the upper left is used */ |
165 | |
170 | |
166 | shstr ACC (RW, invis_race); /* What race invisible to? */ |
171 | shstr ACC (RW, invis_race); /* What race invisible to? */ |
167 | |
172 | |
|
|
173 | MTH float weapon_speed () const; |
|
|
174 | |
168 | MTH static player *create (); |
175 | MTH static player *create (); |
169 | |
176 | |
170 | static player *load_pl (object_thawer &thawer); |
177 | static player *load_pl (object_thawer &thawer); |
171 | MTH static player *load_pl (const char *path); |
178 | MTH static player *load_pl (const char *path); |
172 | |
179 | |