22
22
The author can be reached via e-mail to crossfire-devel@real-time.com
26
* @file common/player.c
27
* Handles various player related functions. This includes both things that
28
* operate on the player item, cpl structure, or various commands that the
31
* Most of the handling of commands from the client to server (see commands.c
32
* for server->client) is handled here.
34
* Most of the work for sending messages to the server is done here. Again,
35
* most of these appear self explanatory. Most send a bunch of commands like
36
* apply, examine, fire, run, etc. This looks like it was done by Mark to
37
* remove the old keypress stupidity I used.
26
40
#include <client.h>
27
41
#include <external.h>
28
42
#include <script.h>
30
/* This file handles various player related functions. This includes
31
* both things that operate on the player item, cpl structure, or
32
* various commands that the player issues.
34
* This file does most of the handling of commands from the client to
35
* server (see commands.c for server->client)
37
* does most of the work for sending messages to the server
38
* Again, most of these appear self explanatory. Most send a bunch of
39
* commands like apply, examine, fire, run, etc. This looks like it
40
* was done by Mark to remove the old keypress stupidity I used.
43
44
/* This translates the numeric direction id's into the actual direction
44
45
* commands. This lets us send the actual command (ie, 'north'), which
45
46
* makes handling on the server side easier.
271
272
send_command(command, cpl.count, 0);
273
274
if (cpl.container->inv == NULL)
274
draw_info("There is nothing in the container to move", NDI_BLACK);
275
draw_ext_info(NDI_BLACK, MSG_TYPE_CLIENT, MSG_TYPE_CLIENT_NOTICE,
276
"There is nothing in the container to move");
276
278
cs_print_string(csocket.fd,"move %d %d %d", cpl.ob->tag,
277
279
cpl.container->inv->tag, cpl.count);