summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/player.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/player.cpp b/src/player.cpp
index ad5b568b..ca8c9f14 100644
--- a/src/player.cpp
+++ b/src/player.cpp
@@ -161,6 +161,11 @@ void Player::setSprite(int slot, int id, std::string color)
{
delete mSprites[slot];
mSprites[slot] = NULL;
+
+ if (slot == WEAPON_SPRITE)
+ {
+ mEquippedWeapon = NULL;
+ }
}
else
{