1 | /* |
1 | /* |
2 | * static char *rcsid_login_c = |
2 | * static char *rcsid_login_c = |
3 | * "$Id: login.C,v 1.1 2006/08/13 17:16:04 elmex Exp $"; |
3 | * "$Id: login.C,v 1.2 2006/08/25 13:24:50 root Exp $"; |
4 | */ |
4 | */ |
5 | |
5 | |
6 | /* |
6 | /* |
7 | CrossFire, A Multiplayer game for X-windows |
7 | CrossFire, A Multiplayer game for X-windows |
8 | |
8 | |
… | |
… | |
278 | if (op->container) { |
278 | if (op->container) { |
279 | container=op->container; |
279 | container=op->container; |
280 | op->container=NULL; |
280 | op->container=NULL; |
281 | } |
281 | } |
282 | |
282 | |
283 | execute_global_event (EVENT_PLAYER_SAVE, op, filename); |
283 | INVOKE_PLAYER (SAVE, op->contr, ARG_STRING (filename)); |
284 | |
284 | |
285 | fprintf(fp,"password %s\n",pl->password); |
285 | fprintf(fp,"password %s\n",pl->password); |
286 | if (settings.set_title == TRUE) |
286 | if (settings.set_title == TRUE) |
287 | if(pl->own_title[0]!='\0') |
287 | if(pl->own_title[0]!='\0') |
288 | fprintf(fp,"title %s\n",pl->own_title); |
288 | fprintf(fp,"title %s\n",pl->own_title); |
… | |
… | |
699 | |
699 | |
700 | new_draw_info(NDI_UNIQUE, 0,op,"Welcome Back!"); |
700 | new_draw_info(NDI_UNIQUE, 0,op,"Welcome Back!"); |
701 | new_draw_info_format(NDI_UNIQUE | NDI_ALL | NDI_DK_ORANGE, 5, NULL, |
701 | new_draw_info_format(NDI_UNIQUE | NDI_ALL | NDI_DK_ORANGE, 5, NULL, |
702 | "%s has entered the game.",pl->ob->name); |
702 | "%s has entered the game.",pl->ob->name); |
703 | |
703 | |
704 | execute_global_event (EVENT_PLAYER_LOAD, op, filename); |
704 | INVOKE_PLAYER (LOAD, pl, ARG_STRING (filename)); |
|
|
705 | INVOKE_PLAYER (LOGIN, pl); |
705 | |
706 | |
706 | /* Lauwenmark : Here we handle the LOGIN global event */ |
|
|
707 | execute_global_event(EVENT_LOGIN, pl, pl->socket.host); |
|
|
708 | op->contr->socket.update_look=1; |
707 | op->contr->socket.update_look=1; |
709 | /* If the player should be dead, call kill_player for them |
708 | /* If the player should be dead, call kill_player for them |
710 | * Only check for hp - if player lacks food, let the normal |
709 | * Only check for hp - if player lacks food, let the normal |
711 | * logic for that to take place. If player is permanently |
710 | * logic for that to take place. If player is permanently |
712 | * dead, and not using permadeath mode, the kill_player will |
711 | * dead, and not using permadeath mode, the kill_player will |