diff options
| author | Dusan Durech <dusan@debian.(none)> | 2008-10-12 16:01:37 +0200 |
|---|---|---|
| committer | Dusan Durech <dusan@debian.(none)> | 2008-10-12 16:01:37 +0200 |
| commit | ab29b8c7bf5c985a0bc20830e1c73004867365bf (patch) | |
| tree | cfa4fdb4eb189742d0ab4f7565b809761ebe3b0e /src/base | |
| parent | 8c752fa52c2eed75724882a598d8f113546ca0af (diff) | |
- oprava chyby, zobrazovanie itemov na radare v loaklnej hre a v mutplayeri ako server
Diffstat (limited to 'src/base')
| -rw-r--r-- | src/base/item.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/base/item.c b/src/base/item.c index 300e3d1..07929ed 100644 --- a/src/base/item.c +++ b/src/base/item.c @@ -16,6 +16,7 @@ #include "interface.h" #include "image.h" +#include "radar.h" #include "layer.h" #include "screen_world.h" @@ -249,6 +250,11 @@ void addNewItem(space_t *spaceItem, int author_id) addObjectToSpace(spaceItem, item); if (getNetTypeGame() == NET_GAME_TYPE_SERVER) proto_send_additem_server(PROTO_SEND_ALL, NULL, item); + +#ifndef PUBLIC_SERVER + if (getNetTypeGame() != NET_GAME_TYPE_CLIENT) + addToRadar(item->id, new_x, new_y, RADAR_TYPE_ITEM); +#endif } #ifndef PUBLIC_SERVER @@ -411,6 +417,11 @@ static void tuxGiveBonus(tux_t *tux, item_t *item) if (getNetTypeGame() == NET_GAME_TYPE_SERVER) proto_send_newtux_server(PROTO_SEND_ALL, NULL, tux); + +#ifndef PUBLIC_SERVER + if (getNetTypeGame() != NET_GAME_TYPE_CLIENT) + delFromRadar(item->id); +#endif } static void tuxGiveGun(tux_t *tux, item_t *item) @@ -424,6 +435,11 @@ static void tuxGiveGun(tux_t *tux, item_t *item) if (getNetTypeGame() == NET_GAME_TYPE_SERVER) proto_send_newtux_server(PROTO_SEND_ALL, NULL, tux); + +#ifndef PUBLIC_SERVER + if (getNetTypeGame() != NET_GAME_TYPE_CLIENT) + delFromRadar(item->id); +#endif } static void action_giveitem(space_t *space, item_t *item, tux_t *tux) |