From 57b687a094ae6732f638095d53d22e82a3ff3b5e Mon Sep 17 00:00:00 2001 From: Dydzio Date: Sun, 16 Sep 2018 16:01:36 +0200 Subject: [PATCH] Fix crash on portal teleport when it's 1st action in movement (#491) --- client/CPlayerInterface.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/client/CPlayerInterface.cpp b/client/CPlayerInterface.cpp index fe1224c7a..905b1a2c7 100644 --- a/client/CPlayerInterface.cpp +++ b/client/CPlayerInterface.cpp @@ -2714,7 +2714,8 @@ void CPlayerInterface::doMoveHero(const CGHeroInstance * h, CGPath path) destinationTeleport = ObjectInstanceID(); destinationTeleportPos = int3(-1); } - sh = CCS->soundh->playSound(CCS->soundh->horseSounds[currentTerrain], -1); + if(i != path.nodes.size() - 1) + sh = CCS->soundh->playSound(CCS->soundh->horseSounds[currentTerrain], -1); continue; }