… | |
… | |
166 | op->x = -1; |
166 | op->x = -1; |
167 | op->y = -1; |
167 | op->y = -1; |
168 | enter_exit (op, 0); |
168 | enter_exit (op, 0); |
169 | } |
169 | } |
170 | |
170 | |
|
|
171 | // connect the player with a specific client |
|
|
172 | // also changed, rationalises, and fixes some incorrect settings |
171 | void |
173 | void |
172 | player::connect (client *ns) |
174 | player::connect (client *ns) |
173 | { |
175 | { |
174 | this->ns = ns; |
176 | this->ns = ns; |
175 | ns->pl = this; |
177 | ns->pl = this; |
… | |
… | |
182 | |
184 | |
183 | clear_los (ob); |
185 | clear_los (ob); |
184 | |
186 | |
185 | ob->type = PLAYER; // we are paranoid |
187 | ob->type = PLAYER; // we are paranoid |
186 | ob->race = ob->arch->clone.race; |
188 | ob->race = ob->arch->clone.race; |
|
|
189 | |
|
|
190 | if (!legal_range (ob, shoottype)) |
|
|
191 | shoottype = range_none; |
|
|
192 | |
|
|
193 | ob->carrying = sum_weight (ob); |
|
|
194 | link_player_skills (ob); |
187 | |
195 | |
188 | CLEAR_FLAG (ob, FLAG_NO_FIX_PLAYER); |
196 | CLEAR_FLAG (ob, FLAG_NO_FIX_PLAYER); |
189 | ob->update_stats (); |
197 | ob->update_stats (); |
190 | update_ob_speed (ob); |
198 | update_ob_speed (ob); |
191 | |
|
|
192 | ob->carrying = sum_weight (ob); |
|
|
193 | link_player_skills (ob); |
|
|
194 | |
|
|
195 | if (!legal_range (ob, shoottype)) |
|
|
196 | shoottype = range_none; |
|
|
197 | |
199 | |
198 | assign (title, ob->arch->clone.name); |
200 | assign (title, ob->arch->clone.name); |
199 | |
201 | |
200 | /* can_use_shield is a new flag. However, the can_use.. seems to largely come |
202 | /* can_use_shield is a new flag. However, the can_use.. seems to largely come |
201 | * from the class, and not race. I don't see any way to get the class information |
203 | * from the class, and not race. I don't see any way to get the class information |