~ubuntu-branches/ubuntu/maverick/crossfire-client/maverick

« back to all changes in this revision

Viewing changes to common/player.c

  • Committer: Bazaar Package Importer
  • Author(s): Kari Pahula
  • Date: 2010-06-17 21:55:04 UTC
  • mfrom: (1.2.8 upstream) (3.1.6 sid)
  • Revision ID: james.westby@ubuntu.com-20100617215504-864remyqayon6dot
Tags: 1.50.0-2
Install cfsndserv*, not cfsndserv_alsa9 to make kfreebsd land happy.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
const char * const rcsid_common_player_c =
2
 
    "$Id$";
 
2
    "$Id: player.c 12149 2009-08-20 02:11:28Z kbulgrien $";
3
3
/*
4
4
    Crossfire client, a client program for the crossfire program.
5
5
 
22
22
    The author can be reached via e-mail to crossfire-devel@real-time.com
23
23
*/
24
24
 
 
25
/**
 
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
 
29
 * player issues.
 
30
 *
 
31
 * Most of the handling of commands from the client to server (see commands.c
 
32
 * for server->client) is handled here.
 
33
 *
 
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.
 
38
 */
25
39
 
26
40
#include <client.h>
27
41
#include <external.h>
28
42
#include <script.h>
29
43
 
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.
33
 
 *
34
 
 *  This file does most of the handling of commands from the client to
35
 
 *  server (see commands.c for server->client)
36
 
 *
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.
41
 
 */
42
 
 
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);
272
273
    else {
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");
275
277
        else
276
278
            cs_print_string(csocket.fd,"move %d %d %d", cpl.ob->tag,
277
279
                cpl.container->inv->tag, cpl.count);