1 | /* |
1 | /* |
2 | * This file is part of Deliantra, the Roguelike Realtime MMORPG. |
2 | * This file is part of Deliantra, the Roguelike Realtime MMORPG. |
3 | * |
3 | * |
4 | * Copyright (©) 2005,2006,2007,2008 Marc Alexander Lehmann / Robin Redeker / the Deliantra team |
4 | * Copyright (©) 2005,2006,2007,2008,2009,2010 Marc Alexander Lehmann / Robin Redeker / the Deliantra team |
5 | * Copyright (©) 2001 Mark Wedel |
5 | * Copyright (©) 2001 Mark Wedel |
6 | * Copyright (©) 1992 Frank Tore Johansen |
6 | * Copyright (©) 1992 Frank Tore Johansen |
7 | * |
7 | * |
8 | * Deliantra is free software: you can redistribute it and/or modify it under |
8 | * Deliantra is free software: you can redistribute it and/or modify it under |
9 | * the terms of the Affero GNU General Public License as published by the |
9 | * the terms of the Affero GNU General Public License as published by the |
… | |
… | |
44 | |
44 | |
45 | #include <global.h> |
45 | #include <global.h> |
46 | #include <sproto.h> |
46 | #include <sproto.h> |
47 | |
47 | |
48 | #include <living.h> |
48 | #include <living.h> |
49 | #include <commands.h> |
|
|
50 | |
49 | |
51 | /* This block is basically taken from socket.c - I assume if it works there, |
50 | /* This block is basically taken from socket.c - I assume if it works there, |
52 | * it should work here. |
51 | * it should work here. |
53 | */ |
52 | */ |
54 | #include <sys/types.h> |
53 | #include <sys/types.h> |
… | |
… | |
735 | */ |
734 | */ |
736 | static void |
735 | static void |
737 | rangetostring (player *pl, char *obuf) |
736 | rangetostring (player *pl, char *obuf) |
738 | { |
737 | { |
739 | dynbuf_text &buf = msg_dynbuf; buf.clear (); |
738 | dynbuf_text &buf = msg_dynbuf; buf.clear (); |
|
|
739 | |
|
|
740 | #if 0 |
|
|
741 | // print ranged/chosen_skill etc. objects every call |
|
|
742 | printf ("%s %s => %s (%s)\n", |
|
|
743 | pl->ranged_ob ? &pl->ranged_ob->name : "-", |
|
|
744 | pl->combat_ob ? &pl->combat_ob->name : "-", |
|
|
745 | pl->ob->current_weapon ? &pl->ob->current_weapon->name : "-", |
|
|
746 | pl->ob->chosen_skill ? &pl->ob->chosen_skill->name : "-" |
|
|
747 | ); |
|
|
748 | #endif |
740 | |
749 | |
741 | if (pl->ranged_ob) |
750 | if (pl->ranged_ob) |
742 | buf << " Range" << (pl->ob->current_weapon == pl->ranged_ob ? "*" : "") << ": " << pl->ranged_ob->name; |
751 | buf << " Range" << (pl->ob->current_weapon == pl->ranged_ob ? "*" : "") << ": " << pl->ranged_ob->name; |
743 | |
752 | |
744 | if (pl->combat_ob) |
753 | if (pl->combat_ob) |