瀏覽代碼

Fix boat extra animations

nordsoft 2 年之前
父節點
當前提交
2babb5add5
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      client/mapView/MapRenderer.cpp

+ 1 - 1
client/mapView/MapRenderer.cpp

@@ -477,7 +477,7 @@ std::shared_ptr<CAnimation> MapRendererObjects::getOverlayAnimation(const CGObje
 		};
 
 		const auto * boat = dynamic_cast<const CGBoat *>(obj);
-		if (boat->hero)
+		if(boat->hero && obj->subID < boatAnimations.size())
 			return getAnimation(boatAnimations[obj->subID], true);
 	}
 	return nullptr;