… | |
… | |
320 | * All we can really get in this is some settings like host and display |
320 | * All we can really get in this is some settings like host and display |
321 | * mode. |
321 | * mode. |
322 | */ |
322 | */ |
323 | |
323 | |
324 | int |
324 | int |
325 | add_player (NewSocket * ns) |
325 | add_player (client_socket * ns) |
326 | { |
326 | { |
327 | player *p; |
327 | player *p; |
328 | |
328 | |
329 | p = get_player (NULL); |
329 | p = get_player (NULL); |
330 | p->socket = *ns; |
330 | p->socket = *ns; |
… | |
… | |
1061 | { |
1061 | { |
1062 | char buf[MAX_BUF]; |
1062 | char buf[MAX_BUF]; |
1063 | |
1063 | |
1064 | /* this must before then initial items are given */ |
1064 | /* this must before then initial items are given */ |
1065 | esrv_new_player (op->contr, op->weight + op->carrying); |
1065 | esrv_new_player (op->contr, op->weight + op->carrying); |
|
|
1066 | |
1066 | create_treasure (find_treasurelist ("starting_wealth"), op, 0, 0, 0); |
1067 | treasurelist *tl = find_treasurelist ("starting_wealth"); |
|
|
1068 | if (tl) |
|
|
1069 | create_treasure (tl, op, 0, 0, 0); |
1067 | |
1070 | |
1068 | INVOKE_PLAYER (BIRTH, op->contr); |
1071 | INVOKE_PLAYER (BIRTH, op->contr); |
1069 | INVOKE_PLAYER (LOGIN, op->contr); |
1072 | INVOKE_PLAYER (LOGIN, op->contr); |
1070 | |
1073 | |
1071 | op->contr->state = ST_PLAYING; |
1074 | op->contr->state = ST_PLAYING; |