… | |
… | |
3 | * |
3 | * |
4 | * Copyright (©) 2005,2006,2007,2008 Marc Alexander Lehmann / Robin Redeker / the Deliantra team |
4 | * Copyright (©) 2005,2006,2007,2008 Marc Alexander Lehmann / Robin Redeker / the Deliantra team |
5 | * Copyright (©) 2002,2007 Mark Wedel & Crossfire Development Team |
5 | * Copyright (©) 2002,2007 Mark Wedel & Crossfire Development Team |
6 | * Copyright (©) 1992,2007 Frank Tore Johansen |
6 | * Copyright (©) 1992,2007 Frank Tore Johansen |
7 | * |
7 | * |
8 | * Deliantra is free software: you can redistribute it and/or modify |
8 | * Deliantra is free software: you can redistribute it and/or modify it under |
9 | * it under the terms of the GNU General Public License as published by |
9 | * the terms of the Affero GNU General Public License as published by the |
10 | * the Free Software Foundation, either version 3 of the License, or |
10 | * Free Software Foundation, either version 3 of the License, or (at your |
11 | * (at your option) any later version. |
11 | * option) any later version. |
12 | * |
12 | * |
13 | * This program is distributed in the hope that it will be useful, |
13 | * This program is distributed in the hope that it will be useful, |
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16 | * GNU General Public License for more details. |
16 | * GNU General Public License for more details. |
17 | * |
17 | * |
18 | * You should have received a copy of the GNU General Public License |
18 | * You should have received a copy of the Affero GNU General Public License |
19 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
19 | * and the GNU General Public License along with this program. If not, see |
|
|
20 | * <http://www.gnu.org/licenses/>. |
20 | * |
21 | * |
21 | * The authors can be reached via e-mail to <support@deliantra.net> |
22 | * The authors can be reached via e-mail to <support@deliantra.net> |
22 | */ |
23 | */ |
23 | |
24 | |
24 | /** |
25 | /** |
… | |
… | |
418 | |
419 | |
419 | if (flags & UPD_NAME) |
420 | if (flags & UPD_NAME) |
420 | { |
421 | { |
421 | int len; |
422 | int len; |
422 | const char *item_p; |
423 | const char *item_p; |
423 | char item_n[MAX_BUF]; |
424 | char item_n[127 * 2]; |
424 | |
425 | |
425 | if (!op->custom_name) |
426 | if (!op->custom_name) |
426 | { |
427 | { |
427 | strncpy (item_n, query_base_name (op, 0), 127); |
428 | len = assign (item_n, query_base_name (op, 0), 127); |
428 | item_n[127] = 0; |
|
|
429 | len = strlen (item_n); |
|
|
430 | item_p = query_base_name (op, 1); |
429 | item_p = query_base_name (op, 1); |
431 | } |
430 | } |
432 | else |
431 | else |
433 | { |
432 | { |
434 | strncpy (item_n, op->custom_name, 127); |
433 | len = assign (item_n, &op->custom_name, 127); |
435 | item_n[127] = 0; |
|
|
436 | len = strlen (item_n); |
|
|
437 | item_p = op->custom_name; |
434 | item_p = &op->custom_name; |
438 | } |
435 | } |
439 | |
436 | |
440 | strncpy (item_n + len + 1, item_p, 127); |
437 | len += assign (item_n + len, item_p, 127); |
441 | item_n[254] = 0; |
|
|
442 | len += strlen (item_n + 1 + len) + 1; |
|
|
443 | |
438 | |
444 | sl << data8 (item_n, len); |
439 | sl << data8 (item_n, len); |
445 | } |
440 | } |
446 | |
441 | |
447 | if (flags & UPD_ANIM) |
442 | if (flags & UPD_ANIM) |
… | |
… | |
678 | * Tero.Haatanen@lut.fi ] |
673 | * Tero.Haatanen@lut.fi ] |
679 | */ |
674 | */ |
680 | static void |
675 | static void |
681 | look_at (player *pl, int dx, int dy) |
676 | look_at (player *pl, int dx, int dy) |
682 | { |
677 | { |
683 | dynbuf_text buf; |
678 | dynbuf_text &buf = msg_dynbuf; buf.clear (); |
684 | object *ob = pl->ob; |
679 | object *ob = pl->ob; |
685 | |
680 | |
686 | if (!pl->observe->map) |
681 | if (!pl->observe->map) |
687 | return; |
682 | return; |
688 | |
683 | |