Browse Source

- fixed (partially) #1028
- fix to last commit

Ivan Savenko 13 years ago
parent
commit
846474af66
2 changed files with 5 additions and 1 deletions
  1. 2 0
      client/CPlayerInterface.cpp
  2. 3 1
      client/UIFramework/CIntObjectClasses.cpp

+ 2 - 0
client/CPlayerInterface.cpp

@@ -279,6 +279,7 @@ void CPlayerInterface::heroMoved(const TryMoveHero & details)
 
 				}
 			}
+			adventureInt->heroList.update(ho);
 			return;	//teleport - no fancy moving animation
 					//TODO: smooth disappear / appear effect
 		}
@@ -300,6 +301,7 @@ void CPlayerInterface::heroMoved(const TryMoveHero & details)
 		ho->isStanding = true;
 		stillMoveHero.setn(STOP_MOVE);
 		GH.totalRedraw();
+		adventureInt->heroList.update(ho);
 		return;
 	}
 

+ 3 - 1
client/UIFramework/CIntObjectClasses.cpp

@@ -371,10 +371,12 @@ void CAdventureMapButton::init(const CFunctionList<void()> &Callback, const std:
 	callback = Callback;
 	hoverable = actOnDown = borderEnabled = soundDisabled = false;
 	borderColor.unused = 1; // represents a transparent color, used for HighlightableButton
-	assignedKeys.insert(key);
 	hoverTexts = Name;
 	helpBox=HelpBox;
 
+	if (key != SDLK_UNKNOWN)
+		assignedKeys.insert(key);
+
 	pos.x += x;
 	pos.y += y;