… | |
… | |
161 | set_first_map (object *op) |
161 | set_first_map (object *op) |
162 | { |
162 | { |
163 | strcpy (op->contr->maplevel, first_map_path); |
163 | strcpy (op->contr->maplevel, first_map_path); |
164 | op->x = -1; |
164 | op->x = -1; |
165 | op->y = -1; |
165 | op->y = -1; |
|
|
166 | } |
|
|
167 | |
|
|
168 | void |
|
|
169 | player::enter_map () |
|
|
170 | { |
|
|
171 | object *tmp = object::create (); |
|
|
172 | |
|
|
173 | EXIT_PATH (tmp) = maplevel; |
|
|
174 | EXIT_X (tmp) = ob->x; |
|
|
175 | EXIT_Y (tmp) = ob->y; |
166 | op->enter_exit (0); |
176 | ob->enter_exit (tmp); |
|
|
177 | |
|
|
178 | tmp->destroy (); |
167 | } |
179 | } |
168 | |
180 | |
169 | // connect the player with a specific client |
181 | // connect the player with a specific client |
170 | // also changed, rationalises, and fixes some incorrect settings |
182 | // also changed, rationalises, and fixes some incorrect settings |
171 | void |
183 | void |
… | |
… | |
237 | ns->floorbox_update (); |
249 | ns->floorbox_update (); |
238 | |
250 | |
239 | esrv_send_inventory (ob, ob); |
251 | esrv_send_inventory (ob, ob); |
240 | esrv_add_spells (this, 0); |
252 | esrv_add_spells (this, 0); |
241 | |
253 | |
242 | ob->enter_exit (0); |
|
|
243 | ob->activate (1); |
254 | ob->activate (1); |
|
|
255 | enter_map (); |
244 | |
256 | |
245 | send_rules (ob); |
257 | send_rules (ob); |
246 | send_news (ob); |
258 | send_news (ob); |
247 | display_motd (ob); |
259 | display_motd (ob); |
248 | INVOKE_PLAYER (LOGIN, this); |
260 | INVOKE_PLAYER (LOGIN, this); |
… | |
… | |
284 | ob->direction = 5; /* So player faces south */ |
296 | ob->direction = 5; /* So player faces south */ |
285 | ob->stats.wc = 2; |
297 | ob->stats.wc = 2; |
286 | ob->run_away = 25; /* Then we panick... */ |
298 | ob->run_away = 25; /* Then we panick... */ |
287 | |
299 | |
288 | set_first_map (ob); |
300 | set_first_map (ob); |
|
|
301 | enter_map (); |
289 | |
302 | |
290 | ob->roll_stats (); |
303 | ob->roll_stats (); |
291 | } |
304 | } |
292 | |
305 | |
293 | player::player () |
306 | player::player () |