diff options
author | Björn Steinbrink <B.Steinbrink@gmx.de> | 2005-12-29 12:30:46 +0000 |
---|---|---|
committer | Björn Steinbrink <B.Steinbrink@gmx.de> | 2005-12-29 12:30:46 +0000 |
commit | b32f28d74e9ec5cfe3bc443e2fbffd5de245fd0b (patch) | |
tree | 987e6805c3fc00966d1358b0a6a48c42bf1f0ec7 /src/game.cpp | |
parent | 41101dbd7f38c7e9898422c755b8eaf379f1d7c1 (diff) | |
download | mana-b32f28d74e9ec5cfe3bc443e2fbffd5de245fd0b.tar.gz mana-b32f28d74e9ec5cfe3bc443e2fbffd5de245fd0b.tar.bz2 mana-b32f28d74e9ec5cfe3bc443e2fbffd5de245fd0b.tar.xz mana-b32f28d74e9ec5cfe3bc443e2fbffd5de245fd0b.zip |
Removed duplicate pick up code
Diffstat (limited to 'src/game.cpp')
-rw-r--r-- | src/game.cpp | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/src/game.cpp b/src/game.cpp index ab0e73d9..fb130acc 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -557,13 +557,8 @@ void do_input() } if (id) - { - // TODO: Remove duplicated code, probably add a - // pick up command - MessageOut outMsg; - outMsg.writeInt16(0x009f); - outMsg.writeInt32(id); - } + pickUp(id); + used = true; } break; @@ -803,12 +798,8 @@ void do_input() { Uint32 id = find_floor_item_by_cor(player_node->x, player_node->y); - if (id != 0) - { - MessageOut outMsg; - outMsg.writeInt16(CMSG_ITEM_PICKUP); - outMsg.writeInt32(id); - } + if (id) + pickUp(id); } else if (joy[JOY_BTN2] && action_time) { |