diff options
author | Dennis Friis <peavey@placid.dk> | 2008-11-06 16:46:18 +0000 |
---|---|---|
committer | Dennis Friis <peavey@placid.dk> | 2008-11-06 16:46:18 +0000 |
commit | 87f43f7621dda3071ba189df6975cd0a0595165a (patch) | |
tree | fa5cf0603bbcc4ecb4506dd357124975a8534503 /src/localplayer.cpp | |
parent | 9475a009e95a3f379a0e97bc66d1aab93ca24b34 (diff) | |
download | mana-87f43f7621dda3071ba189df6975cd0a0595165a.tar.gz mana-87f43f7621dda3071ba189df6975cd0a0595165a.tar.bz2 mana-87f43f7621dda3071ba189df6975cd0a0595165a.tar.xz mana-87f43f7621dda3071ba189df6975cd0a0595165a.zip |
Have equipment tied into player inventory instead of keeping its own list of pointers to items. This ensures the ressource is up-to-date and avoids crashes on stale item pointers.
Diffstat (limited to 'src/localplayer.cpp')
-rw-r--r-- | src/localplayer.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/localplayer.cpp b/src/localplayer.cpp index 3caa5ead..bb91711c 100644 --- a/src/localplayer.cpp +++ b/src/localplayer.cpp @@ -144,7 +144,7 @@ void LocalPlayer::unequipItem(Item *item) outMsg.writeInt16(item->getInvIndex()); // Tidy equipment directly to avoid weapon still shown bug, for instance - mEquipment->removeEquipment(item); + mEquipment->removeEquipment(item->getInvIndex()); } void LocalPlayer::useItem(Item *item) |